版本库获取方式修改
This commit is contained in:
parent
37df983009
commit
00f032816c
|
@ -47,9 +47,10 @@ module RepositoriesHelper
|
|||
end
|
||||
|
||||
# 获取文件目录的最新动态
|
||||
def get_trees_last_changes(project_id, rev, ent_name, g)
|
||||
def get_trees_last_changes(gpid, rev, ent_name, g)
|
||||
begin
|
||||
tree_changes = g.rep_last_changes(project_id, :rev => rev, :path => ent_name)
|
||||
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
|
||||
|
|
|
@ -26,19 +26,19 @@
|
|||
</td>
|
||||
<div id="children_tree">
|
||||
<td class="tree-comments c_grey hidden">
|
||||
<div class="hidden" title="<%= (latest_changes.message) if latest_changes && latest_changes.message %>">
|
||||
<%= (latest_changes.message) if latest_changes && latest_changes.message %>
|
||||
<div class="hidden" title="<%= (latest_changes.message) if latest_changes %>">
|
||||
<%= (latest_changes.message) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="tree-author c_grey">
|
||||
<div class="hidden" title="<%= (latest_changes.author) if latest_changes && latest_changes.author %>">
|
||||
<%= (latest_changes.author) if latest_changes && latest_changes.author %>
|
||||
<div class="hidden" title="<%= (latest_changes.author) 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.time) %>">
|
||||
<div class="hidden" title="<%= format_time(latest_changes.created_at) if latest_changes %>">
|
||||
<%# 为了转换UTC时间,时差8小时 %>
|
||||
<%= distance_of_time_in_words(latest_changes.time, Time.now + 8.hours) if latest_changes && latest_changes.time %>
|
||||
<%= distance_of_time_in_words(latest_changes.created_at, Time.now + 8.hours) if latest_changes %>
|
||||
</div>
|
||||
</td>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue