summaryrefslogtreecommitdiff
path: root/app/views/projects/pages
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-08-18 23:36:31 +0800
committerJames Edwards-Jones <jedwardsjones@gitlab.com>2017-01-31 22:55:32 +0000
commite6a7eb43b2dda4d47d25b4d7ecc068ba01f5b54d (patch)
tree3595d6a26d4712345415630b41986fd667964a71 /app/views/projects/pages
parent0168a24064a5748ab0de902a12c0fe9851668fb1 (diff)
downloadgitlab-ce-e6a7eb43b2dda4d47d25b4d7ecc068ba01f5b54d.tar.gz
If no pages were deployed, show nothing. Feedback:
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/628#note_14000640
Diffstat (limited to 'app/views/projects/pages')
-rw-r--r--app/views/projects/pages/_destroy.haml8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml
index df5add89545..42d9ef5ccba 100644
--- a/app/views/projects/pages/_destroy.haml
+++ b/app/views/projects/pages/_destroy.haml
@@ -1,5 +1,5 @@
-- if can?(current_user, :remove_pages, @project)
- - if @project.pages_deployed?
+- if @project.pages_deployed?
+ - if can?(current_user, :remove_pages, @project)
.panel.panel-default.panel.panel-danger
.panel-heading Remove pages
.errors-holder
@@ -8,5 +8,5 @@
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
+ - else
+ .nothing-here-block Only the project owner can remove pages