diff options
author | Robert Speicher <robert@gitlab.com> | 2016-03-24 20:13:53 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-03-24 20:13:53 +0000 |
commit | 3028a7d25a88ccf7352eec2a7238fe555cc770e1 (patch) | |
tree | c01406e68e5482b5d45464fea730c210d6684165 | |
parent | 5a460c3796b8083748747e004ee678045df0aca4 (diff) | |
parent | 35ef7ff6cb9bd4fbc0ebb9cae8bc495d6a9d626e (diff) | |
download | gitlab-ce-3028a7d25a88ccf7352eec2a7238fe555cc770e1.tar.gz |
Merge branch 'issue_14610' into 'master'
Fix cancel button on issuable edit form
See merge request !3392
-rw-r--r-- | app/views/shared/issuable/_form.html.haml | 4 |
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 b01a36265f9..6a42a6e3f58 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -127,7 +127,7 @@ for this project. - if issuable.new_record? - = link_to 'Cancel', namespace_project_issues_path(@project.namespace, @project), class: 'btn btn-cancel' + = link_to 'Cancel', polymorphic_path([@project.namespace, @project, issuable.class]), class: 'btn btn-cancel' - else .pull-right - if current_user.can?(:"destroy_#{issuable.to_ability_name}", @project) @@ -135,4 +135,4 @@ method: :delete, class: 'btn btn-grouped' do = icon('trash-o') Delete - = link_to 'Cancel', namespace_project_issue_path(@project.namespace, @project, issuable), class: 'btn btn-grouped btn-cancel' + = link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel' |