mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-28 19:29:38 +00:00
Use tabs to switch between file changes and diff of a commit.
git-svn-id: http://svn.redmine.org/redmine/trunk@16911 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
24d9570944
commit
607a82aa86
@ -40,3 +40,26 @@
|
||||
<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %>
|
||||
<%= render :partial => 'related_issues' %>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:browse_repository, @repository.project) %>
|
||||
<%
|
||||
tabs = []
|
||||
tabs << { name: 'revision', label: :label_change_plural,
|
||||
url: { :action => 'revision',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => nil,
|
||||
:rev => @changeset.identifier}
|
||||
}
|
||||
|
||||
tabs << { name: 'diff', label: :label_view_diff,
|
||||
url: { :action => 'diff',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => "",
|
||||
:rev => @changeset.identifier }
|
||||
} if action_name == 'diff' || @changeset.filechanges.any?
|
||||
%>
|
||||
|
||||
<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>
|
||||
<% end %>
|
||||
|
||||
@ -29,7 +29,6 @@
|
||||
<%= render :partial => 'changeset' %>
|
||||
|
||||
<% if User.current.allowed_to?(:browse_repository, @project) %>
|
||||
<h3><%= l(:label_attachment_plural) %></h3>
|
||||
<ul id="changes-legend">
|
||||
<li class="change change-A"><%= l(:label_added) %></li>
|
||||
<li class="change change-M"><%= l(:label_modified) %></li>
|
||||
@ -38,13 +37,6 @@
|
||||
<li class="change change-D"><%= l(:label_deleted) %></li>
|
||||
</ul>
|
||||
|
||||
<p><%= link_to(l(:label_view_diff),
|
||||
:action => 'diff',
|
||||
:id => @project,
|
||||
:repository_id => @repository.identifier_param,
|
||||
:path => "",
|
||||
:rev => @changeset.identifier) if @changeset.filechanges.any? %></p>
|
||||
|
||||
<div class="changeset-changes">
|
||||
<%= render_changeset_changes %>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user