From d65c3d438d28638f3d0af87e5aa2a0519b385f3c Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Fri, 13 May 2011 03:55:21 +0000 Subject: scm: git: show only filename and filesize if setting of reporting last commit is disable (#8365, #7047). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5775 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/repositories/_dir_list.rhtml | 10 ++++++---- app/views/repositories/_dir_list_content.rhtml | 5 ++++- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'app/views') 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 %> -- cgit v1.2.3