From be660e11cc2bf68b94451f77e612e0ee0cd666cc Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Thu, 20 Jun 2019 07:08:27 +0000 Subject: 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 --- app/views/issues/_history.html.erb | 40 ------------------------------ app/views/issues/show.html.erb | 9 ------- app/views/issues/tabs/_changesets.html.erb | 24 ++++++++++++++++++ app/views/issues/tabs/_history.html.erb | 40 ++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+), 49 deletions(-) delete mode 100644 app/views/issues/_history.html.erb create mode 100644 app/views/issues/tabs/_changesets.html.erb create mode 100644 app/views/issues/tabs/_history.html.erb (limited to 'app/views/issues') diff --git a/app/views/issues/_history.html.erb b/app/views/issues/_history.html.erb deleted file mode 100644 index 6571bea45..000000000 --- a/app/views/issues/_history.html.erb +++ /dev/null @@ -1,40 +0,0 @@ -<% - issue = tab[:locals][:issue] - journals = tab[:locals][:journals] -%> - -<% reply_links = issue.notes_addable? -%> -<% for journal in journals %> -
-
-
- <%= render_journal_actions(issue, journal, :reply_links => reply_links) %> - #<%= journal.indice %> -
-

- <%= avatar(journal.user) %> - <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> - <%= render_private_notes_indicator(journal) %> -

- - <% if journal.details.any? %> -
    - <% details_to_strings(journal.visible_details).each do |string| %> -
  • <%= string %>
  • - <% end %> -
- <% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %> -
- <% thumbnail_attachments.each do |attachment| %> -
<%= thumbnail_tag(attachment) %>
- <% end %> -
- <% end %> - <% end %> - <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> -
-
- <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> -<% end %> - -<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %> 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? %> -
-

<%=l(:label_associated_revisions)%>

-<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %> -
-<% end %> - -<%= render partial: 'action_menu_edit' if User.current.wants_comments_in_reverse_order? %> -

<%=l(:label_history)%>

<%= 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| %> +
+

+ <%= avatar(changeset.user, :size => "24") %> + <%= authoring changeset.committed_on, changeset.author, :label => :label_added_time_by %> +

+

<%= 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 %>

+ +
+ <%= format_changeset_comments changeset %> +
+
+ <%= call_hook(:view_issues_history_changeset_bottom, { :changeset => changeset }) %> +<% end %> diff --git a/app/views/issues/tabs/_history.html.erb b/app/views/issues/tabs/_history.html.erb new file mode 100644 index 000000000..6571bea45 --- /dev/null +++ b/app/views/issues/tabs/_history.html.erb @@ -0,0 +1,40 @@ +<% + issue = tab[:locals][:issue] + journals = tab[:locals][:journals] +%> + +<% reply_links = issue.notes_addable? -%> +<% for journal in journals %> +
+
+
+ <%= render_journal_actions(issue, journal, :reply_links => reply_links) %> + #<%= journal.indice %> +
+

+ <%= avatar(journal.user) %> + <%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %> + <%= render_private_notes_indicator(journal) %> +

+ + <% if journal.details.any? %> +
    + <% details_to_strings(journal.visible_details).each do |string| %> +
  • <%= string %>
  • + <% end %> +
+ <% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %> +
+ <% thumbnail_attachments.each do |attachment| %> +
<%= thumbnail_tag(attachment) %>
+ <% end %> +
+ <% end %> + <% end %> + <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %> +
+
+ <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %> +<% end %> + +<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %> -- cgit v1.2.3