##// END OF EJS Templates
Prevent empty table from being rendered....
Jean-Philippe Lang -
r8385:9b27e1cd83df
parent child
Show More
@@ -1,97 +1,100
1 <div class="contextual">
1 <div class="contextual">
2 &#171;
2 &#171;
3 <% unless @changeset.previous.nil? -%>
3 <% unless @changeset.previous.nil? -%>
4 <%= link_to_revision(@changeset.previous, @project, :text => l(:label_previous)) %>
4 <%= link_to_revision(@changeset.previous, @project, :text => l(:label_previous)) %>
5 <% else -%>
5 <% else -%>
6 <%= l(:label_previous) %>
6 <%= l(:label_previous) %>
7 <% end -%>
7 <% end -%>
8 |
8 |
9 <% unless @changeset.next.nil? -%>
9 <% unless @changeset.next.nil? -%>
10 <%= link_to_revision(@changeset.next, @project, :text => l(:label_next)) %>
10 <%= link_to_revision(@changeset.next, @project, :text => l(:label_next)) %>
11 <% else -%>
11 <% else -%>
12 <%= l(:label_next) %>
12 <%= l(:label_next) %>
13 <% end -%>
13 <% end -%>
14 &#187;&nbsp;
14 &#187;&nbsp;
15
15
16 <% form_tag({:controller => 'repositories',
16 <% form_tag({:controller => 'repositories',
17 :action => 'revision',
17 :action => 'revision',
18 :id => @project,
18 :id => @project,
19 :rev => nil},
19 :rev => nil},
20 :method => :get) do %>
20 :method => :get) do %>
21 <%= text_field_tag 'rev', @rev, :size => 8 %>
21 <%= text_field_tag 'rev', @rev, :size => 8 %>
22 <%= submit_tag 'OK', :name => nil %>
22 <%= submit_tag 'OK', :name => nil %>
23 <% end %>
23 <% end %>
24 </div>
24 </div>
25
25
26 <h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
26 <h2><%= l(:label_revision) %> <%= format_revision(@changeset) %></h2>
27
27
28 <% if @changeset.scmid.present? || @changeset.parents.present? || @changeset.children.present? %>
28 <table class="revision-info">
29 <table class="revision-info">
29 <% if @changeset.scmid %>
30 <% if @changeset.scmid.present? %>
30 <tr>
31 <tr>
31 <td>ID</td><td><%= h(@changeset.scmid) %></td>
32 <td>ID</td><td><%= h(@changeset.scmid) %></td>
32 </tr>
33 </tr>
33 <% end %>
34 <% end %>
34 <% unless @changeset.parents.blank? %>
35 <% if @changeset.parents.present? %>
35 <tr>
36 <tr>
36 <td><%= l(:label_parent_revision) %></td>
37 <td><%= l(:label_parent_revision) %></td>
37 <td>
38 <td>
38 <%= @changeset.parents.collect{
39 <%= @changeset.parents.collect{
39 |p| link_to_revision(p, @project, :text => format_revision(p))
40 |p| link_to_revision(p, @project, :text => format_revision(p))
40 }.join(", ").html_safe %>
41 }.join(", ").html_safe %>
41 </td>
42 </td>
42 </tr>
43 </tr>
43 <% end %>
44 <% end %>
44 <% unless @changeset.children.blank? %>
45 <% if @changeset.children.present? %>
45 <tr>
46 <tr>
46 <td><%= l(:label_child_revision) %></td>
47 <td><%= l(:label_child_revision) %></td>
47 <td>
48 <td>
48 <%= @changeset.children.collect{
49 <%= @changeset.children.collect{
49 |p| link_to_revision(p, @project, :text => format_revision(p))
50 |p| link_to_revision(p, @project, :text => format_revision(p))
50 }.join(", ").html_safe %>
51 }.join(", ").html_safe %>
51 </td>
52 </td>
52 </tr>
53 </tr>
53 <% end %>
54 <% end %>
54 </table>
55 </table>
56 <% end %>
57
55 <p>
58 <p>
56 <span class="author">
59 <span class="author">
57 <%= authoring(@changeset.committed_on, @changeset.author) %>
60 <%= authoring(@changeset.committed_on, @changeset.author) %>
58 </span>
61 </span>
59 </p>
62 </p>
60
63
61 <%= textilizable @changeset.comments %>
64 <%= textilizable @changeset.comments %>
62
65
63 <% if @changeset.issues.visible.any? %>
66 <% if @changeset.issues.visible.any? %>
64 <h3><%= l(:label_related_issues) %></h3>
67 <h3><%= l(:label_related_issues) %></h3>
65 <ul>
68 <ul>
66 <% @changeset.issues.visible.each do |issue| %>
69 <% @changeset.issues.visible.each do |issue| %>
67 <li><%= link_to_issue issue %></li>
70 <li><%= link_to_issue issue %></li>
68 <% end %>
71 <% end %>
69 </ul>
72 </ul>
70 <% end %>
73 <% end %>
71
74
72 <% if User.current.allowed_to?(:browse_repository, @project) %>
75 <% if User.current.allowed_to?(:browse_repository, @project) %>
73 <h3><%= l(:label_attachment_plural) %></h3>
76 <h3><%= l(:label_attachment_plural) %></h3>
74 <ul id="changes-legend">
77 <ul id="changes-legend">
75 <li class="change change-A"><%= l(:label_added) %></li>
78 <li class="change change-A"><%= l(:label_added) %></li>
76 <li class="change change-M"><%= l(:label_modified) %></li>
79 <li class="change change-M"><%= l(:label_modified) %></li>
77 <li class="change change-C"><%= l(:label_copied) %></li>
80 <li class="change change-C"><%= l(:label_copied) %></li>
78 <li class="change change-R"><%= l(:label_renamed) %></li>
81 <li class="change change-R"><%= l(:label_renamed) %></li>
79 <li class="change change-D"><%= l(:label_deleted) %></li>
82 <li class="change change-D"><%= l(:label_deleted) %></li>
80 </ul>
83 </ul>
81
84
82 <p><%= link_to(l(:label_view_diff),
85 <p><%= link_to(l(:label_view_diff),
83 :action => 'diff',
86 :action => 'diff',
84 :id => @project,
87 :id => @project,
85 :path => "",
88 :path => "",
86 :rev => @changeset.identifier) if @changeset.changes.any? %></p>
89 :rev => @changeset.identifier) if @changeset.changes.any? %></p>
87
90
88 <div class="changeset-changes">
91 <div class="changeset-changes">
89 <%= render_changeset_changes %>
92 <%= render_changeset_changes %>
90 </div>
93 </div>
91 <% end %>
94 <% end %>
92
95
93 <% content_for :header_tags do %>
96 <% content_for :header_tags do %>
94 <%= stylesheet_link_tag "scm" %>
97 <%= stylesheet_link_tag "scm" %>
95 <% end %>
98 <% end %>
96
99
97 <% html_title("#{l(:label_revision)} #{format_revision(@changeset)}") -%>
100 <% html_title("#{l(:label_revision)} #{format_revision(@changeset)}") -%>
General Comments 0
You need to be logged in to leave comments. Login now