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/projects/pages | |
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/projects/pages')
-rw-r--r-- | app/views/projects/pages/_destroy.haml | 2 | ||||
-rw-r--r-- | app/views/projects/pages/_form.html.haml | 35 | ||||
-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/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/pages/show.html.haml | 44 |
6 files changed, 27 insertions, 90 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/_form.html.haml b/app/views/projects/pages/_form.html.haml deleted file mode 100644 index fd411462330..00000000000 --- a/app/views/projects/pages/_form.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -= form_for [@domain], url: namespace_project_pages_path(@project.namespace, @project), html: { class: 'form-horizontal fieldset-form' } do |f| - - if @domain.errors.any? - #error_explanation - .alert.alert-danger - - @domain.errors.full_messages.each do |msg| - %p= msg - - .form-group - = f.label :domain, class: 'control-label' do - Domain - .col-sm-10 - = f.text_field :domain, required: true, autocomplete: 'off', class: 'form-control' - %span.help-inline * required - - - if Gitlab.config.pages.external_https - .form-group - = f.label :certificate, class: 'control-label' do - Certificate (PEM) - .col-sm-10 - = f.text_area :certificate, rows: 5, class: 'form-control', value: '' - %span.help-inline Upload a certificate for your domain with all intermediates - - .form-group - = f.label :key, class: 'control-label' do - Key (PEM) - .col-sm-10 - = f.text_area :key, rows: 5, class: 'form-control', value: '' - %span.help-inline Upload a certificate for your domain with all intermediates - - else - .nothing-here-block - Support for custom certificates is disabled. - Ask your system's administrator to enable it. - - .form-actions - = f.submit 'Create New Domain', class: "btn btn-save" 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/new.html.haml b/app/views/projects/pages/new.html.haml deleted file mode 100644 index 2609df62aac..00000000000 --- a/app/views/projects/pages/new.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -- page_title 'Pages' -%h3.page_title - New Pages Domain -%hr.clearfix -%div - = render 'form' 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' |