From cc79b6d04a6afadec66a596a0bafdc2cc73e728e Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 3 Nov 2011 11:34:09 +0000 Subject: [PATCH] scm: view: add parents and children on the revision page (#5501) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Contributed by Jan TopiƄski. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7721 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/repositories/revision.html.erb | 34 ++++++++++++++++++++++-- config/locales/en.yml | 2 ++ public/stylesheets/scm.css | 5 ++++ 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb index 85b11d441..000666e85 100644 --- a/app/views/repositories/revision.html.erb +++ b/app/views/repositories/revision.html.erb @@ -25,8 +25,38 @@

<%= l(:label_revision) %> <%= format_revision(@changeset) %>

-

<% if @changeset.scmid %>ID: <%= h(@changeset.scmid) %>
<% end %> -<%= authoring(@changeset.committed_on, @changeset.author) %>

+ + <% if @changeset.scmid %> + + + + <% end %> + <% unless @changeset.parents.blank? %> + + + + + <% end %> + <% unless @changeset.children.blank? %> + + + + + <% end %> +
ID<%= h(@changeset.scmid) %>
<%= l(:label_parent_revision) %> + <%= @changeset.parents.collect{ + |p| link_to_revision(p, @project, :text => format_revision(p)) + }.join(", ") %>
+
<%= l(:label_child_revision) %> + <%= @changeset.children.collect{ + |p| link_to_revision(p, @project, :text => format_revision(p)) + }.join(", ") %>
+
+

+ +<%= authoring(@changeset.committed_on, @changeset.author) %> + +

<%= textilizable @changeset.comments %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8a792d478..ee8717057 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -823,6 +823,8 @@ en: label_issues_visibility_public: All non private issues label_issues_visibility_own: Issues created by or assigned to the user label_git_report_last_commit: Report last commit for files and directories + label_parent_revision: Parent + label_child_revision: Child button_login: Login button_submit: Submit diff --git a/public/stylesheets/scm.css b/public/stylesheets/scm.css index 689d92277..0f4cc626f 100644 --- a/public/stylesheets/scm.css +++ b/public/stylesheets/scm.css @@ -1,4 +1,9 @@ +table.revision-info td { + margin: 0px; + padding: 0px; +} + div.changeset-changes ul { margin: 0; padding: 0; } div.changeset-changes ul > ul { margin-left: 18px; padding: 0; }