socialforge/app/views/repositories/_revisions.html.erb

63 lines
3.0 KiB
Plaintext

<%= form_tag(
{:controller => 'repositories', :action => 'diff', :id => project,
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
:method => :get
) do %>
<table class="list changesets">
<!--<thead><tr>-->
<!--<th>#</th>-->
<!--<th></th>-->
<!--<th></th>-->
<!--<th><%= l(:label_date) %></th>-->
<!--<th><%= l(:field_author) %></th>-->
<!--<th><%= l(:field_comments) %></th>-->
<!--</tr></thead>-->
<tbody>
<% show_diff = revisions.size > 1 %>
<% line_num = 1 %>
<% revisions.each do |changeset| %>
<div class="col-md-10 col-sm-12">
<ul class="bordered-list">
<li class="commit js-toggle-container">
<div class="commit-row-info">
<% if !user_commit_rep(changeset.author_email).nil? %>
<a class="commit-author-link has_tooltip"> <span class="commit-author-name">
<%= image_tag(url_to_avatar(user_commit_rep(changeset.author_email)), :width => "20", :height => "20", :class => "fl portraitRadius mt2 ml4 mr5") %>
<%= link_to user_commit_rep(changeset.author_email), user_path(user_commit_rep(changeset.author_email)), :length => 30 %></span></a>提交于
<div class="committed_ago">
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %>前 </time>&nbsp;
</div>
<% else %>
<span class="commit-author-name"><%= changeset.author_email %></span>提交于
<div class="committed_ago">
<time class="time_ago js-timeago" title="<%= changeset.created_at %>"><%= time_tag(changeset.created_at) %> 前</time>&nbsp;
</div>
<% end %>
</div>
<div style="padding-left:30px;" class="commit-row-title">
<strong class="str-truncated">
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
</strong>
<div class="pull-right" title="修订号">
<%= link_to truncate(changeset.short_id.to_s, :length => 20), :controller => 'repositories', :action => 'revision', :id => repository.project, :repository_id => repository.identifier_param, :rev => rev %>
</div>
<div class="notes_count">
</div>
</div>
</li>
</ul>
</div>
<% end %>
</tbody>
</table>
<p style="padding-top: 10px;">
<%#= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
</p>
<ul class="wlist">
<%= pagination_links_full commits_pages, commits_count, :per_page_links => false, :remote => false, :flag => true %>
</ul>
<% end %>