diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-14 21:22:44 +0100 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2017-01-31 22:53:58 +0000 |
commit | 7f12cb0eed06ad3f83126a3a8038e7fa658f4eac (patch) | |
tree | 36f2b0b2bed11d901db304df2043ba0eb17340a2 /app/views | |
parent | 84edc9a22f5d858cb02f32d22b66c92fb939378a (diff) | |
download | gitlab-ce-7f12cb0eed06ad3f83126a3a8038e7fa658f4eac.tar.gz |
Split PagesController into PagesController and PagesDomainsController
1. PagesController is used to show all domains and general overview of Pages
2. PagesDomainsController is used to manage pages domains
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/pages/_destroy.haml | 2 | ||||
-rw-r--r-- | app/views/projects/pages/_list.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/pages/index.html.haml | 26 | ||||
-rw-r--r-- | app/views/projects/pages/show.html.haml | 44 | ||||
-rw-r--r-- | app/views/projects/pages_domains/_form.html.haml (renamed from app/views/projects/pages/_form.html.haml) | 2 | ||||
-rw-r--r-- | app/views/projects/pages_domains/new.html.haml (renamed from app/views/projects/pages/new.html.haml) | 0 | ||||
-rw-r--r-- | app/views/projects/pages_domains/show.html.haml | 22 |
7 files changed, 50 insertions, 50 deletions
diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml index c560aca5725..0cd25f82cd4 100644 --- a/app/views/projects/pages/_destroy.haml +++ b/app/views/projects/pages/_destroy.haml @@ -6,4 +6,4 @@ %p Removing the pages will prevent from exposing them to outside world. .form-actions - = link_to 'Remove', remove_pages_namespace_project_pages_path(@project.namespace, @project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove" + = link_to 'Remove pages', namespace_project_pages_path(@project.namespace, @project), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove" diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index e88a001d636..c1a6948a574 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -6,8 +6,8 @@ - @domains.each do |domain| %li .pull-right - = link_to 'Details', namespace_project_page_path(@project.namespace, @project, domain), class: "btn btn-sm btn-grouped" - = link_to 'Remove', namespace_project_page_path(@project.namespace, @project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped" + = link_to 'Details', namespace_project_pages_domain_path(@project.namespace, @project, domain), class: "btn btn-sm btn-grouped" + = link_to 'Remove', namespace_project_pages_domain_path(@project.namespace, @project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped" .clearfix %span= link_to domain.domain, domain.url %p diff --git a/app/views/projects/pages/index.html.haml b/app/views/projects/pages/index.html.haml deleted file mode 100644 index 1a5dbb79830..00000000000 --- a/app/views/projects/pages/index.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -- page_title "Pages" -%h3.page_title - Pages - - - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https - = link_to new_namespace_project_page_path(@project.namespace, @project), class: "btn btn-new pull-right", title: "New Domain" do - %i.fa.fa-plus - New Domain - -%p.light - With GitLab Pages you can host for free your static websites on GitLab. - Combined with the power of GitLab CI and the help of GitLab Runner - you can deploy static pages for your individual projects, your user or your group. - -%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' -- else - = render 'disabled' diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml index 8b7010b75b2..9be6f8678cf 100644 --- a/app/views/projects/pages/show.html.haml +++ b/app/views/projects/pages/show.html.haml @@ -1,22 +1,26 @@ -- page_title "#{@domain.domain}", "Pages Domain" +- page_title "Pages" +%h3.page_title + Pages -%h3.page-title - Pages Domain + - if Gitlab.config.pages.external_http || Gitlab.config.pages.external_https + = link_to new_namespace_project_pages_domain_path(@project.namespace, @project), class: "btn btn-new pull-right", title: "New Domain" do + %i.fa.fa-plus + New Domain -.table-holder - %table.table - %tr - %td - Domain - %td - = link_to @domain.domain, @domain.url - %tr - %td - Certificate - %td - - if @domain.certificate_text - %pre - = @domain.certificate_text - - else - .light - missing +%p.light + With GitLab Pages you can host for free your static websites on GitLab. + Combined with the power of GitLab CI and the help of GitLab Runner + you can deploy static pages for your individual projects, your user or your group. + +%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' +- else + = render 'disabled' diff --git a/app/views/projects/pages/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml index fd411462330..5458f9e7734 100644 --- a/app/views/projects/pages/_form.html.haml +++ b/app/views/projects/pages_domains/_form.html.haml @@ -1,4 +1,4 @@ -= form_for [@domain], url: namespace_project_pages_path(@project.namespace, @project), html: { class: 'form-horizontal fieldset-form' } do |f| += form_for [@project.namespace, @project, @domain], html: { class: 'form-horizontal fieldset-form' } do |f| - if @domain.errors.any? #error_explanation .alert.alert-danger diff --git a/app/views/projects/pages/new.html.haml b/app/views/projects/pages_domains/new.html.haml index 2609df62aac..2609df62aac 100644 --- a/app/views/projects/pages/new.html.haml +++ b/app/views/projects/pages_domains/new.html.haml diff --git a/app/views/projects/pages_domains/show.html.haml b/app/views/projects/pages_domains/show.html.haml new file mode 100644 index 00000000000..8b7010b75b2 --- /dev/null +++ b/app/views/projects/pages_domains/show.html.haml @@ -0,0 +1,22 @@ +- page_title "#{@domain.domain}", "Pages Domain" + +%h3.page-title + Pages Domain + +.table-holder + %table.table + %tr + %td + Domain + %td + = link_to @domain.domain, @domain.url + %tr + %td + Certificate + %td + - if @domain.certificate_text + %pre + = @domain.certificate_text + - else + .light + missing |