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_domains | |
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_domains')
-rw-r--r-- | app/views/projects/pages_domains/_form.html.haml | 35 | ||||
-rw-r--r-- | app/views/projects/pages_domains/new.html.haml | 6 | ||||
-rw-r--r-- | app/views/projects/pages_domains/show.html.haml | 22 |
3 files changed, 63 insertions, 0 deletions
diff --git a/app/views/projects/pages_domains/_form.html.haml b/app/views/projects/pages_domains/_form.html.haml new file mode 100644 index 00000000000..5458f9e7734 --- /dev/null +++ b/app/views/projects/pages_domains/_form.html.haml @@ -0,0 +1,35 @@ += form_for [@project.namespace, @project, @domain], 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_domains/new.html.haml b/app/views/projects/pages_domains/new.html.haml new file mode 100644 index 00000000000..2609df62aac --- /dev/null +++ b/app/views/projects/pages_domains/new.html.haml @@ -0,0 +1,6 @@ +- page_title 'Pages' +%h3.page_title + New Pages Domain +%hr.clearfix +%div + = render 'form' 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 |