Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-02-10 13:41:22 +0300
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-02-20 18:28:13 +0300
commit5be8f03747eff470e3093e6a3f97c475ddba9a90 (patch)
tree02f675d7f8f439e5925df46f40d2f0c7b8d2a374 /app/views/snippets/_actions.html.haml
parentc89449e6110c2bdf6e1410bae3e7b7d807c5e305 (diff)
Improve performance of User Agent Detail
Diffstat (limited to 'app/views/snippets/_actions.html.haml')
-rw-r--r--app/views/snippets/_actions.html.haml4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/snippets/_actions.html.haml b/app/views/snippets/_actions.html.haml
index 855a995afa9..a7f118d3f7d 100644
--- a/app/views/snippets/_actions.html.haml
+++ b/app/views/snippets/_actions.html.haml
@@ -9,7 +9,7 @@
Delete
= link_to new_snippet_path, class: "btn btn-grouped btn-inverted btn-create", title: "New snippet" do
New snippet
- - if @snippet.submittable_as_spam? && current_user.admin?
+ - if @snippet.submittable_as_spam_by?(current_user)
= link_to 'Submit as spam', mark_as_spam_snippet_path(@snippet), method: :post, class: 'btn btn-grouped btn-spam', title: 'Submit as spam'
.visible-xs-block.dropdown
%button.btn.btn-default.btn-block.append-bottom-0.prepend-top-5{ data: { toggle: "dropdown" } }
@@ -28,6 +28,6 @@
%li
= link_to edit_snippet_path(@snippet) do
Edit
- - if @snippet.submittable_as_spam? && current_user.admin?
+ - if @snippet.submittable_as_spam_by?(current_user)
%li
= link_to 'Submit as spam', mark_as_spam_snippet_path(@snippet), method: :post