diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-06-20 07:08:27 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-06-20 07:08:27 +0000 |
commit | be660e11cc2bf68b94451f77e612e0ee0cd666cc (patch) | |
tree | 130496134ee7db4212b9a19ad913ceab00d00f0d /app | |
parent | b132b8e914c5612218bb161af19aa916b18deab3 (diff) | |
download | redmine-be660e11cc2bf68b94451f77e612e0ee0cd666cc.tar.gz redmine-be660e11cc2bf68b94451f77e612e0ee0cd666cc.zip |
Move changesets to its own tab (#3058).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@18273 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/helpers/issues_helper.rb | 3 | ||||
-rw-r--r-- | app/views/issues/show.html.erb | 9 | ||||
-rw-r--r-- | app/views/issues/tabs/_changesets.html.erb | 24 | ||||
-rw-r--r-- | app/views/issues/tabs/_history.html.erb (renamed from app/views/issues/_history.html.erb) | 0 |
4 files changed, 26 insertions, 10 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index ccf89e8fa..16ac24602 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -553,10 +553,11 @@ module IssuesHelper journals_without_notes = @journals.select{|value| value.notes.blank?} journals_with_notes = @journals.reject{|value| value.notes.blank?} - tabs << {:name => 'history', :label => :label_history, :onclick => 'showIssueHistory("history", this.href)', :partial => 'history', :locals => {:issue => @issue, :journals => @journals}} + tabs << {:name => 'history', :label => :label_history, :onclick => 'showIssueHistory("history", this.href)', :partial => 'issues/tabs/history', :locals => {:issue => @issue, :journals => @journals}} tabs << {:name => 'notes', :label => :label_issue_history_notes, :onclick => 'showIssueHistory("notes", this.href)'} if journals_with_notes.any? tabs << {:name => 'properties', :label => :label_issue_history_properties, :onclick => 'showIssueHistory("properties", this.href)'} if journals_without_notes.any? end + tabs << {:name => 'changesets', :label => :label_associated_revisions, :partial => 'issues/tabs/changesets', :locals => {:changesets => @changesets}} if @changesets.present? tabs end end diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index 3a17cc49a..d50f5e226 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -122,15 +122,6 @@ end %> <%= render partial: 'action_menu_edit' if User.current.wants_comments_in_reverse_order? %> -<% if @changesets.present? %> -<div id="issue-changesets"> -<h3><%=l(:label_associated_revisions)%></h3> -<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %> -</div> -<% end %> - -<%= render partial: 'action_menu_edit' if User.current.wants_comments_in_reverse_order? %> - <div id="history"> <h3><%=l(:label_history)%></h3> <%= render_tabs issue_history_tabs, params[:tab] ? params[:tab] : 'notes' %> diff --git a/app/views/issues/tabs/_changesets.html.erb b/app/views/issues/tabs/_changesets.html.erb new file mode 100644 index 000000000..7e2b01a3d --- /dev/null +++ b/app/views/issues/tabs/_changesets.html.erb @@ -0,0 +1,24 @@ +<% tab[:locals][:changesets].each do |changeset| %> + <div id="changeset-<%= changeset.id %>" class="changeset journal"> + <h4> + <%= avatar(changeset.user, :size => "24") %> + <%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %> + </h4> + <p><%= link_to_revision(changeset, changeset.repository, + :text => "#{l(:label_revision)} #{changeset.format_identifier}") %> + <% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %> + (<%= link_to(l(:label_diff), + :controller => 'repositories', + :action => 'diff', + :id => changeset.project, + :repository_id => changeset.repository.identifier_param, + :path => "", + :rev => changeset.identifier) %>) + <% end %></p> + + <div class="wiki changeset-comments"> + <%= format_changeset_comments changeset %> + </div> + </div> + <%= call_hook(:view_issues_history_changeset_bottom, { :changeset => changeset }) %> +<% end %> diff --git a/app/views/issues/_history.html.erb b/app/views/issues/tabs/_history.html.erb index 6571bea45..6571bea45 100644 --- a/app/views/issues/_history.html.erb +++ b/app/views/issues/tabs/_history.html.erb |