summaryrefslogtreecommitdiff
path: root/app/views/projects/pages_domains/show.html.haml
blob: d0b54946f7e47c4f0246beabaf9c6ec1fd6c0f80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
- 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
        = link_to @domain.url do
          = @domain.url
          = icon('external-link')
    %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'