diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-07-25 22:48:15 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-25 22:48:15 -0600 |
commit | 3b06987c34e73ea044c09b7800170ac1dad93b3b (patch) | |
tree | c7b15c0adef153fbe397e72bbfd7015ecf4765a9 /app/views/discussions | |
parent | d76d051b226893a20060c51128e1eb5bfd86fd3f (diff) | |
download | gitlab-ce-3b06987c34e73ea044c09b7800170ac1dad93b3b.tar.gz |
Hide resolve button when not allowed
Diffstat (limited to 'app/views/discussions')
-rw-r--r-- | app/views/discussions/_resolve_all.html.haml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/views/discussions/_resolve_all.html.haml b/app/views/discussions/_resolve_all.html.haml index ddda0b55c14..8b5655af2a1 100644 --- a/app/views/discussions/_resolve_all.html.haml +++ b/app/views/discussions/_resolve_all.html.haml @@ -1,4 +1,8 @@ -%resolve-all{ ":namespace" => "'#{discussion.project.namespace.path}/#{discussion.project.path}'", ":discussion-id" => "'#{discussion.id}'", "inline-template" => true, "v-cloak" => true } - %button.btn.btn-default{ type: "button", "@click" => "resolve", ":disabled" => "loading" } - = icon("spinner spin", "v-show" => "loading") - {{ buttonText }} +- if discussion.can_resolve?(current_user) + %resolve-all{ ":namespace" => "'#{discussion.project.namespace.path}/#{discussion.project.path}'", + ":discussion-id" => "'#{discussion.id}'", + "inline-template" => true, + "v-cloak" => true } + %button.btn.btn-default{ type: "button", "@click" => "resolve", ":disabled" => "loading" } + = icon("spinner spin", "v-show" => "loading") + {{ buttonText }} |