@@ -80,6 +80,10 class Repository < ActiveRecord::Base | |||||
80 | write_attribute(:extra_info, h) |
|
80 | write_attribute(:extra_info, h) | |
81 | end |
|
81 | end | |
82 |
|
82 | |||
|
83 | def report_last_commit | |||
|
84 | true | |||
|
85 | end | |||
|
86 | ||||
83 | def supports_cat? |
|
87 | def supports_cat? | |
84 | scm.supports_cat? |
|
88 | scm.supports_cat? | |
85 | end |
|
89 | end |
@@ -38,6 +38,10 class Repository::Git < Repository | |||||
38 | 'Git' |
|
38 | 'Git' | |
39 | end |
|
39 | end | |
40 |
|
40 | |||
|
41 | def report_last_commit | |||
|
42 | extra_report_last_commit | |||
|
43 | end | |||
|
44 | ||||
41 | def extra_report_last_commit |
|
45 | def extra_report_last_commit | |
42 | return false if extra_info.nil? |
|
46 | return false if extra_info.nil? | |
43 | v = extra_info["extra_report_last_commit"] |
|
47 | v = extra_info["extra_report_last_commit"] |
@@ -3,10 +3,12 | |||||
3 | <tr id="root"> |
|
3 | <tr id="root"> | |
4 | <th><%= l(:field_name) %></th> |
|
4 | <th><%= l(:field_name) %></th> | |
5 | <th><%= l(:field_filesize) %></th> |
|
5 | <th><%= l(:field_filesize) %></th> | |
|
6 | <% if @repository.report_last_commit %> | |||
6 | <th><%= l(:label_revision) %></th> |
|
7 | <th><%= l(:label_revision) %></th> | |
7 | <th><%= l(:label_age) %></th> |
|
8 | <th><%= l(:label_age) %></th> | |
8 | <th><%= l(:field_author) %></th> |
|
9 | <th><%= l(:field_author) %></th> | |
9 | <th><%= l(:field_comments) %></th> |
|
10 | <th><%= l(:field_comments) %></th> | |
|
11 | <% end %> | |||
10 | </tr> |
|
12 | </tr> | |
11 | </thead> |
|
13 | </thead> | |
12 | <tbody> |
|
14 | <tbody> |
@@ -4,7 +4,8 | |||||
4 | <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> |
|
4 | <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> | |
5 | <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> |
|
5 | <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> | |
6 | <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> |
|
6 | <tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>"> | |
7 |
<td style="padding-left: <%=18 * depth%>px;" class=" |
|
7 | <td style="padding-left: <%=18 * depth%>px;" class="<%= | |
|
8 | @repository.report_last_commit ? "filename" : "filename_no_report" %>";> | |||
8 | <% if entry.is_dir? %> |
|
9 | <% if entry.is_dir? %> | |
9 | <span class="expander" onclick="<%= remote_function :url => {:action => 'show', :id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id}, |
|
10 | <span class="expander" onclick="<%= remote_function :url => {:action => 'show', :id => @project, :path => to_path_param(ent_path), :rev => @rev, :depth => (depth + 1), :parent_id => tr_id}, | |
10 | :method => :get, |
|
11 | :method => :get, | |
@@ -19,9 +20,11 | |||||
19 | </td> |
|
20 | </td> | |
20 | <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> |
|
21 | <td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td> | |
21 | <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> |
|
22 | <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> | |
|
23 | <% if @repository.report_last_commit %> | |||
22 | <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> |
|
24 | <td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td> | |
23 | <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> |
|
25 | <td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td> | |
24 | <td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td> |
|
26 | <td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td> | |
25 | <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> |
|
27 | <td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td> | |
|
28 | <% end %> | |||
26 | </tr> |
|
29 | </tr> | |
27 | <% end %> |
|
30 | <% end %> |
@@ -145,10 +145,12 tr.issue.idnt-9 td.subject {padding-left: 12.5em;} | |||||
145 | tr.entry { border: 1px solid #f8f8f8; } |
|
145 | tr.entry { border: 1px solid #f8f8f8; } | |
146 | tr.entry td { white-space: nowrap; } |
|
146 | tr.entry td { white-space: nowrap; } | |
147 | tr.entry td.filename { width: 30%; } |
|
147 | tr.entry td.filename { width: 30%; } | |
|
148 | tr.entry td.filename_no_report { width: 70%; } | |||
148 | tr.entry td.size { text-align: right; font-size: 90%; } |
|
149 | tr.entry td.size { text-align: right; font-size: 90%; } | |
149 | tr.entry td.revision, tr.entry td.author { text-align: center; } |
|
150 | tr.entry td.revision, tr.entry td.author { text-align: center; } | |
150 | tr.entry td.age { text-align: right; } |
|
151 | tr.entry td.age { text-align: right; } | |
151 | tr.entry.file td.filename a { margin-left: 16px; } |
|
152 | tr.entry.file td.filename a { margin-left: 16px; } | |
|
153 | tr.entry.file td.filename_no_report a { margin-left: 16px; } | |||
152 |
|
154 | |||
153 | tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;} |
|
155 | tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;} | |
154 | tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png);} |
|
156 | tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png);} |
General Comments 0
You need to be logged in to leave comments.
Login now