From 90c8ee2d69725b3c97614dd0b4b10a99af8eb283 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 9 Dec 2016 21:00:55 +0800 Subject: [PATCH] =?UTF-8?q?issue=E6=96=B0=E5=BB=BA=E7=9A=84=E6=97=B6?= =?UTF-8?q?=E5=80=99commit=E5=85=B3=E8=81=94=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/issues/_issue_commit_ids.html.erb | 10 ++++++++-- app/views/issues/issue_commits.js.erb | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/issues/_issue_commit_ids.html.erb b/app/views/issues/_issue_commit_ids.html.erb index d52998297..745b8ebf9 100644 --- a/app/views/issues/_issue_commit_ids.html.erb +++ b/app/views/issues/_issue_commit_ids.html.erb @@ -2,8 +2,14 @@ <% @issue_commit_ids.each do |commit_id| %>
<%= link_to commit_id[0,8], {:controller => 'repositories', :action => 'commit_diff', :id => @project.id, :changeset => commit_id}, :target => "_blank", :class => "commit_id_value" %> - <% 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;" %> + <% 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 %>
<% end %> diff --git a/app/views/issues/issue_commits.js.erb b/app/views/issues/issue_commits.js.erb index d554ed032..806dc6465 100644 --- a/app/views/issues/issue_commits.js.erb +++ b/app/views/issues/issue_commits.js.erb @@ -1,7 +1,7 @@ var checked = $("input[name='checkbox1[]']:checked").size(); if(checked > 0) { - alert('翻页或搜索后将丢失当前选择的用户数据!'); + alert('翻页或搜索后将丢失当前选择的提交记录!'); } <% if @type %>