debian-mirror-gitlab/app/views/projects/pages/_list.html.haml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
2.5 KiB
Text
Raw Normal View History

2018-05-09 12:01:36 +05:30
- verification_enabled = Gitlab::CurrentSettings.pages_domain_verification_enabled?
2017-08-17 22:00:37 +05:30
- if can?(current_user, :update_pages, @project) && @domains.any?
2018-11-08 19:23:39 +05:30
.card
.card-header
2020-04-22 19:07:51 +05:30
Domains (#{@domains.size})
2019-02-15 15:39:39 +05:30
%ul.list-group.list-group-flush.pages-domain-list{ class: ("has-verification-status" if verification_enabled) }
2017-08-17 22:00:37 +05:30
- @domains.each do |domain|
2019-02-15 15:39:39 +05:30
%li.pages-domain-list-item.list-group-item.d-flex.justify-content-between
2018-05-09 12:01:36 +05:30
- if verification_enabled
2019-12-21 20:55:43 +05:30
- tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success']
2018-05-09 12:01:36 +05:30
.domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip }
2020-10-24 23:57:45 +05:30
= sprite_icon("status_#{status}" )
2018-05-09 12:01:36 +05:30
.domain-name
2019-12-04 20:38:33 +05:30
= external_link(domain.url, domain.url)
2020-04-22 19:07:51 +05:30
- if domain.certificate
2019-02-15 15:39:39 +05:30
%div
2022-03-02 08:16:31 +05:30
= gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject })
2018-05-09 12:01:36 +05:30
- if domain.expired?
2022-03-02 08:16:31 +05:30
= gl_badge_tag s_('GitLabPages|Expired'), variant: :danger
2018-05-09 12:01:36 +05:30
%div
2021-04-17 20:07:23 +05:30
= link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-confirm btn-inverted"
2021-01-03 14:25:43 +05:30
= link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped"
2020-04-22 19:07:51 +05:30
- if domain.needs_verification?
2019-02-15 15:39:39 +05:30
%li.list-group-item.bs-callout-warning
2020-01-01 13:55:28 +05:30
- details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
2019-12-21 20:55:43 +05:30
- details_link_end = '</a>'.html_safe
= s_('GitLabPages|%{domain} is not verified. To learn how to verify ownership, visit your %{link_start}domain details%{link_end}.').html_safe % { domain: domain.domain,
link_start: details_link_start,
link_end: details_link_end }
2020-04-22 19:07:51 +05:30
- if domain.show_auto_ssl_failed_warning?
%li.list-group-item.bs-callout-warning
- details_link_start = "<a href='#{project_pages_domain_path(@project, domain)}'>".html_safe
- details_link_end = '</a>'.html_safe
= s_("GitLabPages|Something went wrong while obtaining the Let's Encrypt certificate for %{domain}. To retry visit your %{link_start}domain details%{link_end}.").html_safe % { domain: domain.domain,
link_start: details_link_start,
link_end: details_link_end }