socialforge/app/views/issues/_issue_commit_ids.html.erb

12 lines
775 B
Plaintext
Raw Normal View History

<% if @issue_commit_ids %>
<% @issue_commit_ids.each do |commit_id| %>
<div class="btn btn-blue mb5">
<%= link_to commit_id[0,8], {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit_id}, :target => "_blank", :class => "commit_id_value" %>
2016-12-09 20:40:30 +08:00
<% if User.current.admin? || is_project_manager?(User.current.id, @project.id) || User.current.id == @issue.author_id %>
<%= link_to "×", issue_commit_delete_issues_path(:commit_id => commit_id, :project_id => @project.id, :issue_commit_ids => @issue_commit_ids, :issue_id => @issue.try(:id)), :remote => true, :style => "color:#fff;" %>
<% end %>
</div>
<% end %>
<% else %>
<div class="c_grey">暂无</div>
<% end %>