summaryrefslogtreecommitdiff
path: root/app/views/projects/pages
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-08 20:53:31 +0800
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-01-31 22:55:32 +0000
commit0168a24064a5748ab0de902a12c0fe9851668fb1 (patch)
tree1f89d2452e3b61f95cec9cdba0148d04555f1d25 /app/views/projects/pages
parentcaedc996bdb37718b8397988662835b3c8163e46 (diff)
downloadgitlab-ce-0168a24064a5748ab0de902a12c0fe9851668fb1.tar.gz
Only show the message if user is not the owner
Closes #323
Diffstat (limited to 'app/views/projects/pages')
-rw-r--r--app/views/projects/pages/_destroy.haml19
1 files changed, 10 insertions, 9 deletions
diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml
index 6a7b6baf767..df5add89545 100644
--- a/app/views/projects/pages/_destroy.haml
+++ b/app/views/projects/pages/_destroy.haml
@@ -1,11 +1,12 @@
-- if can?(current_user, :remove_pages, @project) && @project.pages_deployed?
- .panel.panel-default.panel.panel-danger
- .panel-heading Remove pages
- .errors-holder
- .panel-body
- %p
- Removing the pages will prevent from exposing them to outside world.
- .form-actions
- = link_to 'Remove pages', namespace_project_pages_path(@project.namespace, @project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove"
+- if can?(current_user, :remove_pages, @project)
+ - if @project.pages_deployed?
+ .panel.panel-default.panel.panel-danger
+ .panel-heading Remove pages
+ .errors-holder
+ .panel-body
+ %p
+ Removing the pages will prevent from exposing them to outside world.
+ .form-actions
+ = link_to 'Remove pages', namespace_project_pages_path(@project.namespace, @project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove"
- else
.nothing-here-block Only the project owner can remove pages