write_attribute(:extra_info, h)
end
+ def report_last_commit
+ true
+ end
+
def supports_cat?
scm.supports_cat?
end
'Git'
end
+ def report_last_commit
+ extra_report_last_commit
+ end
+
def extra_report_last_commit
return false if extra_info.nil?
v = extra_info["extra_report_last_commit"]
<tr id="root">
<th><%= l(:field_name) %></th>
<th><%= l(:field_filesize) %></th>
-<th><%= l(:label_revision) %></th>
-<th><%= l(:label_age) %></th>
-<th><%= l(:field_author) %></th>
-<th><%= l(:field_comments) %></th>
+<% if @repository.report_last_commit %>
+<th><%= l(:label_revision) %></th>
+<th><%= l(:label_age) %></th>
+<th><%= l(:field_author) %></th>
+<th><%= l(:field_comments) %></th>
+<% end %>
</tr>
</thead>
<tbody>
<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %>
<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %>
<tr id="<%= tr_id %>" class="<%= h params[:parent_id] %> entry <%= entry.kind %>">
-<td style="padding-left: <%=18 * depth%>px;" class="filename">
+<td style="padding-left: <%=18 * depth%>px;" class="<%=
+ @repository.report_last_commit ? "filename" : "filename_no_report" %>";>
<% if entry.is_dir? %>
<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},
:method => :get,
</td>
<td class="size"><%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %></td>
<% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
+<% if @repository.report_last_commit %>
<td class="revision"><%= link_to_revision(changeset, @project) if changeset %></td>
<td class="age"><%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %></td>
<td class="author"><%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %></td>
<td class="comments"><%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %></td>
+<% end %>
</tr>
<% end %>
tr.entry { border: 1px solid #f8f8f8; }
tr.entry td { white-space: nowrap; }
tr.entry td.filename { width: 30%; }
+tr.entry td.filename_no_report { width: 70%; }
tr.entry td.size { text-align: right; font-size: 90%; }
tr.entry td.revision, tr.entry td.author { text-align: center; }
tr.entry td.age { text-align: right; }
tr.entry.file td.filename a { margin-left: 16px; }
+tr.entry.file td.filename_no_report a { margin-left: 16px; }
tr span.expander {background-image: url(../images/bullet_toggle_plus.png); padding-left: 8px; margin-left: 0; cursor: pointer;}
tr.open span.expander {background-image: url(../images/bullet_toggle_minus.png);}