diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-31 11:02:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-31 11:02:47 +0000 |
commit | afc4e0b39da2151c39a62e1fddbd36bffed5abe8 (patch) | |
tree | 6c9f1ee3bf1b751efe305ee0a25dc1ad52e99d8d /app | |
parent | 39b47a1a80762f5906416ef9599f8bc9e95dabeb (diff) | |
download | redmine-afc4e0b39da2151c39a62e1fddbd36bffed5abe8.tar.gz redmine-afc4e0b39da2151c39a62e1fddbd36bffed5abe8.zip |
Adds changeset comments to diff view (#4266).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@15139 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/views/repositories/_changeset.html.erb | 45 | ||||
-rw-r--r-- | app/views/repositories/diff.html.erb | 2 | ||||
-rw-r--r-- | app/views/repositories/revision.html.erb | 46 |
3 files changed, 47 insertions, 46 deletions
diff --git a/app/views/repositories/_changeset.html.erb b/app/views/repositories/_changeset.html.erb new file mode 100644 index 000000000..3c2c1c09d --- /dev/null +++ b/app/views/repositories/_changeset.html.erb @@ -0,0 +1,45 @@ +<h2><%= avatar(@changeset.user, :size => "24") %><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2> + +<div class="details"> + <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %> + <table class="revision-info"> + <% if @changeset.scmid.present? %> + <tr> + <td>ID</td><td><%= @changeset.scmid %></td> + </tr> + <% end %> + <% if @changeset.parents.present? %> + <tr> + <td><%= l(:label_parent_revision) %></td> + <td> + <%= @changeset.parents.collect{ + |p| link_to_revision(p, @repository, :text => format_revision(p)) + }.join(", ").html_safe %> + </td> + </tr> + <% end %> + <% if @changeset.children.present? %> + <tr> + <td><%= l(:label_child_revision) %></td> + <td> + <%= @changeset.children.collect{ + |p| link_to_revision(p, @repository, :text => format_revision(p)) + }.join(", ").html_safe %> + </td> + </tr> + <% end %> + </table> + <% end %> + + <p> + <span class="author"> + <%= authoring(@changeset.committed_on, @changeset.author) %> + </span> + </p> +</div> + +<%= textilizable @changeset.comments %> + +<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %> + <%= render :partial => 'related_issues' %> +<% end %> diff --git a/app/views/repositories/diff.html.erb b/app/views/repositories/diff.html.erb index 6a366b4e7..f4f66ade2 100644 --- a/app/views/repositories/diff.html.erb +++ b/app/views/repositories/diff.html.erb @@ -1,4 +1,4 @@ -<h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2> +<%= render :partial => 'changeset', :locals => {:repository => @repository, :changeset => @changeset} %> <!-- Choose view type --> <%= form_tag({:action => 'diff', :id => @project, diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb index 91c7d3b93..5c1a10e78 100644 --- a/app/views/repositories/revision.html.erb +++ b/app/views/repositories/revision.html.erb @@ -26,51 +26,7 @@ <% end %> </div> -<h2><%= avatar(@changeset.user, :size => "24") %><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2> - -<div class="details"> - <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %> - <table class="revision-info"> - <% if @changeset.scmid.present? %> - <tr> - <td>ID</td><td><%= @changeset.scmid %></td> - </tr> - <% end %> - <% if @changeset.parents.present? %> - <tr> - <td><%= l(:label_parent_revision) %></td> - <td> - <%= @changeset.parents.collect{ - |p| link_to_revision(p, @repository, :text => format_revision(p)) - }.join(", ").html_safe %> - </td> - </tr> - <% end %> - <% if @changeset.children.present? %> - <tr> - <td><%= l(:label_child_revision) %></td> - <td> - <%= @changeset.children.collect{ - |p| link_to_revision(p, @repository, :text => format_revision(p)) - }.join(", ").html_safe %> - </td> - </tr> - <% end %> - </table> - <% end %> - - <p> - <span class="author"> - <%= authoring(@changeset.committed_on, @changeset.author) %> - </span> - </p> -</div> - -<%= textilizable @changeset.comments %> - -<% if @changeset.issues.visible.any? || User.current.allowed_to?(:manage_related_issues, @repository.project) %> - <%= render :partial => 'related_issues' %> -<% end %> +<%= render :partial => 'changeset', :locals => {:repository => @repository, :changeset => @changeset} %> <% if User.current.allowed_to?(:browse_repository, @project) %> <h3><%= l(:label_attachment_plural) %></h3> |