diff options
author | Mark Fletcher <mark@gitlab.com> | 2017-04-07 06:27:35 +0300 |
---|---|---|
committer | Mark Fletcher <mark@gitlab.com> | 2017-05-04 09:11:40 +0300 |
commit | 3ce95e7c16712cbede82f70c3a67916088f42b7e (patch) | |
tree | 9cc6d32eff7b925506a682aa49dd7b3f80046031 /app/views/projects/pages | |
parent | 03f13af588cf2b578a27717db492c216fcafbf9a (diff) |
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.haml | 4 | ||||
-rw-r--r-- | app/views/projects/pages/show.html.haml | 15 |
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' |