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

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

31 lines
1.8 KiB
Text
Raw Normal View History

2022-04-04 11:22:00 +05:30
- can_edit_max_page_size=can?(current_user, :update_max_pages_size)
- can_enforce_https_only=Gitlab.config.pages.external_http || Gitlab.config.pages.external_https
- return unless can_edit_max_page_size || can_enforce_https_only
2022-06-21 17:19:12 +05:30
= gitlab_ui_form_for @project, url: project_pages_path(@project), html: { class: 'inline', title: pages_https_only_title } do |f|
2022-04-04 11:22:00 +05:30
- if can_edit_max_page_size
2021-09-30 23:02:18 +05:30
= render_if_exists 'shared/pages/max_pages_size_input', form: f
2020-03-13 15:44:24 +05:30
2022-04-04 11:22:00 +05:30
- if can_enforce_https_only
2020-03-13 15:44:24 +05:30
.form-group
2022-06-21 17:19:12 +05:30
= f.gitlab_ui_checkbox_component :pages_https_only,
s_('GitLabPages|Force HTTPS (requires valid certificates)'),
checkbox_options: { disabled: pages_https_only_disabled? },
label_options: { class: 'label-bold' }
- docs_link_start = "<a href='#{help_page_path('user/project/pages/custom_domains_ssl_tls_certification/index', anchor: 'force-https-for-gitlab-pages-websites')}' target='_blank' rel='noopener noreferrer'>".html_safe
- link_end = '</a>'.html_safe
%p.gl-pl-6
= s_("GitLabPages|When enabled, all attempts to visit your website through HTTP are automatically redirected to HTTPS using a response with status code 301. Requires a valid certificate for all domains. %{docs_link_start}Learn more.%{link_end}").html_safe % { docs_link_start: docs_link_start, link_end: link_end }
2020-03-13 15:44:24 +05:30
2023-06-20 00:43:36 +05:30
- if Feature.enabled?(:pages_unique_domain, @project)
2023-05-27 22:25:52 +05:30
.form-group
= f.fields_for :project_setting do |settings|
= settings.gitlab_ui_checkbox_component :pages_unique_domain_enabled,
s_('GitLabPages|Use unique domain'),
label_options: { class: 'label-bold' }
%p.gl-pl-6
= s_("GitLabPages|When enabled, a unique domain is generated to access pages.").html_safe
2022-04-04 11:22:00 +05:30
.gl-mt-3
2023-05-27 22:25:52 +05:30
= f.submit s_('GitLabPages|Save changes'), pajamas_button: true