##// END OF EJS Templates
Fixes links to entries on the revision view (Rails 2.1 compatibility) (#1600)....
Jean-Philippe Lang -
r1634:de3d5a88e4c7
parent child
Show More
@@ -1,71 +1,71
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 l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
4 <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
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 l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
10 <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
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', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %>
16 <% form_tag({:controller => 'repositories', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %>
17 <%= text_field_tag 'rev', @rev, :size => 5 %>
17 <%= text_field_tag 'rev', @rev, :size => 5 %>
18 <%= submit_tag 'OK', :name => nil %>
18 <%= submit_tag 'OK', :name => nil %>
19 <% end %>
19 <% end %>
20 </div>
20 </div>
21
21
22 <h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>
22 <h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>
23
23
24 <p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %>
24 <p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %>
25 <em><%= @changeset.committer.to_s.split('<').first %>, <%= format_time(@changeset.committed_on) %></em></p>
25 <em><%= @changeset.committer.to_s.split('<').first %>, <%= format_time(@changeset.committed_on) %></em></p>
26
26
27 <%= textilizable @changeset.comments %>
27 <%= textilizable @changeset.comments %>
28
28
29 <% if @changeset.issues.any? %>
29 <% if @changeset.issues.any? %>
30 <h3><%= l(:label_related_issues) %></h3>
30 <h3><%= l(:label_related_issues) %></h3>
31 <ul>
31 <ul>
32 <% @changeset.issues.each do |issue| %>
32 <% @changeset.issues.each do |issue| %>
33 <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
33 <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
34 <% end %>
34 <% end %>
35 </ul>
35 </ul>
36 <% end %>
36 <% end %>
37
37
38 <h3><%= l(:label_attachment_plural) %></h3>
38 <h3><%= l(:label_attachment_plural) %></h3>
39 <div style="float:right;">
39 <div style="float:right;">
40 <div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %>&nbsp;</div>
40 <div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %>&nbsp;</div>
41 <div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %>&nbsp;</div>
41 <div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %>&nbsp;</div>
42 <div class="square action_D"></div> <div style="float:left;"><%= l(:label_deleted) %>&nbsp;</div>
42 <div class="square action_D"></div> <div style="float:left;"><%= l(:label_deleted) %>&nbsp;</div>
43 </div>
43 </div>
44 <p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
44 <p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
45 <table class="list">
45 <table class="list">
46 <tbody>
46 <tbody>
47 <% @changes.each do |change| %>
47 <% @changes.each do |change| %>
48 <tr class="<%= cycle 'odd', 'even' %>">
48 <tr class="<%= cycle 'odd', 'even' %>">
49 <td><div class="square action_<%= change.action %>"></div>
49 <td><div class="square action_<%= change.action %>"></div>
50 <% if change.action == "D" -%>
50 <% if change.action == "D" -%>
51 <%= change.path -%>
51 <%= change.path -%>
52 <% else -%>
52 <% else -%>
53 <%= link_to change.path, :action => 'entry', :id => @project, :path => without_leading_slash(change.relative_path), :rev => @changeset.revision -%>
53 <%= link_to change.path, :action => 'entry', :id => @project, :path => to_path_param(change.relative_path), :rev => @changeset.revision -%>
54 <% end -%>
54 <% end -%>
55 <%= "(#{change.revision})" unless change.revision.blank? %></td>
55 <%= "(#{change.revision})" unless change.revision.blank? %></td>
56 <td align="right">
56 <td align="right">
57 <% if change.action == "M" %>
57 <% if change.action == "M" %>
58 <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => to_path_param(change.relative_path), :rev => @changeset.revision %>
58 <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => to_path_param(change.relative_path), :rev => @changeset.revision %>
59 <% end %>
59 <% end %>
60 </td>
60 </td>
61 </tr>
61 </tr>
62 <% end %>
62 <% end %>
63 </tbody>
63 </tbody>
64 </table>
64 </table>
65 <p class="pagination"><%= pagination_links_full @changes_pages %></p>
65 <p class="pagination"><%= pagination_links_full @changes_pages %></p>
66
66
67 <% content_for :header_tags do %>
67 <% content_for :header_tags do %>
68 <%= stylesheet_link_tag "scm" %>
68 <%= stylesheet_link_tag "scm" %>
69 <% end %>
69 <% end %>
70
70
71 <% html_title("#{l(:label_revision)} #{@changeset.revision}") -%>
71 <% html_title("#{l(:label_revision)} #{@changeset.revision}") -%>
General Comments 0
You need to be logged in to leave comments. Login now