diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-03-21 19:28:48 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-03-22 12:36:02 +0100 |
commit | d0a7dfd66d2c6e078df450de612ca25dc7be52d4 (patch) | |
tree | d112c2d6f054f3569200035dab6aba7e2d6cc34a /app/views/shared | |
parent | 4999495705c9ee3c78f04875e4a3251b02b3d433 (diff) | |
download | gitlab-ce-d0a7dfd66d2c6e078df450de612ca25dc7be52d4.tar.gz |
Merge branch '2489-soft-delete-issues' into 'master'
Soft delete issuables
Fixes #2489
What still needs to happen: research on the indexes, the gem suggests a [lot of changes](https://github.com/rubysherpas/paranoia#about-indexes) though this is probably a good idea to discuss and I'm unsure on the impact of an omnibus upgrade as I suspect creating about 10 new indexes has a large impact on the downtime.
TODO:
- [x] Also group owners can ***soft*** delete
- [x] Button should be hidden
See merge request !2982
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/issuable/_form.html.haml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 1740b128ee4..551f0cc0b51 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -127,7 +127,11 @@ for this project. - if issuable.new_record? - - cancel_project = issuable.source_project + = link_to 'Cancel', namespace_project_issues_path(@project.namespace, @project), class: 'btn btn-cancel' - else - - cancel_project = issuable.project - = link_to 'Cancel', [cancel_project.namespace.becomes(Namespace), cancel_project, issuable], class: 'btn btn-cancel' + .pull-right + - if current_user.can?(:"destroy_#{issuable.to_ability_name}", @project) + = link_to polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), 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' |