socialforge/app/views/issues/_issue_commit_ids_show.html...

20 lines
1.3 KiB
Plaintext
Raw Normal View History

2016-12-14 16:57:56 +08:00
<% if !@issue_commit_ids.blank? %>
<span class="pro_new_conbox_leftspan mb5">关联Commit</span>
<% @issue_commit_ids.each do |commit_id| %>
2016-12-14 17:04:52 +08:00
<div class="btn-commit-issue btn-blue mb5 mr5">
2016-12-14 16:57:56 +08:00
<%= link_to commit_id[0,8], {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit_id}, :target => "_blank", :class => "commit_id_value" %>
<% if @issue %>
<% 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 %>
<% else %>
<% if User.current.member_of?(@project) %>
<%= 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 %>
<% end %>
</div>
<% end %>
<% else %>
<span class="pro_new_conbox_leftspan mb5 fl">关联Commit</span>
<span class="pro_new_conbox_rightspan fl ml10">无</span>
<% end %>