90dc19e9f0
Creates a helper method that takes body text and a url. The output is a external link with icon. It contains the noopenner noreferrer attributes for security. Usage: external_link(domain.title, domain.url) Add rspec test for ExternalLinkHelper Add changelog for MR 32130
61 lines
2.7 KiB
Text
61 lines
2.7 KiB
Text
- add_to_breadcrumbs _("Pages"), project_pages_path(@project)
|
|
- breadcrumb_title @domain.domain
|
|
- page_title "#{@domain.domain}", _('Pages Domains')
|
|
- dns_record = "#{@domain.domain} CNAME #{@domain.project.pages_subdomain}.#{Settings.pages.host}."
|
|
|
|
- verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled?
|
|
|
|
- if verification_enabled && @domain.unverified?
|
|
= content_for :flash_message do
|
|
.alert.alert-warning
|
|
.container-fluid.container-limited
|
|
= _("This domain is not verified. You will need to verify ownership before access is enabled.")
|
|
|
|
%h3.page-title.with-button
|
|
= link_to _('Edit'), edit_project_pages_domain_path(@project, @domain), class: 'btn btn-success float-right'
|
|
= _("Pages Domain")
|
|
|
|
.table-holder
|
|
%table.table
|
|
%tr
|
|
%td
|
|
= _("Domain")
|
|
%td
|
|
= external_link(@domain.url, @domain.url)
|
|
%tr
|
|
%td
|
|
= _("DNS")
|
|
%td
|
|
.input-group
|
|
= text_field_tag :domain_dns, dns_record , class: "monospace js-select-on-focus form-control", readonly: true
|
|
.input-group-append
|
|
= clipboard_button(target: '#domain_dns', class: 'btn-default input-group-text d-none d-sm-block')
|
|
%p.form-text.text-muted
|
|
= _("To access this domain create a new DNS record")
|
|
|
|
- if verification_enabled
|
|
- verification_record = "#{@domain.verification_domain} TXT #{@domain.keyed_verification_code}"
|
|
%tr
|
|
%td
|
|
= _("Verification status")
|
|
%td
|
|
= form_tag verify_project_pages_domain_path(@project, @domain) do
|
|
.status-badge
|
|
- text, status = @domain.unverified? ? [_('Unverified'), 'badge-danger'] : [_('Verified'), 'badge-success']
|
|
.badge{ class: status }
|
|
= text
|
|
%button.btn.has-tooltip{ type: "submit", data: { container: 'body' }, title: _("Retry verification") }
|
|
= sprite_icon('redo')
|
|
.input-group
|
|
= text_field_tag :domain_verification, verification_record, class: "monospace js-select-on-focus form-control", readonly: true
|
|
.input-group-append
|
|
= clipboard_button(target: '#domain_verification', class: 'btn-default d-none d-sm-block')
|
|
%p.form-text.text-muted
|
|
- link_to_help = link_to(_('verify ownership'), help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index.md', anchor: '4-verify-the-domains-ownership'))
|
|
= _("To %{link_to_help} of your domain, add the above key to a TXT record within to your DNS configuration.").html_safe % { link_to_help: link_to_help }
|
|
|
|
%tr
|
|
%td
|
|
= _("Certificate")
|
|
%td
|
|
= render 'certificate'
|