diff --git a/app/models/repository.rb b/app/models/repository.rb index de2720661..00d80fb31 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -80,6 +80,10 @@ class Repository < ActiveRecord::Base write_attribute(:extra_info, h) end + def report_last_commit + true + end + def supports_cat? scm.supports_cat? end diff --git a/app/models/repository/git.rb b/app/models/repository/git.rb index 3c89ba6d5..51a2ca82d 100644 --- a/app/models/repository/git.rb +++ b/app/models/repository/git.rb @@ -38,6 +38,10 @@ class Repository::Git < Repository '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"] diff --git a/app/views/repositories/_dir_list.rhtml b/app/views/repositories/_dir_list.rhtml index 5590652f5..84efcfc27 100644 --- a/app/views/repositories/_dir_list.rhtml +++ b/app/views/repositories/_dir_list.rhtml @@ -3,10 +3,12 @@ <%= l(:field_name) %> <%= l(:field_filesize) %> -<%= l(:label_revision) %> -<%= l(:label_age) %> -<%= l(:field_author) %> -<%= l(:field_comments) %> +<% if @repository.report_last_commit %> +<%= l(:label_revision) %> +<%= l(:label_age) %> +<%= l(:field_author) %> +<%= l(:field_comments) %> +<% end %> diff --git a/app/views/repositories/_dir_list_content.rhtml b/app/views/repositories/_dir_list_content.rhtml index a4e08b046..be7e48a34 100644 --- a/app/views/repositories/_dir_list_content.rhtml +++ b/app/views/repositories/_dir_list_content.rhtml @@ -4,7 +4,8 @@ <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> - +";> <% if entry.is_dir? %> <%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %> <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %> +<% if @repository.report_last_commit %> <%= link_to_revision(changeset, @project) if changeset %> <%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %> <%= changeset.nil? ? h(Redmine::CodesetUtil.replace_invalid_utf8(entry.lastrev.author.to_s.split('<').first)) : changeset.author if entry.lastrev %> <%=h truncate(changeset.comments, :length => 50) unless changeset.nil? %> +<% end %> <% end %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 862ba460b..47eb839c8 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -145,10 +145,12 @@ tr.issue.idnt-9 td.subject {padding-left: 12.5em;} 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);}