summaryrefslogtreecommitdiffstats
path: root/app/views/repositories/revision.rhtml
blob: 04c0e2108fc8c744b077ffeca4589d7d7602971e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<div class="contextual">
  &#171;
  <% unless @changeset.previous.nil? -%>
    <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %>
  <% else -%>
    <%= l(:label_previous) %>
  <% end -%>
|
  <% unless @changeset.next.nil? -%>
    <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %>
  <% else -%>
    <%= l(:label_next) %>
  <% end -%>
  &#187;&nbsp;
  
  <% form_tag({:controller => 'repositories', :action => 'revision', :id => @project, :rev => nil}, :method => :get) do %>
    <%= text_field_tag 'rev', @rev, :size => 5 %>
    <%= submit_tag 'OK', :name => nil %>
  <% end %>
</div>

<h2><%= l(:label_revision) %> <%= format_revision(@changeset.revision) %></h2>

<p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %>
<em><%= @changeset.committer.to_s.split('<').first %>, <%= format_time(@changeset.committed_on) %></em></p>

<%= textilizable @changeset.comments %>

<% if @changeset.issues.any? %>
<h3><%= l(:label_related_issues) %></h3>
<ul>
<% @changeset.issues.each do |issue| %>
  <li><%= link_to_issue issue %>: <%=h issue.subject %></li>
<% end %>
</ul>
<% end %>

<h3><%= l(:label_attachment_plural) %></h3>
<div style="float:right;">
<div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %>&nbsp;</div>
<div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %>&nbsp;</div>
<div class="square action_D"></div> <div style="float:left;"><%= l(:label_deleted) %>&nbsp;</div>
</div>
<p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p>
<table class="list">
<tbody>
<% @changes.each do |change| %>
<tr class="<%= cycle 'odd', 'even' %>">
<td><div class="square action_<%= change.action %>"></div>
<% if change.action == "D" -%>
    <%= change.path -%>
<% else -%>
    <%= link_to change.path, :action => 'entry', :id => @project, :path => without_leading_slash(change.relative_path), :rev => @changeset.revision -%>
<% end -%>
<%= "(#{change.revision})" unless change.revision.blank?  %></td>
<td align="right">
<% if change.action == "M" %>
<%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => to_path_param(change.relative_path), :rev => @changeset.revision %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<p class="pagination"><%= pagination_links_full @changes_pages %></p>

<% content_for :header_tags do %>
<%= stylesheet_link_tag "scm" %>
<% end %>

<% html_title("#{l(:label_revision)} #{@changeset.revision}") -%>