版本库获取动态API修改

This commit is contained in:
huang 2016-08-13 14:42:24 +08:00
parent 93f8ac31f1
commit 9003040d6a
2 changed files with 3 additions and 4 deletions

View File

@ -50,7 +50,6 @@ module RepositoriesHelper
def get_trees_last_changes(gpid, rev, ent_name, g)
begin
tree_changes = g.rep_last_changes(gpid, :rev => rev, :path => ent_name)
commits = g.commit(gpid, tree_changes.commit_id)
rescue Exception => e
puts e
end

View File

@ -31,14 +31,14 @@
</div>
</td>
<td class="tree-author c_grey">
<div class="hidden" title="<%= (latest_changes.author) if latest_changes %>">
<div class="hidden" title="<%= (latest_changes.author_name) if latest_changes %>">
<%= (latest_changes.author_name) if latest_changes %>
</div>
</td>
<td class="tree-age c_grey">
<div class="hidden" title="<%= format_time(latest_changes.created_at) if latest_changes %>">
<div class="hidden" title="<%= format_time(latest_changes.time) if latest_changes %>">
<%# 为了转换UTC时间时差8小时 %>
<%= distance_of_time_in_words(latest_changes.created_at, Time.now + 8.hours) if latest_changes %>
<%= distance_of_time_in_words(latest_changes.time, Time.now) if latest_changes %>
</div>
</td>
</div>