summaryrefslogtreecommitdiff
path: root/app/views/projects/pages
diff options
context:
space:
mode:
authorMark Fletcher <mark@gitlab.com>2017-04-07 13:27:35 +1000
committerMark Fletcher <mark@gitlab.com>2017-05-04 14:11:40 +0800
commit3ce95e7c16712cbede82f70c3a67916088f42b7e (patch)
tree9cc6d32eff7b925506a682aa49dd7b3f80046031 /app/views/projects/pages
parent03f13af588cf2b578a27717db492c216fcafbf9a (diff)
downloadgitlab-ce-3ce95e7c16712cbede82f70c3a67916088f42b7e.tar.gz
Disable navigation to Pages config if Pages is disabled
* Regards project-level pages config - Nav link is now shown only if Pages is enabled for instance - Navigation to following controllers denied if Pages disabled: * projects/pages_controller * projects/pages_domains_controller - 'disabled' partial removed + Test for pages_controller introduced
Diffstat (limited to 'app/views/projects/pages')
-rw-r--r--app/views/projects/pages/_disabled.html.haml4
-rw-r--r--app/views/projects/pages/show.html.haml15
2 files changed, 6 insertions, 13 deletions
diff --git a/app/views/projects/pages/_disabled.html.haml b/app/views/projects/pages/_disabled.html.haml
deleted file mode 100644
index ad51fbc6cab..00000000000
--- a/app/views/projects/pages/_disabled.html.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-.panel.panel-default
- .nothing-here-block
- GitLab Pages are disabled.
- Ask your system's administrator to enable it.
diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml
index 259d5bd63d6..b22a54d75c8 100644
--- a/app/views/projects/pages/show.html.haml
+++ b/app/views/projects/pages/show.html.haml
@@ -16,13 +16,10 @@
%hr.clearfix
-- if Gitlab.config.pages.enabled
- = render 'access'
- = render 'use'
- - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
- = render 'list'
- - else
- = render 'no_domains'
- = render 'destroy'
+= render 'access'
+= render 'use'
+- if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
+ = render 'list'
- else
- = render 'disabled'
+ = render 'no_domains'
+= render 'destroy'