版本库显示调整,及汉字姓名

This commit is contained in:
huang 2016-11-01 15:24:02 +08:00
parent b27dca74b5
commit a5193cd266
3 changed files with 9 additions and 8 deletions

View File

@ -671,7 +671,7 @@ class ProjectsController < ApplicationController
g = Gitlab.client
begin
result = g.rep_last_changes(gpid, :rev => rev, :path => ent_path)
result = {:message => result.message, :author_name => User.find_by_login(result.author_name).nil? ? result.author_name : User.find_by_login(result.author_name).show_name, :time => distance_of_time_in_words(result.time, Time.now)}
result = {:message => result.message, :author_name => User.find_by_mail(result.author_email).nil? ? result.author_email : User.find_by_mail(result.author_email).show_name, :time => distance_of_time_in_words(result.time, Time.now)}
rescue Exception => e
puts e
end

View File

@ -25,16 +25,17 @@
:class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%>
</td>
<div id="children_tree">
<td class="tree-comments c_grey hidden">
<div class="hidden" id="changes_message_<%= tr_id %>">
<%#= (latest_changes.message) if latest_changes %>
</div>
</td>
<td class="tree-author c_grey">
<div class="hidden" id="changes_author_<%= tr_id %>">
<%#= (latest_changes.author_name) if latest_changes %>
</div>
</td>
<td class="tree-comments c_grey hidden">
<div class="hidden" id="changes_message_<%= tr_id %>">
<%#= (latest_changes.message) if latest_changes %>
</div>
</td>
<td class="tree-age c_grey">
<div class="hidden" id="changes_time_<%= tr_id %>">
<%# 为了转换UTC时间时差8小时 %>

View File

@ -162,7 +162,7 @@ div.thumbnails div {background:#fff;display:inline-block;margin-right:2px;}
.pic_stats{display:block; background:url(/images/public_icon.png) 0px -548px no-repeat; width:20px; height:15px;}
.tree-age{width:15%; text-align:right;}
.tree-author{width:10%; text-align:left;}
.tree-comments{width:40%; text-align:left;}
.tree-comments{width:50%; text-align:left;}
/* 里程碑 */
.roadmap_box{ background:#f8f8f8; width:648px; padding:10px; margin-top:5px; border:1px solid #ddd; color:#555;}
@ -368,7 +368,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: 35%; }
tr.entry td.filename_no_report { width: 25%; }
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; }