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

75 lines
3.0 KiB
Plaintext
Raw Normal View History

2013-08-01 10:33:49 +08:00
<%= form_tag(
2015-06-12 16:48:43 +08:00
{:controller => 'repositories', :action => 'diff', :id => project,
:repository_id => @repository.identifier_param, :path => to_path_param(path)},
2015-11-27 15:21:58 +08:00
:method => :get
2015-06-12 16:48:43 +08:00
) do %>
<table class="list changesets">
2015-10-29 17:28:23 +08:00
<!--<thead><tr>-->
2015-11-27 15:21:58 +08:00
<!--<th>#</th>-->
<!--<th></th>-->
<!--<th></th>-->
<!--<th><%= l(:label_date) %></th>-->
<!--<th><%= l(:field_author) %></th>-->
<!--<th><%= l(:field_comments) %></th>-->
2015-10-29 17:28:23 +08:00
<!--</tr></thead>-->
2015-06-12 16:48:43 +08:00
<tbody>
2015-11-18 16:11:51 +08:00
2015-06-12 16:48:43 +08:00
<% 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-title">
<strong class="str-truncated">
<a class="commit-row-message"><%= textilizable(truncate_at_line_break(changeset.message)) %></a>
</strong>
2015-11-27 15:21:58 +08:00
<div class="pull-right" title="修订号">
<%= h truncate(changeset.short_id.to_s, :length => 20) %>
</div>
<div class="notes_count">
</div>
</div>
<div class="commit-row-info">
2015-11-27 15:21:58 +08:00
<% 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>
</li>
</ul>
</div>
2015-06-12 16:48:43 +08:00
<% end %>
</tbody>
</table>
<p style="padding-top: 10px;">
2015-10-29 17:28:23 +08:00
<%#= submit_tag(l(:label_view_diff), :name => nil, :class=>"c_blue") if show_diff %>
2015-06-12 16:48:43 +08:00
</p>
2015-10-29 17:28:23 +08:00
2015-11-18 16:11:51 +08:00
<ul class="wlist">
2015-11-27 15:21:58 +08:00
<%= pagination_links_full commits_pages, commits_count, :per_page_links => false, :remote => false, :flag => true %>
2015-11-18 16:11:51 +08:00
</ul>
2013-08-01 10:33:49 +08:00
<% end %>
2015-11-18 16:11:51 +08:00