]> source.dussan.org Git - redmine.git/commitdiff
scm: view: add parents and children on the revision page (#5501)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 3 Nov 2011 11:34:09 +0000 (11:34 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 3 Nov 2011 11:34:09 +0000 (11:34 +0000)
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
config/locales/en.yml
public/stylesheets/scm.css

index 85b11d44129f2d823f02472e760b3940fa834f64..000666e85634d2993d44f9aa9f095ed4f41a674f 100644 (file)
 
 <h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
 
-<p><% if @changeset.scmid %>ID: <%= h(@changeset.scmid) %><br /><% end %>
-<span class="author"><%= authoring(@changeset.committed_on, @changeset.author) %></span></p>
+<table class="revision-info">
+  <% if @changeset.scmid %>
+    <tr>
+      <td>ID</td><td><%= h(@changeset.scmid) %></td>
+    </tr>
+  <% end %>
+  <% unless @changeset.parents.blank? %>
+    <tr>
+      <td><%= l(:label_parent_revision) %></td>
+      <td>
+        <%= @changeset.parents.collect{
+              |p| link_to_revision(p, @project, :text => format_revision(p))
+            }.join(", ") %><br />
+      </td>
+    </tr>
+  <% end %>
+  <% unless @changeset.children.blank? %>
+    <tr>
+      <td><%= l(:label_child_revision) %></td>
+      <td>
+       <%= @changeset.children.collect{
+              |p| link_to_revision(p, @project, :text => format_revision(p))
+             }.join(", ") %><br />
+      </td>
+    </tr>
+  <% end %>
+</table>
+<p>
+<span class="author">
+<%= authoring(@changeset.committed_on, @changeset.author) %>
+</span>
+</p>
 
 <%= textilizable @changeset.comments %>
 
index 8a792d478ac8a1ad22968f21b9c2084144c96f03..ee87170570eaf5b73c98cbe21a7fe6468236b13b 100644 (file)
@@ -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
index 689d9227763b2161f47a7b85d8303f83200cad80..0f4cc626f78ab3d70dba8728be7ab62bd74b8486 100644 (file)
@@ -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; }