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