@@ -1,32 +1,32 | |||
|
1 | 1 | <% @entries.each do |entry| %> |
|
2 | 2 | <% tr_id = Digest::MD5.hexdigest(entry.path) |
|
3 | 3 | depth = params[:depth].to_i %> |
|
4 | 4 | <tr id="<%= tr_id %>" class="<%= params[:parent_id] %> entry"> |
|
5 | 5 | <td class="filename"> |
|
6 | 6 | <%= if entry.is_dir? |
|
7 | 7 | link_to_remote h(entry.name), |
|
8 | 8 | {:url => {:action => 'browse', :id => @project, :path => entry.path, :rev => @rev, :depth => (depth + 1), :parent_id => tr_id}, |
|
9 | 9 | :update => { :success => tr_id }, |
|
10 | 10 | :position => :after, |
|
11 | 11 | :success => "scmEntryLoaded('#{tr_id}')", |
|
12 | 12 | :condition => "scmEntryClick('#{tr_id}')" |
|
13 | 13 | }, |
|
14 | 14 | {:href => url_for({:action => 'browse', :id => @project, :path => entry.path, :rev => @rev}), |
|
15 | 15 | :class => ('icon icon-folder'), |
|
16 | 16 | :style => "margin-left: #{18 * depth}px;" |
|
17 | 17 | } |
|
18 | 18 | else |
|
19 | 19 | link_to h(entry.name), |
|
20 | 20 | {:action => (entry.is_dir? ? 'browse' : 'changes'), :id => @project, :path => entry.path, :rev => @rev}, |
|
21 | 21 | :class => 'icon icon-file', |
|
22 | 22 | :style => "margin-left: #{18 * depth}px;" |
|
23 | 23 | end %> |
|
24 | 24 | </td> |
|
25 | 25 | <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
|
26 | 26 | <td class="revision"><%= link_to(entry.lastrev.name, :action => 'revision', :id => @project, :rev => entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %></td> |
|
27 | 27 | <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
|
28 | <td class="author"><%=h(entry.lastrev.author) if entry.lastrev %></td> | |
|
28 | <td class="author"><%=h(entry.lastrev.author.to_s.split('<').first) if entry.lastrev %></td> | |
|
29 | 29 | <% changeset = @project.repository.changesets.find_by_revision(entry.lastrev.identifier) if entry.lastrev %> |
|
30 | 30 | <td class="comments"><%=h truncate(changeset.comments, 50) unless changeset.nil? %></td> |
|
31 | 31 | </tr> |
|
32 | 32 | <% end %> |
@@ -1,28 +1,28 | |||
|
1 | 1 | <% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => path}, :method => :get) do %> |
|
2 | 2 | <table class="list changesets"> |
|
3 | 3 | <thead><tr> |
|
4 | 4 | <th>#</th> |
|
5 | 5 | <th></th> |
|
6 | 6 | <th></th> |
|
7 | 7 | <th><%= l(:label_date) %></th> |
|
8 | 8 | <th><%= l(:field_author) %></th> |
|
9 | 9 | <th><%= l(:field_comments) %></th> |
|
10 | 10 | </tr></thead> |
|
11 | 11 | <tbody> |
|
12 | 12 | <% show_diff = entry && entry.is_file? && revisions.size > 1 %> |
|
13 | 13 | <% line_num = 1 %> |
|
14 | 14 | <% revisions.each do |changeset| %> |
|
15 | 15 | <tr class="changeset <%= cycle 'odd', 'even' %>"> |
|
16 | 16 | <td class="id"><%= link_to changeset.revision, :action => 'revision', :id => project, :rev => changeset.revision %></td> |
|
17 | 17 | <td class="checkbox"><%= radio_button_tag('rev', changeset.revision, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < revisions.size) %></td> |
|
18 | 18 | <td class="checkbox"><%= radio_button_tag('rev_to', changeset.revision, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td> |
|
19 | 19 | <td class="committed_on"><%= format_time(changeset.committed_on) %></td> |
|
20 | <td class="author"><%=h changeset.committer %></td> | |
|
20 | <td class="author"><%=h changeset.committer.to_s.split('<').first %></td> | |
|
21 | 21 | <td class="comments"><%= textilizable(changeset.comments) %></td> |
|
22 | 22 | </tr> |
|
23 | 23 | <% line_num += 1 %> |
|
24 | 24 | <% end %> |
|
25 | 25 | </tbody> |
|
26 | 26 | </table> |
|
27 | 27 | <%= submit_tag(l(:label_view_diff), :name => nil) if show_diff %> |
|
28 | 28 | <% end %> |
@@ -1,28 +1,28 | |||
|
1 | 1 | <h2><%= render :partial => 'navigation', :locals => { :path => @path, :kind => 'file', :revision => @rev } %></h2> |
|
2 | 2 | |
|
3 | 3 | <% colors = Hash.new {|k,v| k[v] = (k.size % 12) } %> |
|
4 | 4 | |
|
5 | 5 | <div class="autoscroll"> |
|
6 | 6 | <table class="filecontent annotate CodeRay"> |
|
7 | 7 | <tbody> |
|
8 | 8 | <% line_num = 1 %> |
|
9 | 9 | <% syntax_highlight(@path, to_utf8(@annotate.content)).each_line do |line| %> |
|
10 | 10 | <% revision = @annotate.revisions[line_num-1] %> |
|
11 | 11 | <tr class="bloc-<%= revision.nil? ? 0 : colors[revision.identifier || revision.revision] %>"> |
|
12 | 12 | <th class="line-num"><%= line_num %></th> |
|
13 | 13 | <td class="revision"> |
|
14 | 14 | <%= (revision.identifier ? link_to(revision.identifier, :action => 'revision', :id => @project, :rev => revision.identifier) : revision.revision) if revision %></td> |
|
15 | <td class="author"><%= h(revision.author) if revision %></td> | |
|
15 | <td class="author"><%= h(revision.author.to_s.split('<').first) if revision %></td> | |
|
16 | 16 | <td class="line-code"><pre><%= line %></pre></td> |
|
17 | 17 | </tr> |
|
18 | 18 | <% line_num += 1 %> |
|
19 | 19 | <% end %> |
|
20 | 20 | </tbody> |
|
21 | 21 | </table> |
|
22 | 22 | </div> |
|
23 | 23 | |
|
24 | 24 | <% html_title(l(:button_annotate)) -%> |
|
25 | 25 | |
|
26 | 26 | <% content_for :header_tags do %> |
|
27 | 27 | <%= stylesheet_link_tag 'scm' %> |
|
28 | 28 | <% end %> |
@@ -1,65 +1,65 | |||
|
1 | 1 | <div class="contextual"> |
|
2 | 2 | « |
|
3 | 3 | <% unless @changeset.previous.nil? -%> |
|
4 | 4 | <%= link_to l(:label_previous), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.previous.revision %> |
|
5 | 5 | <% else -%> |
|
6 | 6 | <%= l(:label_previous) %> |
|
7 | 7 | <% end -%> |
|
8 | 8 | | |
|
9 | 9 | <% unless @changeset.next.nil? -%> |
|
10 | 10 | <%= link_to l(:label_next), :controller => 'repositories', :action => 'revision', :id => @project, :rev => @changeset.next.revision %> |
|
11 | 11 | <% else -%> |
|
12 | 12 | <%= l(:label_next) %> |
|
13 | 13 | <% end -%> |
|
14 | 14 | » |
|
15 | 15 | |
|
16 | 16 | <% form_tag do %> |
|
17 | 17 | <%= text_field_tag 'rev', @rev, :size => 5 %> |
|
18 | 18 | <%= submit_tag 'OK' %> |
|
19 | 19 | <% end %> |
|
20 | 20 | </div> |
|
21 | 21 | |
|
22 | 22 | <h2><%= l(:label_revision) %> <%= @changeset.revision %></h2> |
|
23 | 23 | |
|
24 | 24 | <p><% if @changeset.scmid %>ID: <%= @changeset.scmid %><br /><% end %> |
|
25 | <em><%= @changeset.committer %>, <%= 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 | 27 | <%= textilizable @changeset.comments %> |
|
28 | 28 | |
|
29 | 29 | <% if @changeset.issues.any? %> |
|
30 | 30 | <h3><%= l(:label_related_issues) %></h3> |
|
31 | 31 | <ul> |
|
32 | 32 | <% @changeset.issues.each do |issue| %> |
|
33 | 33 | <li><%= link_to_issue issue %>: <%=h issue.subject %></li> |
|
34 | 34 | <% end %> |
|
35 | 35 | </ul> |
|
36 | 36 | <% end %> |
|
37 | 37 | |
|
38 | 38 | <h3><%= l(:label_attachment_plural) %></h3> |
|
39 | 39 | <div style="float:right;"> |
|
40 | 40 | <div class="square action_A"></div> <div style="float:left;"><%= l(:label_added) %> </div> |
|
41 | 41 | <div class="square action_M"></div> <div style="float:left;"><%= l(:label_modified) %> </div> |
|
42 | 42 | <div class="square action_D"></div> <div style="float:left;"><%= l(:label_deleted) %> </div> |
|
43 | 43 | </div> |
|
44 | 44 | <p><%= link_to(l(:label_view_diff), :action => 'diff', :id => @project, :path => "", :rev => @changeset.revision) if @changeset.changes.any? %></p> |
|
45 | 45 | <table class="list"> |
|
46 | 46 | <tbody> |
|
47 | 47 | <% @changes.each do |change| %> |
|
48 | 48 | <tr class="<%= cycle 'odd', 'even' %>"> |
|
49 | 49 | <td><div class="square action_<%= change.action %>"></div> <%= change.path %> <%= "(#{change.revision})" unless change.revision.blank? %></td> |
|
50 | 50 | <td align="right"> |
|
51 | 51 | <% if change.action == "M" %> |
|
52 | 52 | <%= link_to l(:label_view_diff), :action => 'diff', :id => @project, :path => change.path, :rev => @changeset.revision %> |
|
53 | 53 | <% end %> |
|
54 | 54 | </td> |
|
55 | 55 | </tr> |
|
56 | 56 | <% end %> |
|
57 | 57 | </tbody> |
|
58 | 58 | </table> |
|
59 | 59 | <p class="pagination"><%= pagination_links_full @changes_pages %></p> |
|
60 | 60 | |
|
61 | 61 | <% content_for :header_tags do %> |
|
62 | 62 | <%= stylesheet_link_tag "scm" %> |
|
63 | 63 | <% end %> |
|
64 | 64 | |
|
65 | 65 | <% html_title("#{l(:label_revision)} #{@changeset.revision}") -%> |
General Comments 0
You need to be logged in to leave comments.
Login now