From 4e4cb309a9974e3a448f84f585b7e52f542bc882 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 19 Apr 2016 15:03:47 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E6=9C=80=E6=96=B0=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/_dir_list.html.erb | 2 +- .../repositories/_dir_list_content.html.erb | 52 ++++++++++++------- public/stylesheets/project.css | 6 +-- 3 files changed, 36 insertions(+), 24 deletions(-) diff --git a/app/views/repositories/_dir_list.html.erb b/app/views/repositories/_dir_list.html.erb index 771d4d1ec..384ea36b0 100644 --- a/app/views/repositories/_dir_list.html.erb +++ b/app/views/repositories/_dir_list.html.erb @@ -1,5 +1,5 @@
- +
<%= render :partial => 'dir_list_content' %> diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb index 685a18fa8..b04e40905 100644 --- a/app/views/repositories/_dir_list_content.html.erb +++ b/app/views/repositories/_dir_list_content.html.erb @@ -1,15 +1,15 @@ <% @entries.each do |entry| %> -<% tr_id = Digest::MD5.hexdigest(entry.path) - depth = params[:depth].to_i %> -<% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> -<% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> -<% latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_name) %> + <% tr_id = Digest::MD5.hexdigest(entry.path) + depth = params[:depth].to_i %> + <% ent_path = Redmine::CodesetUtil.replace_invalid_utf8(entry.path) %> + <% ent_name = Redmine::CodesetUtil.replace_invalid_utf8(entry.name) %> + <% latest_changes = get_trees_last_changes(@project.gpid, @rev, ent_name) %> - - + - - + + + <%# if @repository.report_last_commit %> - + + - - + + <%# end %> - + <% end %> diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index a1d372e11..ee6050a8f 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -594,8 +594,8 @@ img.ui-datepicker-trigger { .repos_t_c li{ text-align:center;} .pic_stats{display:block; background:url(../images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;} .tree-age{width:10%; text-align:right;} -.tree-author{width:10%; text-align:right;} -.tree-comments{width:20%; text-align:right;} +.tree-author{width:10%; text-align:left;} +.tree-comments{width:40%; text-align:left;} /* 里程碑 */ @@ -819,7 +819,7 @@ div.changeset { border-bottom: 1px solid #ddd; } tr.entry { border: 1px solid #DDD; } tr.entry td { white-space: nowrap; } tr.entry td.filename { width: 30%; } -tr.entry td.filename_no_report { width: 60%; } +tr.entry td.filename_no_report { width: 40%; } 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; }
"> -<% if entry.is_dir? %> +
+ + - <%#= format_time(latest_changes.first.last_change.split(",")[1]) %> - <%= distance_of_time_in_words(latest_changes.first.last_change.split(",")[1], Time.now) if latest_changes && latest_changes.first.last_change %> + <%= (latest_changes.first.last_change.split(",")[2]) if latest_changes && latest_changes.first.last_change %><%#= entry.author %><%= (latest_changes.first.last_change.split(",")[3]) if latest_changes && latest_changes.first.last_change %><%#=h truncate(entry.changeset.comments, :length => 50) if entry.changeset %>