diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-20 14:10:13 +0300 |
commit | 0ea3fcec397b69815975647f5e2aa5fe944a8486 (patch) | |
tree | 7979381b89d26011bcf9bdc989a40fcc2f1ed4ff /app/views/admin | |
parent | 72123183a20411a36d607d70b12d57c484394c8e (diff) |
Add latest changes from gitlab-org/gitlab@15-1-stable-eev15.1.0-rc42
Diffstat (limited to 'app/views/admin')
94 files changed, 266 insertions, 267 deletions
diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml index 8b1bbbc17c7..20499a2e3bf 100644 --- a/app/views/admin/abuse_reports/index.html.haml +++ b/app/views/admin/abuse_reports/index.html.haml @@ -1,6 +1,6 @@ - page_title _('Abuse Reports') -%h3.page-title= _('Abuse Reports') +%h1.page-title.gl-font-size-h-display= _('Abuse Reports') .row-content-block.second-block = form_tag admin_abuse_reports_path, method: :get, class: 'filter-form' do diff --git a/app/views/admin/application_settings/_abuse.html.haml b/app/views/admin/application_settings/_abuse.html.haml index 96fb848b568..fbadd26d0c0 100644 --- a/app/views/admin/application_settings/_abuse.html.haml +++ b/app/views/admin/application_settings/_abuse.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: reporting_admin_application_settings_path(anchor: 'js-abuse-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml index f914de138a9..e7204f635e6 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form', id: 'account-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index 201ca830ba4..ba2a2f34d63 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -1,6 +1,6 @@ .settings-content = gitlab_ui_form_for @application_setting, url: ci_cd_admin_application_settings_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true ) %fieldset .form-group @@ -72,7 +72,7 @@ - @plans.each_with_index do |plan, index| .tab-pane{ :id => "plan#{index}", class: index == 0 ? 'active': '' } = form_for plan.actual_limits, url: admin_plan_limits_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' }, method: :post do |f| - = form_errors(plan) + = form_errors(plan, pajamas_alert: true) %fieldset = f.hidden_field(:plan_id, value: plan.id) .form-group diff --git a/app/views/admin/application_settings/_default_branch.html.haml b/app/views/admin/application_settings/_default_branch.html.haml index f5f45d7a6e9..4a06dcbc031 100644 --- a/app/views/admin/application_settings/_default_branch.html.haml +++ b/app/views/admin/application_settings/_default_branch.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-default-branch-name'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) - fallback_branch_name = "<code>#{Gitlab::DefaultBranch.value}</code>" diff --git a/app/views/admin/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml index 6a51d2e39d4..1af4d294c1b 100644 --- a/app/views/admin/application_settings/_diff_limits.html.haml +++ b/app/views/admin/application_settings/_diff_limits.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-merge-request-settings'), html: { class: 'fieldset-form', id: 'merge-request-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_eks.html.haml b/app/views/admin/application_settings/_eks.html.haml index bd6ff9b426f..370d3cea07c 100644 --- a/app/views/admin/application_settings/_eks.html.haml +++ b/app/views/admin/application_settings/_eks.html.haml @@ -3,14 +3,14 @@ .settings-header %h4 = _('Amazon EKS') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Amazon EKS integration allows you to provision EKS clusters from GitLab.') .settings-content = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-eks-settings'), html: { class: 'fieldset-form', id: 'eks-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index fd65d4029f5..774c5665edd 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-email-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml index 1abf8f78060..4d0faf69958 100644 --- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml +++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml @@ -2,15 +2,15 @@ .settings-header %h4 = s_('ExternalAuthorization|External authorization') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded ? _('Collapse') : _('Expand') %p = s_('ExternalAuthorization|External classification policy authorization.') = link_to _('Learn more.'), help_page_path('user/admin_area/settings/external_authorization'), target: '_blank', rel: 'noopener noreferrer' .settings-content = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form', id: 'external-auth-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_floc.html.haml b/app/views/admin/application_settings/_floc.html.haml index 14b1a58c1ad..b5a63aa0847 100644 --- a/app/views/admin/application_settings/_floc.html.haml +++ b/app/views/admin/application_settings/_floc.html.haml @@ -4,7 +4,7 @@ .settings-header %h4 = s_('FloC|Federated Learning of Cohorts') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = s_('FloC|Configure whether you want to participate in FloC.').html_safe @@ -12,7 +12,7 @@ .settings-content = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-floc-settings'), html: { class: 'fieldset-form', id: 'floc-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_git_lfs_limits.html.haml b/app/views/admin/application_settings/_git_lfs_limits.html.haml index b8970a5bcf1..7d47ca9a139 100644 --- a/app/views/admin/application_settings/_git_lfs_limits.html.haml +++ b/app/views/admin/application_settings/_git_lfs_limits.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-git-lfs-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset %h5 diff --git a/app/views/admin/application_settings/_gitaly.html.haml b/app/views/admin/application_settings/_gitaly.html.haml index ade6dac606a..cc2c6dbcb03 100644 --- a/app/views/admin/application_settings/_gitaly.html.haml +++ b/app/views/admin/application_settings/_gitaly.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-gitaly-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index 515b3691324..eb47d177701 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -4,7 +4,7 @@ .settings-header %h4 = _('Gitpod') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p #js-gitpod-settings-help-text{ data: {"message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } } diff --git a/app/views/admin/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml index 21eb4caf579..08a4ebe5c71 100644 --- a/app/views/admin/application_settings/_help_page.html.haml +++ b/app/views/admin/application_settings/_help_page.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-help-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset = render_if_exists 'admin/application_settings/help_text_setting', form: f diff --git a/app/views/admin/application_settings/_import_export_limits.html.haml b/app/views/admin/application_settings/_import_export_limits.html.haml index bc4a1577f90..4e774dd0a1e 100644 --- a/app/views/admin/application_settings/_import_export_limits.html.haml +++ b/app/views/admin/application_settings/_import_export_limits.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-import-export-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset = html_escape(_("Set any rate limit to %{code_open}0%{code_close} to disable the limit.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml index 4362ae9cb9b..9a9038ef48e 100644 --- a/app/views/admin/application_settings/_ip_limits.html.haml +++ b/app/views/admin/application_settings/_ip_limits.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-ip-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset = _("Rate limits can help reduce request volume (like from crawlers or abusive bots).") diff --git a/app/views/admin/application_settings/_issue_limits.html.haml b/app/views/admin/application_settings/_issue_limits.html.haml index 431e2a64c46..64aca50cbe9 100644 --- a/app/views/admin/application_settings/_issue_limits.html.haml +++ b/app/views/admin/application_settings/_issue_limits.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-issue-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_jira_connect_application_key.html.haml b/app/views/admin/application_settings/_jira_connect_application_key.html.haml new file mode 100644 index 00000000000..e395741dcaa --- /dev/null +++ b/app/views/admin/application_settings/_jira_connect_application_key.html.haml @@ -0,0 +1,21 @@ +- expanded = integration_expanded?('jira_connect') + +%section.settings.no-animate#js-jira_connect-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = s_('JiraConnect|GitLab for Jira App') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded ? _('Collapse') : _('Expand') + %p + = s_('JiraConnect|Configure your Jira Connect Application ID.') + = link_to sprite_icon('question-o'), 'https://marketplace.atlassian.com/apps/1221011/gitlab-com-for-jira-cloud', target: '_blank', rel: "noopener noreferrer", class: 'has-tooltip', title: _('More information'), aria: { label: _('GitLab for Jira Cloud') } + + .settings-content + = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-jira-connect-application-id-settings'), html: { class: 'fieldset-form', id: 'jira-connect-application-id-settings' } do |f| + = form_errors(@application_setting) + + %fieldset + .form-group + = f.label :jira_connect_application_key, s_('JiraConnect|Jira Connect Application ID'), class: 'label-bold' + = f.text_field :jira_connect_application_key, class: 'form-control gl-form-input' + = f.submit _('Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_kroki.html.haml b/app/views/admin/application_settings/_kroki.html.haml index 61469d87656..b1dd8a282ec 100644 --- a/app/views/admin/application_settings/_kroki.html.haml +++ b/app/views/admin/application_settings/_kroki.html.haml @@ -3,14 +3,14 @@ .settings-header %h4 = _('Kroki') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Users can render diagrams in AsciiDoc, Markdown, reStructuredText, and Textile documents using Kroki.') = link_to _('Learn more.'), help_page_path('administration/integration/kroki.md'), target: '_blank', rel: 'noopener noreferrer' .settings-content = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-kroki-settings'), html: { class: 'fieldset-form', id: 'kroki-settings' } do |f| - = form_errors(@application_setting) if expanded + = form_errors(@application_setting, pajamas_alert: true) if expanded %fieldset .form-group diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml index a6ed48ef4fe..0477f114bdf 100644 --- a/app/views/admin/application_settings/_localization.html.haml +++ b/app/views/admin/application_settings/_localization.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-localization-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_mailgun.html.haml b/app/views/admin/application_settings/_mailgun.html.haml index 7afb35bc9cb..e84fdc56f93 100644 --- a/app/views/admin/application_settings/_mailgun.html.haml +++ b/app/views/admin/application_settings/_mailgun.html.haml @@ -3,7 +3,7 @@ .settings-header %h4 = _('Mailgun') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Configure the %{link} integration.').html_safe % { link: link_to(_('Mailgun events'), 'https://documentation.mailgun.com/en/latest/user_manual.html#webhooks', target: '_blank', rel: 'noopener noreferrer') } diff --git a/app/views/admin/application_settings/_network_rate_limits.html.haml b/app/views/admin/application_settings/_network_rate_limits.html.haml index f1857a9749a..173e830c7da 100644 --- a/app/views/admin/application_settings/_network_rate_limits.html.haml +++ b/app/views/admin/application_settings/_network_rate_limits.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: anchor), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset = _("Rate limits can help reduce request volume (like from crawlers or abusive bots).") diff --git a/app/views/admin/application_settings/_note_limits.html.haml b/app/views/admin/application_settings/_note_limits.html.haml index 40760b3c45e..b783345b9df 100644 --- a/app/views/admin/application_settings/_note_limits.html.haml +++ b/app/views/admin/application_settings/_note_limits.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-note-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml index 503e7d8afa6..2d91b777a0b 100644 --- a/app/views/admin/application_settings/_outbound.html.haml +++ b/app/views/admin/application_settings/_outbound.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-outbound-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_package_registry.html.haml b/app/views/admin/application_settings/_package_registry.html.haml index 398e63cdfdc..c0fabb1d42e 100644 --- a/app/views/admin/application_settings/_package_registry.html.haml +++ b/app/views/admin/application_settings/_package_registry.html.haml @@ -3,7 +3,7 @@ .settings-header %h4 = _('Package Registry') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _("Control how the GitLab Package Registry functions.") @@ -26,7 +26,7 @@ - @plans.each_with_index do |plan, index| .tab-pane{ :id => "plan#{index}", class: index == 0 ? 'active': '' } = form_for plan.actual_limits, url: admin_plan_limits_path(anchor: 'js-package-settings'), html: { class: 'fieldset-form' }, method: :post do |f| - = form_errors(plan) + = form_errors(plan, pajamas_alert: true) %fieldset = f.hidden_field(:plan_id, value: plan.id) .form-group diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 74903d52f25..23b0d2d2092 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-pages-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group @@ -19,7 +19,7 @@ = f.label :max_pages_size, _('Maximum size of pages (MB)'), class: 'label-bold' = f.number_field :max_pages_size, class: 'form-control gl-form-input' .form-text.text-muted - - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-global-maximum-pages-size-per-project') + - pages_link_url = help_page_path('administration/pages/index', anchor: 'set-maximum-size-of-gitlab-pages-site-in-a-project') - pages_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: pages_link_url } = s_('AdminSettings|Set the maximum size of GitLab Pages per project (0 for unlimited). %{link_start}Learn more.%{link_end}').html_safe % { link_start: pages_link_start, link_end: '</a>'.html_safe } %h5 diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index e0ba8d93fbd..c87d166f8d9 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-performance-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_pipeline_limits.html.haml b/app/views/admin/application_settings/_pipeline_limits.html.haml index e93823172db..3b33c41a924 100644 --- a/app/views/admin/application_settings/_pipeline_limits.html.haml +++ b/app/views/admin/application_settings/_pipeline_limits.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-pipeline-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml index 42914652655..57931544e65 100644 --- a/app/views/admin/application_settings/_plantuml.html.haml +++ b/app/views/admin/application_settings/_plantuml.html.haml @@ -3,7 +3,7 @@ .settings-header %h4 = _('PlantUML') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Render diagrams in your documents using PlantUML.') diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 1f3f67c71c7..00da0f59be4 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-protected-paths-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml index 6a7ec05d206..66003f31104 100644 --- a/app/views/admin/application_settings/_realtime.html.haml +++ b/app/views/admin/application_settings/_realtime.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-realtime-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml index c2087efa650..ef8d3ccc8ab 100644 --- a/app/views/admin/application_settings/_repository_check.html.haml +++ b/app/views/admin/application_settings/_repository_check.html.haml @@ -39,4 +39,8 @@ .form-text.text-muted = html_escape(s_('Number of Git pushes after which %{code_start}git gc%{code_end} is run.')) % { code_start: '<code>'.html_safe, code_end: '</code>'.html_safe } + .sub-section + %h4= s_("AdminSettings|Inactive project deletion") + .js-inactive-project-deletion-form{ data: inactive_projects_deletion_data(@application_setting) } + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index b5fa08aed79..5dc2d322bb3 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: repository_admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .sub-section diff --git a/app/views/admin/application_settings/_search_limits.html.haml b/app/views/admin/application_settings/_search_limits.html.haml index 945c9397f0d..93637b59d60 100644 --- a/app/views/admin/application_settings/_search_limits.html.haml +++ b/app/views/admin/application_settings/_search_limits.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-search-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml index cfd34f6ca15..ece8f50151a 100644 --- a/app/views/admin/application_settings/_sentry.html.haml +++ b/app/views/admin/application_settings/_sentry.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-sentry-settings'), html: { class: 'fieldset-form', id: 'sentry-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %span.text-muted = _('Changing any setting here requires an application restart') diff --git a/app/views/admin/application_settings/_sidekiq_job_limits.html.haml b/app/views/admin/application_settings/_sidekiq_job_limits.html.haml index eaf4bbf4702..a28e6e62e7f 100644 --- a/app/views/admin/application_settings/_sidekiq_job_limits.html.haml +++ b/app/views/admin/application_settings/_sidekiq_job_limits.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-sidekiq-job-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 48f0b9b2c31..870bfbf4184 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form', id: 'signin-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml index 85cf43ba5c2..fccf039533b 100644 --- a/app/views/admin/application_settings/_signup.html.haml +++ b/app/views/admin/application_settings/_signup.html.haml @@ -1,21 +1,3 @@ = form_errors(@application_setting) -#js-signup-form{ data: { host: new_user_session_url(host: Gitlab.config.gitlab.host), - settings_path: general_admin_application_settings_path(anchor: 'js-signup-settings'), - signup_enabled: @application_setting[:signup_enabled].to_s, - require_admin_approval_after_user_signup: @application_setting[:require_admin_approval_after_user_signup].to_s, - send_user_confirmation_email: @application_setting[:send_user_confirmation_email].to_s, - minimum_password_length: @application_setting[:minimum_password_length], - minimum_password_length_min: ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH, - minimum_password_length_max: Devise.password_length.max, - minimum_password_length_help_link: 'https://about.gitlab.com/handbook/security/#gitlab-password-policy-guidelines', - domain_allowlist_raw: @application_setting.domain_allowlist_raw, - new_user_signups_cap: @application_setting[:new_user_signups_cap].to_s, - domain_denylist_enabled: @application_setting[:domain_denylist_enabled].to_s, - denylist_type_raw_selected: (@application_setting.domain_denylist.present? || @application_setting.domain_denylist.blank?).to_s, - domain_denylist_raw: @application_setting.domain_denylist_raw, - email_restrictions_enabled: @application_setting[:email_restrictions_enabled].to_s, - supported_syntax_link_url: 'https://github.com/google/re2/wiki/Syntax', - email_restrictions: @application_setting.email_restrictions.to_s, - after_sign_up_text: @application_setting[:after_sign_up_text].to_s, - pending_user_count: pending_user_count } } +#js-signup-form{ data: signup_form_data } diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 378c1712ae0..e9387ab3f26 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -3,7 +3,7 @@ .settings-header %h4 = _('Snowplow') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('development/snowplow/index') } diff --git a/app/views/admin/application_settings/_sourcegraph.html.haml b/app/views/admin/application_settings/_sourcegraph.html.haml index 391f79e431b..a0cbbecb943 100644 --- a/app/views/admin/application_settings/_sourcegraph.html.haml +++ b/app/views/admin/application_settings/_sourcegraph.html.haml @@ -5,7 +5,7 @@ .settings-header %h4 = _('Sourcegraph') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://sourcegraph.com/' } @@ -17,7 +17,7 @@ .settings-content = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-sourcegraph-settings'), html: { class: 'fieldset-form', id: 'sourcegraph-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml index a4b6e061c43..c5387db59ef 100644 --- a/app/views/admin/application_settings/_terms.html.haml +++ b/app/views/admin/application_settings/_terms.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form', id: 'terms-settings' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml index a62e730ee89..205e14fb8ab 100644 --- a/app/views/admin/application_settings/_third_party_offers.html.haml +++ b/app/views/admin/application_settings/_third_party_offers.html.haml @@ -3,7 +3,7 @@ .settings-header %h4 = _('Customer experience improvement and third-party offers') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Control whether to display customer experience improvement content and third-party offers in GitLab.') diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 8b4ac9b79c8..c9ed2309cec 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -21,7 +21,7 @@ checkbox_options: { disabled: !can_be_configured, data: { qa_selector: 'enable_usage_data_checkbox' } } .form-text.gl-pl-6 - if can_be_configured - %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-preview-trigger', data: { payload_selector: ".#{payload_class}" } }) do = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2') .js-text.gl-display-inline= s_('AdminSettings|Preview payload') %pre.service-data-payload-container.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } diff --git a/app/views/admin/application_settings/_users_api_limits.html.haml b/app/views/admin/application_settings/_users_api_limits.html.haml index 3918c76b12c..f2edb81141d 100644 --- a/app/views/admin/application_settings/_users_api_limits.html.haml +++ b/app/views/admin/application_settings/_users_api_limits.html.haml @@ -1,5 +1,5 @@ = form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-users-api-limits-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) + = form_errors(@application_setting, pajamas_alert: true) %fieldset .form-group diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index e3c044ff979..96dcd7e1111 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -4,8 +4,7 @@ %fieldset = render 'shared/project_creation_levels', f: f, method: :default_project_creation, legend: s_('ProjectCreationLevel|Default project creation protection') = render_if_exists 'admin/application_settings/default_project_deletion_protection_setting', form: f - = render_if_exists 'admin/application_settings/default_delayed_project_deletion_setting', form: f - = render_if_exists 'admin/application_settings/default_project_deletion_adjourned_period_setting', form: f + = render_if_exists 'admin/application_settings/deletion_protection_settings', form: f .form-group.visibility-level-setting = f.label :default_project_visibility, class: 'label-bold' = render('shared/visibility_radios', model_method: :default_project_visibility, form: f, selected_level: @application_setting.default_project_visibility, form_model: Project.new) @@ -63,4 +62,6 @@ %label.label-bold= s_('AdminSettings|Feed token') = f.gitlab_ui_checkbox_component :disable_feed_token, s_('AdminSettings|Disable feed token') + = render_if_exists 'admin/application_settings/globally_allowed_ips', form: f + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_whats_new.html.haml b/app/views/admin/application_settings/_whats_new.html.haml index 70ba994d21e..8ae912d24b7 100644 --- a/app/views/admin/application_settings/_whats_new.html.haml +++ b/app/views/admin/application_settings/_whats_new.html.haml @@ -1,13 +1,8 @@ -= form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-whats-new-settings'), html: { class: 'fieldset-form whats-new-settings' } do |f| - = form_errors(@application_setting) += gitlab_ui_form_for @application_setting, url: preferences_admin_application_settings_path(anchor: 'js-whats-new-settings'), html: { class: 'fieldset-form whats-new-settings' } do |f| + = form_errors(@application_setting, pajamas_alert: true) - whats_new_variants.keys.each do |variant| - .form-check.gl-mb-4 - = f.radio_button :whats_new_variant, variant, class: 'form-check-input' - = f.label :whats_new_variant, value: variant, class: 'form-check-label' do - .font-weight-bold - = whats_new_variants_label(variant) - .option-description - = whats_new_variants_description(variant) + .gl-mb-4 + = f.gitlab_ui_radio_component :whats_new_variant, variant, whats_new_variants_label(variant), help_text: whats_new_variants_description(variant) = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml index a22e67b0522..5e3f0d6f2aa 100644 --- a/app/views/admin/application_settings/ci/_header.html.haml +++ b/app/views/admin/application_settings/ci/_header.html.haml @@ -3,7 +3,7 @@ %h4 = _('Variables') -%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } += render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml index e925175b7ea..b635e7198cb 100644 --- a/app/views/admin/application_settings/ci_cd.html.haml +++ b/app/views/admin/application_settings/ci_cd.html.haml @@ -16,7 +16,7 @@ .settings-header %h4 = _('Continuous Integration and Deployment') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Customize CI/CD settings, including Auto DevOps, shared runners, and job artifacts.') @@ -31,7 +31,7 @@ .settings-header %h4 = _('Container Registry') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Various container registry settings.') @@ -43,7 +43,7 @@ .settings-header %h4 = s_('Runners|Runner registration') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? 'Collapse' : 'Expand' .settings-content = render 'runner_registrars_form' diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 7643f8fa7a7..36b9ad189d8 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -6,7 +6,7 @@ .settings-header %h4 = _('Visibility and access controls') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set default and restrict visibility levels. Configure import sources and git access protocol.') @@ -17,7 +17,7 @@ .settings-header %h4 = _('Account and limit') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set projects and maximum size limits, session duration, user options, and check feature availability for namespace plan.') @@ -28,7 +28,7 @@ .settings-header %h4 = _('Diff limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set size limits for displaying diffs in the browser.') @@ -39,7 +39,7 @@ .settings-header %h4 = _('Sign-up restrictions') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure the way a user creates a new account.') @@ -50,7 +50,7 @@ .settings-header %h4 = _('Sign-in restrictions') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set sign-in restrictions for all users.') @@ -62,7 +62,7 @@ .settings-header %h4 = _('Terms of Service and Privacy Policy') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Add a Terms of Service agreement and Privacy Policy for users of this GitLab instance.') @@ -76,7 +76,7 @@ .settings-header %h4 = _('Web terminal') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set the maximum session time for a web terminal.') @@ -88,7 +88,7 @@ .settings-header %h4 = _('Web IDE') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Manage Web IDE features.') @@ -111,8 +111,11 @@ = render 'admin/application_settings/plantuml' = render 'admin/application_settings/sourcegraph' = render_if_exists 'admin/application_settings/slack' +-# this partial is from JiHu, see details in https://jihulab.com/gitlab-cn/gitlab/-/merge_requests/417 += render_if_exists 'admin/application_settings/dingtalk_integration' = render 'admin/application_settings/third_party_offers' = render 'admin/application_settings/snowplow' = render 'admin/application_settings/eks' = render 'admin/application_settings/floc' = render_if_exists 'admin/application_settings/add_license' += render 'admin/application_settings/jira_connect_application_key' if Feature.enabled?(:jira_connect_oauth, current_user) diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml index 8e4b0b53f28..7cc0ff2c28e 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -8,7 +8,7 @@ .settings-header %h4 = _('Metrics - Prometheus') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Monitor the health and performance of GitLab with Prometheus.') @@ -19,7 +19,7 @@ .settings-header %h4 = _('Metrics - Grafana') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Link to your Grafana instance.') @@ -32,7 +32,7 @@ .settings-header %h4 = _('Profiling - Performance bar') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Enable access to the performance bar for non-administrators in a given group.') @@ -46,7 +46,7 @@ .settings-header#usage-statistics %h4 = _('Usage statistics') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Enable or disable version check and Service Ping.') @@ -58,7 +58,7 @@ .settings-header %h4 = _('Sentry') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure Sentry integration for error tracking') diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index a2497fe122b..f3264f733ab 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -6,7 +6,7 @@ .settings-header %h4 = _('Performance optimization') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Various settings that affect GitLab performance.') @@ -17,7 +17,7 @@ .settings-header %h4 = _('User and IP rate limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set limits for web and API requests.') @@ -29,7 +29,7 @@ .settings-header %h4 = _('Package registry rate limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set rate limits for package registry API requests that supersede the general user and IP rate limits.') @@ -41,7 +41,7 @@ .settings-header %h4 = _('Files API Rate Limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure specific limits for Files API requests that supersede the general user and IP rate limits.') @@ -52,7 +52,7 @@ .settings-header %h4 = _('Search rate limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set rate limits for searches performed by web or API requests.') @@ -63,7 +63,7 @@ .settings-header %h4 = _('Deprecated API rate limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure specific limits for deprecated API requests that supersede the general user and IP rate limits.') @@ -75,7 +75,7 @@ .settings-header %h4 = _('Git LFS Rate Limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure specific limits for Git LFS requests that supersede the general user and IP rate limits.') @@ -88,7 +88,7 @@ %h4 = s_('OutboundRequests|Outbound requests') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = s_('OutboundRequests|Allow requests to the local network from hooks and services.') @@ -100,7 +100,7 @@ .settings-header %h4 = _('Protected paths') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Rate limit access to specified paths.') @@ -113,7 +113,7 @@ .settings-header %h4 = _('Issues Rate Limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Limit the number of issues and epics per minute a user can create through web and API requests.') @@ -125,7 +125,7 @@ .settings-header %h4 = _('Notes rate limit') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set the per-user rate limit for notes created by web or API requests.') @@ -137,7 +137,7 @@ .settings-header %h4 = _('Users API rate limit') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set the per-user rate limit for getting a user by ID via the API.') @@ -149,7 +149,7 @@ .settings-header %h4 = _('Import and export rate limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set per-user rate limits for imports and exports of projects and groups.') @@ -161,7 +161,7 @@ .settings-header %h4 = _('Pipeline creation rate limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Limit the number of pipeline creation requests per minute. This limit includes pipelines created through the UI, the API, and by background processing.') diff --git a/app/views/admin/application_settings/preferences.html.haml b/app/views/admin/application_settings/preferences.html.haml index af4bfd28a01..858f96fc0d0 100644 --- a/app/views/admin/application_settings/preferences.html.haml +++ b/app/views/admin/application_settings/preferences.html.haml @@ -6,7 +6,7 @@ .settings-header %h4 = _('Email') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Various email settings.') @@ -17,7 +17,7 @@ .settings-header %h4 = _("What's new") - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _("Configure %{italic_start}What's new%{italic_end} drawer and content.").html_safe % { italic_start: '<i>'.html_safe, italic_end: '</i>'.html_safe } @@ -28,7 +28,7 @@ .settings-header %h4 = _('Sign-in and Help page') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Additional text for the sign-in and Help page.') @@ -40,7 +40,7 @@ .settings-header %h4 = _('Pages') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = s_('AdminSettings|Size and domain settings for Pages static sites.') @@ -51,7 +51,7 @@ .settings-header %h4 = _('Polling interval multiplier') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Adjust how frequently the GitLab UI polls for updates.') @@ -63,7 +63,7 @@ .settings-header %h4 = _('Gitaly timeouts') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure Gitaly timeouts.') @@ -76,7 +76,7 @@ .settings-header %h4 = _('Localization') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure the default first day of the week and time tracking units.') @@ -87,7 +87,7 @@ .settings-header %h4 = _('Sidekiq job size limits') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Limit the size of Sidekiq jobs stored in Redis.') diff --git a/app/views/admin/application_settings/reporting.html.haml b/app/views/admin/application_settings/reporting.html.haml index ae6243c3b50..b15fcd93d1a 100644 --- a/app/views/admin/application_settings/reporting.html.haml +++ b/app/views/admin/application_settings/reporting.html.haml @@ -6,7 +6,7 @@ .settings-header %h4 = _('Spam and Anti-bot Protection') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure CAPTCHAs, IP address limits, and other anti-spam measures.') @@ -20,7 +20,7 @@ .settings-header %h4 = _('Abuse reports') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Receive notification of abuse reports by email.') diff --git a/app/views/admin/application_settings/repository.html.haml b/app/views/admin/application_settings/repository.html.haml index ce7972827d3..785261b4c7b 100644 --- a/app/views/admin/application_settings/repository.html.haml +++ b/app/views/admin/application_settings/repository.html.haml @@ -6,7 +6,7 @@ .settings-header %h4 = _('Default branch') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = s_('AdminSettings|Set the initial name and protections for the default branch of new repositories created in the instance.') @@ -17,7 +17,7 @@ .settings-header %h4 = _('Repository mirroring') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? 'Collapse' : 'Expand' %p = _('Configure repository mirroring.') @@ -29,7 +29,7 @@ .settings-header %h4 = _('Repository storage') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Configure repository storage.') @@ -41,7 +41,7 @@ .settings-header %h4 = _('Repository maintenance') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p - repository_checks_link_url = help_page_path('administration/repository_checks.md') @@ -56,7 +56,7 @@ .settings-header %h4 = _('External storage for repository static objects') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Serve repository static objects (for example, archives and blobs) from external storage.') diff --git a/app/views/admin/application_settings/service_usage_data.html.haml b/app/views/admin/application_settings/service_usage_data.html.haml index 55c25ca32d5..25c8bd12345 100644 --- a/app/views/admin/application_settings/service_usage_data.html.haml +++ b/app/views/admin/application_settings/service_usage_data.html.haml @@ -8,12 +8,12 @@ %h3= name - if @service_ping_data_present - %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } } - = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2') - .js-text.gl-display-inline= _('Preview payload') - %button.gl-button.btn.btn-default.js-payload-download-trigger{ type: 'button', data: { endpoint: usage_data_admin_application_settings_path(format: :json) } } - = gl_loading_icon(css_class: 'js-spinner gl-display-none gl-mr-2') - .js-text.d-inline= _('Download payload') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-preview-trigger gl-mr-2', data: { payload_selector: ".#{payload_class}" } } ) do + = gl_loading_icon(css_class: 'js-spinner gl-display-none', inline: true) + %span.js-text.gl-display-inline= _('Preview payload') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-payload-download-trigger gl-mr-2', data: { endpoint: usage_data_admin_application_settings_path(format: :json) } } ) do + = gl_loading_icon(css_class: 'js-spinner gl-display-none', inline: true) + %span.js-text.gl-display-inline= _('Download payload') %pre.js-syntax-highlight.code.highlight.gl-mt-2.gl-display-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else = render Pajamas::AlertComponent.new(variant: :warning, diff --git a/app/views/admin/applications/edit.html.haml b/app/views/admin/applications/edit.html.haml index 42f7f6c3d66..10a27fb906f 100644 --- a/app/views/admin/applications/edit.html.haml +++ b/app/views/admin/applications/edit.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title @application.name - page_title _("Edit"), @application.name, _("Applications") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Edit application') - @url = admin_application_path(@application) = render 'form', application: @application diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index 890155ee604..180871e48dd 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -1,6 +1,6 @@ - page_title s_('AdminArea|Instance OAuth applications') -%h3.page-title +%h1.page-title.gl-font-size-h-display = s_('AdminArea|Instance OAuth applications') %p.light - docs_link_path = help_page_path('integration/oauth_provider') diff --git a/app/views/admin/applications/new.html.haml b/app/views/admin/applications/new.html.haml index 731cb51e2e4..b7e28923057 100644 --- a/app/views/admin/applications/new.html.haml +++ b/app/views/admin/applications/new.html.haml @@ -1,7 +1,7 @@ - breadcrumb_title _("Add new application") - page_title _("Add new application") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Add new application") - @url = admin_applications_path = render 'form', application: @application diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml index d9c683cbcc3..212e3eeb951 100644 --- a/app/views/admin/applications/show.html.haml +++ b/app/views/admin/applications/show.html.haml @@ -1,6 +1,6 @@ - page_title @application.name, _("Applications") -%h3.page-title +%h1.page-title.gl-font-size-h-display Application: #{@application.name} = render 'shared/doorkeeper/applications/show', diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index bab9fa02928..6d2cab06010 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -1,6 +1,6 @@ - page_title _("Background Jobs") -%h3.page-title= _('Background Jobs') +%h1.page-title.gl-font-size-h-display= _('Background Jobs') %p.light - sidekiq_link_url = 'http://sidekiq.org/' - sidekiq_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: sidekiq_link_url } diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index 8b657eda0c0..46924393a27 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -2,7 +2,7 @@ - page_title _("Broadcast Messages") - targeted_broadcast_messages_enabled = Feature.enabled?(:role_targeted_broadcast_messages) -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Broadcast Messages') %p.light = _('Use banners and notifications to notify your users about scheduled maintenance, recent upgrades, and more.') @@ -43,7 +43,7 @@ = message.target_path %td = message.broadcast_type.capitalize - %td.gl-white-space-nowrap - = link_to sprite_icon('pencil-square', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-icon gl-button' - = link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-icon gl-button btn-danger ml-2' + %td.gl-white-space-nowrap< + = link_to sprite_icon('pencil', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-icon gl-button' + = link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-icon gl-button btn-danger gl-ml-3' = paginate @broadcast_messages, theme: 'gitlab' diff --git a/app/views/admin/dashboard/_security_newsletter_callout.html.haml b/app/views/admin/dashboard/_security_newsletter_callout.html.haml index 4b1303cc97c..76bfa347480 100644 --- a/app/views/admin/dashboard/_security_newsletter_callout.html.haml +++ b/app/views/admin/dashboard/_security_newsletter_callout.html.haml @@ -2,11 +2,11 @@ = render Pajamas::AlertComponent.new(variant: :tip, title: s_('AdminArea|Get security updates from GitLab and stay up to date'), - alert_class: 'js-security-newsletter-callout', - alert_data: { feature_id: Users::CalloutsHelper::SECURITY_NEWSLETTER_CALLOUT, - dismiss_endpoint: callouts_path, - defer_links: 'true' }, - close_button_data: { testid: 'close-security-newsletter-callout' }) do |c| + alert_options: { class: 'js-security-newsletter-callout', + data: { feature_id: Users::CalloutsHelper::SECURITY_NEWSLETTER_CALLOUT, + dismiss_endpoint: callouts_path, + defer_links: 'true' }}, + close_button_options: { data: { testid: 'close-security-newsletter-callout' }}) do |c| = c.body do = s_('AdminArea|Sign up for the GitLab Security Newsletter to get notified for security updates.') = c.actions do diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 69033d274a2..88fbbb28201 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -3,8 +3,8 @@ - billable_users_url = help_page_path('subscriptions/self_managed/index', anchor: 'billable-users') - billable_users_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer nofollow">'.html_safe % { url: billable_users_url } -= render_if_exists 'shared/manual_renewal_banner' = render_if_exists 'shared/manual_quarterly_reconciliation_banner' += render_if_exists 'shared/submit_license_usage_data_banner' = render_if_exists 'shared/qrtly_reconciliation_alert' = render 'admin/dashboard/security_newsletter_callout' @@ -22,22 +22,24 @@ .admin-dashboard.gl-mt-3 .h3.gl-mb-5.gl-mt-0= _('Instance overview') .row + - component_params = { body_options: { class: 'gl-display-flex gl-justify-content-space-between gl-align-items-center gl-p-6' }, + footer_options: { class: 'gl-bg-transparent'} } .col-md-4.gl-mb-6 - .gl-card - .gl-card-body.d-flex.justify-content-between.align-items-center.gl-p-6 + = render Pajamas::CardComponent.new(**component_params) do |c| + = c.body do %span .d-flex.align-items-center = sprite_icon('project', size: 16, css_class: 'gl-text-gray-700') %h3.gl-m-0.gl-ml-3= approximate_count_with_delimiters(@counts, Project) .gl-mt-3.text-uppercase= s_('AdminArea|Projects') = link_to(s_('AdminArea|New project'), new_project_path, class: "btn gl-button btn-default") - .gl-card-footer.gl-bg-transparent + = c.footer do .d-flex.align-items-center = link_to(s_('AdminArea|View latest projects'), admin_projects_path) - = sprite_icon('angle-right', size: 12, css_class: 'gl-text-gray-700 gl-ml-2') + = sprite_icon('chevron-right', size: 12, css_class: 'gl-text-gray-700 gl-ml-2') .col-md-4.gl-mb-6 - .gl-card - .gl-card-body.d-flex.justify-content-between.align-items-center.gl-p-6 + = render Pajamas::CardComponent.new(**component_params) do |c| + = c.body do %span .d-flex.align-items-center = sprite_icon('users', size: 16, css_class: 'gl-text-gray-700') @@ -54,29 +56,29 @@ = s_('AdminArea|Users') = link_to(s_('AdminArea|Users statistics'), admin_dashboard_stats_path, class: "text-capitalize gl-ml-2") = link_to(s_('AdminArea|New user'), new_admin_user_path, class: "btn gl-button btn-default") - .gl-card-footer.gl-bg-transparent + = c.footer do .d-flex.align-items-center = link_to(s_('AdminArea|View latest users'), admin_users_path) - = sprite_icon('angle-right', size: 12, css_class: 'gl-text-gray-700 gl-ml-2') + = sprite_icon('chevron-right', size: 12, css_class: 'gl-text-gray-700 gl-ml-2') .col-md-4.gl-mb-6 - .gl-card - .gl-card-body.d-flex.justify-content-between.align-items-center.gl-p-6 + = render Pajamas::CardComponent.new(**component_params) do |c| + = c.body do %span .d-flex.align-items-center = sprite_icon('group', size: 16, css_class: 'gl-text-gray-700') %h3.gl-m-0.gl-ml-3= approximate_count_with_delimiters(@counts, Group) .gl-mt-3.text-uppercase= s_('AdminArea|Groups') = link_to(s_('AdminArea|New group'), new_admin_group_path, class: "btn gl-button btn-default") - .gl-card-footer.gl-bg-transparent + = c.footer do .d-flex.align-items-center = link_to(s_('AdminArea|View latest groups'), admin_groups_path) - = sprite_icon('angle-right', size: 12, css_class: 'gl-text-gray-700 gl-ml-2') + = sprite_icon('chevron-right', size: 12, css_class: 'gl-text-gray-700 gl-ml-2') .row .col-md-4.gl-mb-6 #js-admin-statistics-container .col-md-4.gl-mb-6 - .gl-card - .gl-card-body + = render Pajamas::CardComponent.new do |c| + = c.body do %h4= s_('AdminArea|Features') = feature_entry(_('Sign up'), href: general_admin_application_settings_path(anchor: 'js-signup-settings'), @@ -114,8 +116,8 @@ href: admin_runners_path, enabled: Gitlab.config.gitlab_ci.shared_runners_enabled) .col-md-4.gl-mb-6 - .gl-card - .gl-card-body + = render Pajamas::CardComponent.new do |c| + = c.body do %h4 = s_('AdminArea|Components') - if show_version_check? @@ -171,8 +173,8 @@ = link_to _("Gitaly Servers"), admin_gitaly_servers_path .row .col-md-4.gl-mb-6 - .gl-card - .gl-card-body + = render Pajamas::CardComponent.new do |c| + = c.body do %h4= s_('AdminArea|Latest projects') - @projects.each do |project| .gl-display-flex.gl-py-3 @@ -181,8 +183,8 @@ %span.gl-white-space-nowrap.gl-text-right #{time_ago_with_tooltip(project.created_at)} .col-md-4.gl-mb-6 - .gl-card - .gl-card-body + = render Pajamas::CardComponent.new do |c| + = c.body do %h4= s_('AdminArea|Latest users') - @users.each do |user| .gl-display-flex.gl-py-3 @@ -192,8 +194,8 @@ %span.gl-white-space-nowrap.gl-text-right #{time_ago_with_tooltip(user.created_at)} .col-md-4.gl-mb-6 - .gl-card - .gl-card-body + = render Pajamas::CardComponent.new do |c| + = c.body do %h4= s_('AdminArea|Latest groups') - @groups.each do |group| .gl-display-flex.gl-py-3 diff --git a/app/views/admin/deploy_keys/edit.html.haml b/app/views/admin/deploy_keys/edit.html.haml index f85b37b3640..12a1c0c3de2 100644 --- a/app/views/admin/deploy_keys/edit.html.haml +++ b/app/views/admin/deploy_keys/edit.html.haml @@ -1,5 +1,5 @@ - page_title _('Edit Deploy Key') -%h3.page-title= _('Edit public deploy key') +%h1.page-title.gl-font-size-h-display= _('Edit public deploy key') %hr %div diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml index fe2bc8530f7..74882900756 100644 --- a/app/views/admin/deploy_keys/new.html.haml +++ b/app/views/admin/deploy_keys/new.html.haml @@ -1,5 +1,5 @@ - page_title _('New Deploy Key') -%h3.page-title= _('New public deploy key') +%h1.page-title.gl-font-size-h-display= _('New public deploy key') %hr %div diff --git a/app/views/admin/gitaly_servers/index.html.haml b/app/views/admin/gitaly_servers/index.html.haml index 0b06f145687..5bd4e066409 100644 --- a/app/views/admin/gitaly_servers/index.html.haml +++ b/app/views/admin/gitaly_servers/index.html.haml @@ -1,7 +1,7 @@ - breadcrumb_title _("Gitaly Servers") - page_title _("Gitaly Servers") -%h3.page-title= _("Gitaly Servers") +%h1.page-title.gl-font-size-h-display= _("Gitaly Servers") %hr .gitaly_servers - if @gitaly_servers.any? diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 944d7bfced0..43a8d56d584 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for [:admin, @group] do |f| - = form_errors(@group) + = form_errors(@group, pajamas_alert: true) = render 'shared/group_form', f: f = render 'shared/group_form_description', f: f diff --git a/app/views/admin/groups/edit.html.haml b/app/views/admin/groups/edit.html.haml index 8e9e1a58a17..2a1e6b8f637 100644 --- a/app/views/admin/groups/edit.html.haml +++ b/app/views/admin/groups/edit.html.haml @@ -1,4 +1,4 @@ - page_title _("Edit"), @group.name, _("Groups") -%h3.page-title= _('Edit group: %{group_name}') % { group_name: @group.name } +%h1.page-title.gl-font-size-h-display= _('Edit group: %{group_name}') % { group_name: @group.name } %hr = render 'form', visibility_level: @group.visibility_level diff --git a/app/views/admin/groups/new.html.haml b/app/views/admin/groups/new.html.haml index 553e8638e52..a98c685281d 100644 --- a/app/views/admin/groups/new.html.haml +++ b/app/views/admin/groups/new.html.haml @@ -1,4 +1,4 @@ - page_title _("New Group") -%h3.page-title= _('New group') +%h1.page-title.gl-font-size-h-display= _('New group') %hr = render 'form', visibility_level: default_group_visibility diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 39b2fa41c80..a57d3170cbd 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -4,11 +4,11 @@ - page_title @group.name, _("Groups") - current_user_is_group_owner = @group && @group.has_owner?(current_user) -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Group: %{group_name}') % { group_name: @group.full_name } = link_to admin_group_edit_path(@group), class: "btn btn-default gl-button float-right", data: { qa_selector: 'edit_group_link' } do - = sprite_icon('pencil-square', css_class: 'gl-icon') + = sprite_icon('pencil', css_class: 'gl-icon gl-mr-2') = _('Edit') %hr .row diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index a289cea0d5a..98427cb6419 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -1,7 +1,7 @@ - page_title _('Health Check') - no_errors = @errors.blank? -%h3.page-title= page_title +%h1.page-title.gl-font-size-h-display= page_title .bs-callout.clearfix .float-left %p @@ -23,8 +23,8 @@ %code= metrics_url(token: Gitlab::CurrentSettings.health_check_access_token) = render_if_exists 'admin/health_check/health_check_url' %hr -.gl-card - .gl-card-header += render Pajamas::CardComponent.new do |c| + = c.header do Current Status: - if no_errors = sprite_icon('check', css_class: 'cgreen') @@ -32,7 +32,7 @@ - else = sprite_icon('warning-solid', css_class: 'cred') #{ s_('HealthCheck|Unhealthy') } - .gl-card-body + = c.body do - if no_errors #{ s_('HealthCheck|No Health Problems Detected') } - else diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml index ca2737ca56f..6fcaf2ea152 100644 --- a/app/views/admin/hook_logs/show.html.haml +++ b/app/views/admin/hook_logs/show.html.haml @@ -1,9 +1,12 @@ - page_title _('Request details') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Request details") %hr -= link_to _("Resend Request"), retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn gl-button btn-default float-right gl-ml-3" +- if @hook_log.oversize? + = button_tag _("Resend Request"), class: "btn gl-button btn-default float-right gl-ml-3 has-tooltip", disabled: true, title: _("Request data is too large") +- else + = link_to _("Resend Request"), retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn gl-button btn-default float-right gl-ml-3" = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } diff --git a/app/views/admin/hooks/_form.html.haml b/app/views/admin/hooks/_form.html.haml index a309e874317..cf3b6e6e0e0 100644 --- a/app/views/admin/hooks/_form.html.haml +++ b/app/views/admin/hooks/_form.html.haml @@ -1,4 +1,4 @@ -= form_errors(hook) += form_errors(hook, pajamas_alert: true) .form-group = form.label :url, _('URL'), class: 'label-bold' diff --git a/app/views/admin/identities/_form.html.haml b/app/views/admin/identities/_form.html.haml index 5c62cff27c7..ba7687db9c7 100644 --- a/app/views/admin/identities/_form.html.haml +++ b/app/views/admin/identities/_form.html.haml @@ -14,5 +14,5 @@ = f.text_field :extern_uid, class: 'form-control', required: true .form-actions - = f.submit _('Save changes'), class: "gl-button btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/identities/edit.html.haml b/app/views/admin/identities/edit.html.haml index 0fd1f2f547f..54cc9139aca 100644 --- a/app/views/admin/identities/edit.html.haml +++ b/app/views/admin/identities/edit.html.haml @@ -2,7 +2,7 @@ - add_to_breadcrumbs @user.name, admin_user_identities_path(@user) - breadcrumb_title _('Edit Identity') - page_title _("Edit"), @identity.provider, _("Identities"), @user.name, _("Users") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Edit identity for %{user_name}') % { user_name: @user.name } %hr diff --git a/app/views/admin/identities/index.html.haml b/app/views/admin/identities/index.html.haml index a4f1ce4afc0..b4dd92bf15c 100644 --- a/app/views/admin/identities/index.html.haml +++ b/app/views/admin/identities/index.html.haml @@ -3,7 +3,7 @@ - page_title _("Identities"), @user.name, _("Users") = render 'admin/users/head' -= link_to _('New identity'), new_admin_user_identity_path, class: 'float-right gl-button btn btn-success' += link_to _('New identity'), new_admin_user_identity_path, class: 'float-right gl-button btn-confirm' - if @identities.present? .table-holder %table.table diff --git a/app/views/admin/identities/new.html.haml b/app/views/admin/identities/new.html.haml index b4f37057c51..d3e7bb8a370 100644 --- a/app/views/admin/identities/new.html.haml +++ b/app/views/admin/identities/new.html.haml @@ -2,6 +2,6 @@ - add_to_breadcrumbs @user.name, admin_user_identities_path(@user) - breadcrumb_title _('New Identity') - page_title _('New Identity') -%h3.page-title= _('New identity') +%h1.page-title.gl-font-size-h-display= _('New identity') %hr = render 'form' diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index 670628f7463..667c90f0228 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -4,14 +4,17 @@ - breadcrumb_title _("Jobs") - page_title _("Jobs") -.top-area.scrolling-tabs-container.inner-page-scroll-tabs - - build_path_proc = ->(scope) { admin_jobs_path(scope: scope) } - = render "shared/builds/tabs", build_path_proc: build_path_proc, all_builds: @all_builds, scope: @scope +.top-area + .scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0.gl-w-full + .fade-left= sprite_icon('chevron-lg-left', size: 12) + .fade-right= sprite_icon('chevron-lg-right', size: 12) + - build_path_proc = ->(scope) { admin_jobs_path(scope: scope) } + = render "shared/builds/tabs", build_path_proc: build_path_proc, all_builds: @all_builds, scope: @scope - if @all_builds.running_or_pending.any? #js-stop-jobs-modal .nav-controls - %button#js-stop-jobs-button.btn.gl-button.btn-danger{ data: { url: cancel_all_admin_jobs_path } } + = render Pajamas::ButtonComponent.new(variant: :danger, button_options: { id: 'js-stop-jobs-button', data: { url: cancel_all_admin_jobs_path } }) do = s_('AdminArea|Stop all jobs') .row-content-block.second-block diff --git a/app/views/admin/labels/edit.html.haml b/app/views/admin/labels/edit.html.haml index 44dd2b6a646..80112595adf 100644 --- a/app/views/admin/labels/edit.html.haml +++ b/app/views/admin/labels/edit.html.haml @@ -1,7 +1,7 @@ - add_to_breadcrumbs _("Labels"), admin_labels_path - breadcrumb_title _("Edit Label") - page_title _("Edit"), @label.name, _("Labels") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Edit Label') %hr = render 'shared/labels/form', url: admin_label_path(@label), back_path: admin_labels_path diff --git a/app/views/admin/labels/index.html.haml b/app/views/admin/labels/index.html.haml index 66fd18e1b76..21b19236683 100644 --- a/app/views/admin/labels/index.html.haml +++ b/app/views/admin/labels/index.html.haml @@ -3,7 +3,7 @@ %div = link_to new_admin_label_path, class: "float-right btn gl-button btn-confirm" do = _('New label') - %h3.page-title + %h1.page-title.gl-font-size-h-display = _('Labels') %hr - if @labels.present? diff --git a/app/views/admin/labels/new.html.haml b/app/views/admin/labels/new.html.haml index 5166bdb4d20..76f9eee717e 100644 --- a/app/views/admin/labels/new.html.haml +++ b/app/views/admin/labels/new.html.haml @@ -1,5 +1,5 @@ - page_title _("New Label") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New Label') %hr = render 'shared/labels/form', url: admin_labels_path, back_path: admin_labels_path diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index f947e174990..f23a688dd48 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -1,14 +1,18 @@ - page_title _('Projects') - params[:visibility_level] ||= [] -.top-area.scrolling-tabs-container.inner-page-scroll-tabs - = gl_tabs_nav({ class: 'gl-border-b-0 gl-overflow-x-auto gl-flex-grow-1 gl-flex-nowrap gl-webkit-scrollbar-display-none' }) do - = gl_tab_link_to _('All'), admin_projects_path(visibility_level: nil), { item_active: params[:visibility_level].empty? } - = gl_tab_link_to _('Private'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) - = gl_tab_link_to _('Internal'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) - = gl_tab_link_to _('Public'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) +.top-area + .scrolling-tabs-container.inner-page-scroll-tabs.gl-flex-grow-1.gl-min-w-0.gl-w-full + .fade-left= sprite_icon('chevron-lg-left', size: 12) + .fade-right= sprite_icon('chevron-lg-right', size: 12) + = gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-tabs-nav nav gl-tabs-nav' }) do + = gl_tab_link_to _('All'), admin_projects_path(visibility_level: nil), { item_active: params[:visibility_level].empty? } + = gl_tab_link_to _('Private'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PRIVATE) + = gl_tab_link_to _('Internal'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::INTERNAL) + = gl_tab_link_to _('Public'), admin_projects_path(visibility_level: Gitlab::VisibilityLevel::PUBLIC) - .nav-controls + + .nav-controls.gl-pl-2 .search-holder = render 'shared/projects/search_form', autofocus: true, admin_view: true - current_namespace = _('Namespace') @@ -22,6 +26,5 @@ = render 'shared/projects/dropdown' = link_to new_project_path, class: 'gl-button btn btn-confirm' do = _('New Project') - = button_tag _("Search"), class: "gl-button btn btn-confirm btn-search hide" = render 'projects' diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 16f6e71d79b..6921c051361 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -5,18 +5,18 @@ - @content_class = "admin-projects" - current_user_is_group_owner = @group && @group.has_owner?(current_user) -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Project: %{name}') % { name: @project.full_name } = link_to edit_project_path(@project), class: "btn btn-default gl-button float-right" do - = sprite_icon('pencil-square', css_class: 'gl-icon') + = sprite_icon('pencil', css_class: 'gl-icon gl-mr-2') = _('Edit') %hr - if @project.last_repository_check_failed? .row .col-md-12 = render Pajamas::AlertComponent.new(variant: :danger, - alert_class: 'gl-mb-5', - alert_data: { testid: 'last-repository-check-failed-alert' }) do |c| + alert_options: { class: 'gl-mb-5', + data: { testid: 'last-repository-check-failed-alert' }}) do |c| = c.body do - last_check_message = _("Last repository check (%{last_check_timestamp}) failed. See the 'repocheck.log' file for error messages.") - last_check_message = last_check_message % { last_check_timestamp: time_ago_with_tooltip(@project.last_repository_check_at) } diff --git a/app/views/admin/spam_logs/index.html.haml b/app/views/admin/spam_logs/index.html.haml index 2a36c991ed2..c974f455112 100644 --- a/app/views/admin/spam_logs/index.html.haml +++ b/app/views/admin/spam_logs/index.html.haml @@ -1,5 +1,5 @@ - page_title _("Spam Logs") -%h3.page-title= _('Spam Logs') +%h1.page-title.gl-font-size-h-display= _('Spam Logs') %hr - if @spam_logs.present? .table-holder diff --git a/app/views/admin/topics/_form.html.haml b/app/views/admin/topics/_form.html.haml index 9b9d97950cc..1c1bc61aef2 100644 --- a/app/views/admin/topics/_form.html.haml +++ b/app/views/admin/topics/_form.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for @topic, url: url, html: { multipart: true, class: 'js-project-topic-form gl-show-field-errors common-note-form js-quick-submit js-requires-input' }, authenticity_token: true do |f| - = form_errors(@topic) + = form_errors(@topic, pajamas_alert: true) .form-group = f.label :name do diff --git a/app/views/admin/topics/edit.html.haml b/app/views/admin/topics/edit.html.haml index 4416bb0fe18..73796949e39 100644 --- a/app/views/admin/topics/edit.html.haml +++ b/app/views/admin/topics/edit.html.haml @@ -1,4 +1,4 @@ - page_title _("Edit"), @topic.name, _("Topics") -%h3.page-title= _('Edit topic: %{topic_name}') % { topic_name: @topic.name } +%h1.page-title.gl-font-size-h-display= _('Edit topic: %{topic_name}') % { topic_name: @topic.name } %hr = render 'form', url: admin_topic_path(@topic) diff --git a/app/views/admin/topics/new.html.haml b/app/views/admin/topics/new.html.haml index 8b4a8ac269e..aefa1bbcf95 100644 --- a/app/views/admin/topics/new.html.haml +++ b/app/views/admin/topics/new.html.haml @@ -1,4 +1,4 @@ - page_title _("New topic") -%h3.page-title= _('New topic') +%h1.page-title.gl-font-size-h-display= _('New topic') %hr = render 'form', url: admin_topics_path(@topic) diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 51e6af56377..cf951ae0265 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -1,22 +1,19 @@ %fieldset - %legend + %legend.gl-border-bottom-0 = s_('AdminUsers|Access') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :projects_limit - .col-sm-10 = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = f.label :can_create_group - .col-sm-10 = f.gitlab_ui_checkbox_component :can_create_group, '' .form-group.row - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = f.label :access_level - .col-sm-10 - editing_current_user = (current_user == @user) = f.gitlab_ui_radio_component :access_level, :regular, @@ -35,10 +32,10 @@ .form-group.row - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = f.label :external .hidden{ data: user_internal_regex_data } - .col-sm-10.gl-display-flex.gl-align-items-baseline + .col-12.gl-display-flex.gl-align-items-baseline = f.gitlab_ui_checkbox_component :external, s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.') %row.hidden#warning_external_automatically_set = gl_badge_tag s_('AdminUsers|Automatically marked as default internal user'), variant: :warning @@ -46,9 +43,9 @@ .form-group.row - @user.credit_card_validation || @user.build_credit_card_validation = f.fields_for :credit_card_validation do |ff| - .col-sm-2.col-form-label.gl-pt-0 + .col-12.gl-pt-0 = ff.label s_('AdminUsers|Validate user account') - .col-sm-10.gl-display-flex.gl-align-items-baseline + .col-12.gl-display-flex.gl-align-items-baseline = ff.gitlab_ui_checkbox_component :credit_card_validated_at, s_('AdminUsers|User is validated and can use free CI minutes on shared runners.'), help_text: s_('AdminUsers|A user can validate themselves by inputting a credit/debit card, or an admin can manually validate a user.'), diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index 7c3220e2cee..10f654e0f71 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -1,7 +1,6 @@ %fieldset - %legend= _('Admin notes') + %legend.gl-border-bottom-0= _('Admin notes') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :note, s_('Admin|Note') - .col-sm-10 = f.text_area :note, class: 'form-control gl-form-input gl-form-textarea' diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 3869a2b6dcd..7995bc1b6f4 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -1,49 +1,41 @@ .user_new = gitlab_ui_form_for [:admin, @user], html: { class: 'fieldset-form' } do |f| - = form_errors(@user) + = form_errors(@user, pajamas_alert: true) %fieldset - %legend= _('Account') + %legend.gl-border-bottom-0= _('Account') .form-group.row - .col-sm-2.col-form-label - = f.label :name - .col-sm-10 + .col-12 + = f.label "#{:name} (required)" = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control gl-form-input' - %span.help-inline * #{_('required')} .form-group.row - .col-sm-2.col-form-label - = f.label :username - .col-sm-10 + .col-12 + = f.label "#{:username} (required)" = f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control gl-form-input' - %span.help-inline * #{_('required')} .form-group.row - .col-sm-2.col-form-label - = f.label :email - .col-sm-10 + .col-12 + = f.label "#{:email} (required)" = f.text_field :email, required: true, autocomplete: 'off', class: 'form-control gl-form-input' - %span.help-inline * #{_('required')} - if @user.new_record? %fieldset - %legend= _('Password') + %legend.gl-border-bottom-0= _('Password') .form-group.row - .col-sm-2.col-form-label - = f.label :password - .col-sm-10 + .col-12 %strong = _('Reset link will be generated and sent to the user. %{break} User will be forced to set the password on first sign in.').html_safe % { break: '<br />'.html_safe } - else %fieldset - %legend= _('Password') + %legend.gl-border-bottom-0= _('Password') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :password - .col-sm-10 + .col-12 = f.password_field :password, disabled: f.object.force_random_password, autocomplete: 'new-password', class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :password_confirmation - .col-sm-10 + .col-12 = f.password_field :password_confirmation, disabled: f.object.force_random_password, autocomplete: 'new-password', class: 'form-control gl-form-input' = render partial: 'access_levels', locals: { f: f } @@ -53,37 +45,33 @@ = render_if_exists 'admin/users/limits', f: f %fieldset - %legend= _('Profile') + %legend.gl-border-bottom-0= _('Profile') .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :avatar - .col-sm-10 + .col-12 = f.file_field :avatar .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :skype - .col-sm-10 = f.text_field :skype, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :linkedin - .col-sm-10 = f.text_field :linkedin, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :twitter - .col-sm-10 = f.text_field :twitter, class: 'form-control gl-form-input' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :website_url - .col-sm-10 = f.text_field :website_url, class: 'form-control gl-form-input' = render 'admin/users/admin_notes', f: f - .form-actions + %div - if @user.new_record? = f.submit _('Create user'), class: "btn gl-button btn-confirm" = link_to _('Cancel'), admin_users_path, class: "gl-button btn btn-default btn-cancel" diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index e429a16d5ec..529692df0b6 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -1,6 +1,6 @@ .gl-display-flex.gl-flex-wrap.gl-justify-content-space-between.gl-align-items-center.gl-py-3.gl-mb-5.gl-border-b-solid.gl-border-gray-100.gl-border-b-1 .gl-my-3 - %h3.page-title.gl-m-0 + %h1.page-title.gl-font-size-h-display.gl-m-0 = @user.name - if @user.blocked_pending_approval? %span.gl-text-red-500 @@ -32,7 +32,7 @@ - if impersonation_enabled? && @user.can?(:log_in) = link_to _('Impersonate'), impersonate_admin_user_path(@user), method: :post, class: "btn btn-default gl-button", data: { qa_selector: 'impersonate_user_link' } - if can_force_email_confirmation?(@user) - %button.btn.gl-button.btn-info.js-confirm-modal-button{ data: confirm_user_data(@user) } + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'js-confirm-modal-button', data: confirm_user_data(@user) }) do = _('Confirm user') .gl-p-2 #js-admin-user-actions{ data: admin_user_actions_data_attributes(@user) } diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index a7ed7b8c052..2dbafb517be 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -1,6 +1,6 @@ - if registration_features_can_be_prompted? = render Pajamas::AlertComponent.new(variant: :tip, - alert_class: 'gl-my-5', + alert_options: { class: 'gl-my-5' }, dismissible: false) do |c| = c.body do = render 'shared/registration_features_discovery_message', feature_title: s_('RegistrationFeatures|send emails to users') diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index e3ebb691ba9..5507d640e04 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,5 +1,4 @@ - page_title _("Edit"), @user.name, _("Users") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Edit user: %{user_name}") % { user_name: @user.name } -%hr = render 'form' diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index 08aa7c3c9d2..425d0150d10 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,5 +1,4 @@ - page_title _("New User") -%h3.page-title +%h1.page-title.gl-font-size-h-display = s_('AdminUsers|New user') -%hr = render 'form' |