summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_form.html.haml
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-09-02 10:08:22 +0100
committerPhil Hughes <me@iamphill.com>2016-09-02 10:08:22 +0100
commitd2e2da4cb474bdd713eae71df3da644856ce4b81 (patch)
tree370ff22afca4a422577cf277910ab2a6b2990985 /app/views/shared/issuable/_form.html.haml
parent236178c3010cd40709c232b2a3a82f737d8a1eab (diff)
parentfd1741b47970fc52d994367ba38b5d1353d94725 (diff)
downloadgitlab-ce-d2e2da4cb474bdd713eae71df3da644856ce4b81.tar.gz
Merge branch 'master' into revert-c676283b
Diffstat (limited to 'app/views/shared/issuable/_form.html.haml')
-rw-r--r--app/views/shared/issuable/_form.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml
index a54704e9257..ac593d8937a 100644
--- a/app/views/shared/issuable/_form.html.haml
+++ b/app/views/shared/issuable/_form.html.haml
@@ -119,7 +119,7 @@
title: 'Moving an issue will copy the discussion to a different project and close it here. All participants will be notified of the new location.' }
= icon('question-circle')
-- if issuable.is_a?(MergeRequest)
+- if issuable.is_a?(MergeRequest) && !issuable.closed_without_fork?
%hr
- if @merge_request.new_record?
.form-group
@@ -160,7 +160,7 @@
= link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable.class]), class: 'btn btn-cancel'
- else
.pull-right
- - if current_user.can?(:"destroy_#{issuable.to_ability_name}", @project)
+ - if can?(current_user, :"destroy_#{issuable.to_ability_name}", @project)
= link_to 'Delete', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} will be removed! Are you sure?" },
method: :delete, class: 'btn btn-danger btn-grouped'
= link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel'