diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 15:07:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-30 15:07:51 +0000 |
commit | 4e9acbfba3682c552b3de707c535e6257ef41054 (patch) | |
tree | 8b1fd5f89ad3f1be68d8944815b13bb7d498e4a6 /app/views/projects | |
parent | 506d6dcd7c787ba71a8a53102f3d4fdb6adcfa5e (diff) | |
download | gitlab-ce-4e9acbfba3682c552b3de707c535e6257ef41054.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/mirrors/_mirror_repos_push.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/pages/_list.html.haml | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/app/views/projects/mirrors/_mirror_repos_push.html.haml b/app/views/projects/mirrors/_mirror_repos_push.html.haml index b7c885b4a63..8482424a184 100644 --- a/app/views/projects/mirrors/_mirror_repos_push.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_push.html.haml @@ -1,8 +1,15 @@ - protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|') +- keep_divergent_refs = Feature.enabled?(:keep_divergent_refs, @project) = f.fields_for :remote_mirrors, @project.remote_mirrors.build do |rm_f| = rm_f.hidden_field :enabled, value: '1' = rm_f.hidden_field :url, class: 'js-mirror-url-hidden', required: true, pattern: "(#{protocols}):\/\/.+" = rm_f.hidden_field :only_protected_branches, class: 'js-mirror-protected-hidden' + - if keep_divergent_refs + = rm_f.hidden_field :keep_divergent_refs, class: 'js-mirror-keep-divergent-refs-hidden' = render partial: 'projects/mirrors/ssh_host_keys', locals: { f: rm_f } = render partial: 'projects/mirrors/authentication_method', locals: { f: rm_f } + - if keep_divergent_refs + .form-check.append-bottom-10 + = check_box_tag :keep_divergent_refs, '1', false, class: 'js-mirror-keep-divergent-refs form-check-input' + = label_tag :keep_divergent_refs, 'Keep divergent refs', class: 'form-check-label' diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 6d196b06135..0d40f375926 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -6,6 +6,7 @@ Domains (#{@domains.count}) %ul.list-group.list-group-flush.pages-domain-list{ class: ("has-verification-status" if verification_enabled) } - @domains.each do |domain| + - domain = Gitlab::View::Presenter::Factory.new(domain, current_user: current_user).fabricate! %li.pages-domain-list-item.list-group-item.d-flex.justify-content-between - if verification_enabled - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] @@ -13,20 +14,27 @@ = sprite_icon("status_#{status}", size: 16 ) .domain-name = external_link(domain.url, domain.url) - - if domain.subject + - if domain.certificate %div %span.badge.badge-gray - = s_('GitLabPages|Certificate: %{subject}') % { subject: domain.subject } + = s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject } - if domain.expired? %span.badge.badge-danger = s_('GitLabPages|Expired') %div = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped btn-success btn-inverted" = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn btn-remove btn-sm btn-grouped" - - if verification_enabled && domain.unverified? + - if domain.needs_verification? %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|%{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 } + - 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 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 } |