diff options
Diffstat (limited to 'app/views')
397 files changed, 1231 insertions, 1297 deletions
diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml index 78fa16c13a5..258fdb4ad9a 100644 --- a/app/views/abuse_reports/new.html.haml +++ b/app/views/abuse_reports/new.html.haml @@ -1,5 +1,5 @@ - page_title _("Report abuse to admin") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Report abuse to admin") %p = _("Please use this form to report to the admin users who create spam issues, comments or behave inappropriately.") @@ -7,7 +7,7 @@ = _("A member of the abuse team will review your report as soon as possible.") %hr = form_for @abuse_report, html: { class: 'js-quick-submit js-requires-input'} do |f| - = form_errors(@abuse_report) + = form_errors(@abuse_report, pajamas_alert: true) = f.hidden_field :user_id .form-group.row 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' diff --git a/app/views/award_emoji/_awards_block.html.haml b/app/views/award_emoji/_awards_block.html.haml index 3b91bcdd990..6cf414dc648 100644 --- a/app/views/award_emoji/_awards_block.html.haml +++ b/app/views/award_emoji/_awards_block.html.haml @@ -20,7 +20,7 @@ %button.gl-button.btn.btn-default.award-control.has-tooltip.js-add-award{ type: 'button', 'aria-label': _('Add reaction'), data: { title: _('Add reaction') } } - %span{ class: "award-control-icon award-control-icon-neutral" }= sprite_icon('slight-smile') - %span{ class: "award-control-icon award-control-icon-positive" }= sprite_icon('smiley') - %span{ class: "award-control-icon award-control-icon-super-positive" }= sprite_icon('smile') + %span{ class: "award-control-icon award-control-icon-neutral gl-icon" }= sprite_icon('slight-smile') + %span{ class: "award-control-icon award-control-icon-positive gl-icon" }= sprite_icon('smiley') + %span{ class: "award-control-icon award-control-icon-super-positive gl-icon" }= sprite_icon('smile') = yield diff --git a/app/views/ci/variables/_header.html.haml b/app/views/ci/variables/_header.html.haml index 392ff927f01..d6a9ce72d03 100644 --- a/app/views/ci/variables/_header.html.haml +++ b/app/views/ci/variables/_header.html.haml @@ -3,7 +3,7 @@ %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('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/ci/variables/_index.html.haml b/app/views/ci/variables/_index.html.haml index 0024526a90c..9ef2599a2a6 100644 --- a/app/views/ci/variables/_index.html.haml +++ b/app/views/ci/variables/_index.html.haml @@ -13,9 +13,9 @@ maskable_regex: ci_variable_maskable_regex, protected_by_default: ci_variable_protected_by_default?.to_s, aws_logo_svg_path: image_path('aws_logo.svg'), - aws_tip_deploy_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'deploy-your-application-to-the-aws-elastic-container-service-ecs'), - aws_tip_commands_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'run-aws-commands-from-gitlab-cicd'), - aws_tip_learn_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'aws'), + aws_tip_deploy_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'deploy-your-application-to-ecs'), + aws_tip_commands_link: help_page_path('ci/cloud_deployment/index.md', anchor: 'use-an-image-to-run-aws-commands'), + aws_tip_learn_link: help_page_path('ci/cloud_deployment/index.md'), contains_variable_reference_link: help_page_path('ci/variables/index', anchor: 'use-variables-in-other-variables'), protected_environment_variables_link: help_page_path('ci/variables/index', anchor: 'protected-cicd-variables'), masked_environment_variables_link: help_page_path('ci/variables/index', anchor: 'mask-a-cicd-variable'), diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml index 59c8fe04b09..8eba398fd13 100644 --- a/app/views/clusters/clusters/_advanced_settings.html.haml +++ b/app/views/clusters/clusters/_advanced_settings.html.haml @@ -35,7 +35,7 @@ = s_("ClusterIntegration|This is necessary if your integration has become out of sync. The cache is repopulated during the next CI job that requires namespace and service accounts.") - else = s_("ClusterIntegration|This is necessary to clear existing environment-namespace associations from clusters previously managed by GitLab.") - = link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn gl-button btn-info') + = link_to(s_('ClusterIntegration|Clear cluster cache'), clusterable.clear_cluster_cache_path(@cluster), method: :delete, class: 'btn gl-button btn-confirm') .sub-section.form-group %h4.text-danger diff --git a/app/views/clusters/clusters/_banner.html.haml b/app/views/clusters/clusters/_banner.html.haml index 720e3ff08e2..6461b71b10d 100644 --- a/app/views/clusters/clusters/_banner.html.haml +++ b/app/views/clusters/clusters/_banner.html.haml @@ -7,12 +7,12 @@ %span.gl-ml-2= s_('ClusterIntegration|Kubernetes cluster is being created...') = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'hidden js-cluster-api-unreachable') do |c| + alert_options: { class: 'hidden js-cluster-api-unreachable' }) do |c| = c.body do = s_('ClusterIntegration|Your cluster API is unreachable. Please ensure your API URL is correct.') = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable') do |c| + alert_options: { class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable' }) do |c| = c.body do = s_('ClusterIntegration|There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid.') diff --git a/app/views/clusters/clusters/_deprecation_alert.html.haml b/app/views/clusters/clusters/_deprecation_alert.html.haml index 3a83efec29b..0318c0f7dfa 100644 --- a/app/views/clusters/clusters/_deprecation_alert.html.haml +++ b/app/views/clusters/clusters/_deprecation_alert.html.haml @@ -1,4 +1,4 @@ -= render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_class: 'gl-mt-6 gl-mb-3') do |c| += render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mt-6 gl-mb-3' }) do |c| = c.body do - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe - issue_link_start = link_start % { url: 'https://gitlab.com/gitlab-org/configure/general/-/issues/199' } diff --git a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml index b130e0c7214..c3b881df98d 100644 --- a/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml +++ b/app/views/clusters/clusters/_gcp_signup_offer_banner.html.haml @@ -1,8 +1,8 @@ - link = link_to(s_('ClusterIntegration|sign up'), 'https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral', target: '_blank', rel: 'noopener noreferrer') = render Pajamas::AlertComponent.new(title: s_('ClusterIntegration|Did you know?'), - alert_class: 'gcp-signup-offer', - alert_data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path }) do |c| + alert_options: { class: 'gcp-signup-offer', + data: { feature_id: Users::CalloutsHelper::GCP_SIGNUP_OFFER, dismiss_endpoint: callouts_path }}) do |c| = c.body do = s_('ClusterIntegration|Every new Google Cloud Platform (GCP) account receives $300 in credit upon %{sign_up_link}. In partnership with Google, GitLab is able to offer an additional $200 for both new and existing GCP accounts to get started with GitLab\'s Google Kubernetes Engine Integration.').html_safe % { sign_up_link: link } = c.actions do diff --git a/app/views/dashboard/_activity_head.html.haml b/app/views/dashboard/_activity_head.html.haml index c65b947d1ba..ca9f69ab73a 100644 --- a/app/views/dashboard/_activity_head.html.haml +++ b/app/views/dashboard/_activity_head.html.haml @@ -1,5 +1,5 @@ .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Activity') + %h1.page-title.gl-font-size-h-display= _('Activity') .top-area = gl_tabs_nav({ class: 'gl-border-b-0', data: { testid: 'dashboard-activity-tabs' } }) do diff --git a/app/views/dashboard/_groups_head.html.haml b/app/views/dashboard/_groups_head.html.haml index 7b1d25b9b43..f0f1413831a 100644 --- a/app/views/dashboard/_groups_head.html.haml +++ b/app/views/dashboard/_groups_head.html.haml @@ -1,5 +1,5 @@ .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Groups') + %h1.page-title.gl-font-size-h-display= _('Groups') - if current_user.can_create_group? .page-title-controls diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index b94b14bf6bd..9c492a0da34 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -5,16 +5,17 @@ = render 'shared/project_limit' .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Projects') + %h1.page-title.gl-font-size-h-display= _('Projects') - if current_user.can_create_project? .page-title-controls = link_to _("New project"), new_project_path, class: "gl-button btn btn-confirm", data: { qa_selector: 'new_project_button' } -.top-area.scrolling-tabs-container.inner-page-scroll-tabs - .fade-left= sprite_icon('chevron-lg-left', size: 12) - .fade-right= sprite_icon('chevron-lg-right', size: 12) - = render 'dashboard/projects_nav' +.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) + = render 'dashboard/projects_nav' - unless feature_project_list_filter_bar .nav-controls = render 'shared/projects/search_form' diff --git a/app/views/dashboard/_projects_nav.html.haml b/app/views/dashboard/_projects_nav.html.haml index 90b40f3c7b7..29c820ddc58 100644 --- a/app/views/dashboard/_projects_nav.html.haml +++ b/app/views/dashboard/_projects_nav.html.haml @@ -1,7 +1,7 @@ - is_your_projects_path = current_page?(dashboard_projects_path) || current_page?(root_path) - is_explore_projects_path = current_page?(explore_root_path) || current_page?(trending_explore_projects_path) || current_page?(starred_explore_projects_path) || current_page?(explore_projects_path) -= gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-flex-nowrap gl-border-0' }) do += gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-tabs-nav' }) do = gl_tab_link_to dashboard_projects_path, { item_active: is_your_projects_path, class: 'shortcuts-activity', data: { placement: 'right' } } do = _("Your projects") = gl_tab_counter_badge(limited_counter_with_delimiter(@total_user_projects_count)) diff --git a/app/views/dashboard/_snippets_head.html.haml b/app/views/dashboard/_snippets_head.html.haml index 8c468812e33..be2124fdd7e 100644 --- a/app/views/dashboard/_snippets_head.html.haml +++ b/app/views/dashboard/_snippets_head.html.haml @@ -1,5 +1,5 @@ .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Snippets') + %h1.page-title.gl-font-size-h-display= _('Snippets') - if current_user && current_user.snippets.any? || @snippets.any? .page-title-controls diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index f0216253dad..95e772f324b 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -7,7 +7,7 @@ = render_dashboard_ultimate_trial(current_user) .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Issues') + %h1.page-title.gl-font-size-h-display= _('Issues') - if current_user .page-title-controls diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index 90fb09ed909..8a639d08a27 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -5,7 +5,7 @@ = render_dashboard_ultimate_trial(current_user) .page-title-holder.d-flex.align-items-start.flex-column.flex-sm-row.align-items-sm-center - %h1.page-title= _('Merge requests') + %h1.page-title.gl-font-size-h-display= _('Merge requests') - if current_user .page-title-controls.ml-0.mb-3.ml-sm-auto.mb-sm-0 diff --git a/app/views/dashboard/milestones/index.html.haml b/app/views/dashboard/milestones/index.html.haml index 2bbca851dcc..39fbd9bc097 100644 --- a/app/views/dashboard/milestones/index.html.haml +++ b/app/views/dashboard/milestones/index.html.haml @@ -4,7 +4,7 @@ - add_page_specific_style 'page_bundles/milestone' .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Milestones') + %h1.page-title.gl-font-size-h-display= _('Milestones') - if current_user .page-title-controls diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 4f6ddf10984..6bfe18fd3b2 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -7,7 +7,7 @@ - add_page_specific_style 'page_bundles/todos' .page-title-holder.d-flex.align-items-center - %h1.page-title= _("To-Do List") + %h1.page-title.gl-font-size-h-display= _("To-Do List") - if current_user.todos.any? .top-area diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml index 2ae950f3b0d..d3bd1d58d21 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.html.haml @@ -1,5 +1,5 @@ = render 'devise/shared/tab_single', tab_title: 'Resend confirmation instructions' -.login-box +.login-box.gl-p-5 .login-body = form_for(resource, as: resource_name, url: confirmation_path(resource_name), html: { method: :post, class: 'gl-show-field-errors' }) do |f| .devise-errors diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 60c3df718a1..b6acb244384 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,4 +1,5 @@ - page_title _("Sign up") +- page_description _("Join GitLab today! You and your team can plan, build, and ship secure code all in one application. Get started here for free!") - add_page_specific_style 'page_bundles/signup' - content_for :page_specific_javascripts do = render "layouts/google_tag_manager_head" diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 970e490dd72..57135c6cdfc 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -49,6 +49,7 @@ data: { qa_selector: 'new_user_email_field' }, required: true, title: _('Please provide a valid email address.') + %p.gl-field-hint.text-secondary= _('We recommend a work email address.') .form-group.gl-mb-5#password-strength = f.label :password, class: 'label-bold' = f.password_field :password, diff --git a/app/views/devise/shared/_signup_omniauth_provider_list.haml b/app/views/devise/shared/_signup_omniauth_provider_list.haml index 6688308cd71..84aabbe0efd 100644 --- a/app/views/devise/shared/_signup_omniauth_provider_list.haml +++ b/app/views/devise/shared/_signup_omniauth_provider_list.haml @@ -1,8 +1,10 @@ +- register_omniauth_params = Feature.enabled?(:update_oauth_registration_flow) ? { intent: :register } : {} + %label.gl-font-weight-bold = _("Create an account using:") .gl-display-flex.gl-justify-content-between.gl-flex-wrap - providers.each do |provider| - = link_to omniauth_authorize_path(:user, provider), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-3 js-oauth-login #{qa_class_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do + = link_to omniauth_authorize_path(:user, provider, register_omniauth_params), method: :post, class: "btn gl-button btn-default gl-w-full gl-mb-3 js-oauth-login #{qa_class_for_provider(provider)}", data: { provider: provider }, id: "oauth-login-#{provider}" do - if provider_has_icon?(provider) = provider_image_tag(provider) %span.gl-button-text diff --git a/app/views/doorkeeper/applications/edit.html.haml b/app/views/doorkeeper/applications/edit.html.haml index 99e6a5eca19..c48e2cd4db0 100644 --- a/app/views/doorkeeper/applications/edit.html.haml +++ b/app/views/doorkeeper/applications/edit.html.haml @@ -1,5 +1,5 @@ - page_title _("Edit"), @application.name, _("Applications") - @content_class = "limit-container-width" unless fluid_layout -%h3.page-title= _('Edit application') +%h1.page-title.gl-font-size-h-display= _('Edit application') = render 'shared/doorkeeper/applications/form', url: doorkeeper_submit_path(@application) diff --git a/app/views/doorkeeper/applications/new.html.haml b/app/views/doorkeeper/applications/new.html.haml index a66fab20d7c..884d33b9a10 100644 --- a/app/views/doorkeeper/applications/new.html.haml +++ b/app/views/doorkeeper/applications/new.html.haml @@ -1,6 +1,6 @@ - page_title _("New Application") -%h3.page-title= _("New Application") +%h1.page-title.gl-font-size-h-display= _("New Application") %hr diff --git a/app/views/doorkeeper/applications/show.html.haml b/app/views/doorkeeper/applications/show.html.haml index 3a568421ce9..0428b9c340c 100644 --- a/app/views/doorkeeper/applications/show.html.haml +++ b/app/views/doorkeeper/applications/show.html.haml @@ -3,7 +3,7 @@ - page_title @application.name, _("Applications") - @content_class = "limit-container-width" unless fluid_layout -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Application: %{name}") % { name: @application.name } = render 'shared/doorkeeper/applications/show', diff --git a/app/views/doorkeeper/authorizations/error.html.haml b/app/views/doorkeeper/authorizations/error.html.haml index 32b4ccb0fe6..ecd011342c4 100644 --- a/app/views/doorkeeper/authorizations/error.html.haml +++ b/app/views/doorkeeper/authorizations/error.html.haml @@ -1,3 +1,3 @@ -%h3.page-title= _("An error has occurred") +%h1.page-title.gl-font-size-h-display= _("An error has occurred") %main{ :role => "main" } %pre= @pre_auth.error_response.body[:error_description] diff --git a/app/views/doorkeeper/authorizations/redirect.html.haml b/app/views/doorkeeper/authorizations/redirect.html.haml index a9ac92fd087..b45db62dce1 100644 --- a/app/views/doorkeeper/authorizations/redirect.html.haml +++ b/app/views/doorkeeper/authorizations/redirect.html.haml @@ -1,4 +1,4 @@ -%h3.page-title= _("Redirecting") +%h1.page-title.gl-font-size-h-display= _("Redirecting") %div %a{ :href => redirect_uri } Click here to redirect to #{redirect_uri} diff --git a/app/views/doorkeeper/authorizations/show.html.haml b/app/views/doorkeeper/authorizations/show.html.haml index e4bfd69e7f8..16d787c2f41 100644 --- a/app/views/doorkeeper/authorizations/show.html.haml +++ b/app/views/doorkeeper/authorizations/show.html.haml @@ -1,3 +1,3 @@ -%h3.page-title= _("Authorization code:") +%h1.page-title.gl-font-size-h-display= _("Authorization code:") %main{ :role => "main" } %code#authorization_code= params[:code] diff --git a/app/views/errors/access_denied.html.haml b/app/views/errors/access_denied.html.haml index e368ee1a75a..56c26f93402 100644 --- a/app/views/errors/access_denied.html.haml +++ b/app/views/errors/access_denied.html.haml @@ -11,6 +11,6 @@ %p = s_('403|Please contact your GitLab administrator to get permission.') .action-container.js-go-back{ hidden: true } - %button{ type: 'button', class: 'gl-button btn btn-success' } + = render Pajamas::ButtonComponent.new(variant: :confirm) do = _('Go Back') = render "errors/footer" diff --git a/app/views/explore/topics/_head.html.haml b/app/views/explore/topics/_head.html.haml index f5ee95b16c3..f7d80d63c45 100644 --- a/app/views/explore/topics/_head.html.haml +++ b/app/views/explore/topics/_head.html.haml @@ -1,9 +1,10 @@ .page-title-holder.d-flex.align-items-center - %h1.page-title= _('Projects') + %h1.page-title.gl-font-size-h-display= _('Projects') -.top-area.scrolling-tabs-container.inner-page-scroll-tabs - .fade-left= sprite_icon('chevron-lg-left', size: 12) - .fade-right= sprite_icon('chevron-lg-right', size: 12) - = render 'dashboard/projects_nav' +.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) + = render 'dashboard/projects_nav' .nav-controls = render 'shared/topics/search_form' diff --git a/app/views/groups/_create_chat_team.html.haml b/app/views/groups/_create_chat_team.html.haml index 8f50d499605..45561031083 100644 --- a/app/views/groups/_create_chat_team.html.haml +++ b/app/views/groups/_create_chat_team.html.haml @@ -1,3 +1,6 @@ +- bind_out_tag = content_tag(:span, nil, { data: { bind_out: :create_chat_team } }) +- checkbox_help_text = "%s %s/%s".html_safe % [_('Mattermost URL:'), Settings.mattermost.host, bind_out_tag] + .form-group .col-sm-2.col-form-label = f.label :create_chat_team do @@ -5,13 +8,5 @@ = custom_icon('icon_mattermost') %span.gl-ml-2= _('Mattermost') .col-sm-12 - .form-check.js-toggle-container - .js-toggle-button.form-check-input= f.check_box(:create_chat_team, { checked: false }, true, false) - = f.label :create_chat_team, class: 'form-check-label' do - = _('Create a Mattermost team for this group') - %br - %small.light.js-toggle-content - = _('Mattermost URL:') - = Settings.mattermost.host - %span> / - %span{ "data-bind-out" => "create_chat_team" } + = f.gitlab_ui_checkbox_component :create_chat_team, _('Create a Mattermost team for this group'), help_text: checkbox_help_text, checkbox_options: { checked: false }, checked_value: true, unchecked_value: false + diff --git a/app/views/groups/_group_admin_settings.html.haml b/app/views/groups/_group_admin_settings.html.haml index 785ca71b371..0a170ebdb24 100644 --- a/app/views/groups/_group_admin_settings.html.haml +++ b/app/views/groups/_group_admin_settings.html.haml @@ -2,12 +2,12 @@ .col-sm-2.col-form-label.pt-0 = f.label :lfs_enabled, _('Large File Storage') .col-sm-10 - - label = _('Allow projects within this group to use Git LFS') - - help_link = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index'), class: 'gl-ml-2' - = f.gitlab_ui_checkbox_component :lfs_enabled, - '%{label}%{help_link}'.html_safe % { label: label, help_link: help_link }, - help_text: _('This setting can be overridden in each project.'), - checkbox_options: { checked: @group.lfs_enabled? } + = f.gitlab_ui_checkbox_component :lfs_enabled, checkbox_options: { checked: @group.lfs_enabled? } do |c| + = c.label do + = _('Allow projects within this group to use Git LFS') + = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index'), class: 'gl-ml-2' + = c.help_text do + = _('This setting can be overridden in each project.') .form-group.row .col-sm-2.col-form-label = f.label s_('ProjectCreationLevel|Allowed to create projects') diff --git a/app/views/groups/_invite_members_side_nav_link.html.haml b/app/views/groups/_invite_members_side_nav_link.html.haml index 3046669b53b..978ef01984c 100644 --- a/app/views/groups/_invite_members_side_nav_link.html.haml +++ b/app/views/groups/_invite_members_side_nav_link.html.haml @@ -1,7 +1,8 @@ .js-invite-members-trigger{ data: { trigger_source: 'group-side-nav', icon: 'users', display_text: title, - trigger_element: 'side-nav'} } + trigger_element: 'side-nav', + qa_selector: 'invite_members_sidebar_button' } } = render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } = render 'groups/invite_members_modal', group: group diff --git a/app/views/groups/_new_group_fields.html.haml b/app/views/groups/_new_group_fields.html.haml index fe2ee62d9be..83211505f36 100644 --- a/app/views/groups/_new_group_fields.html.haml +++ b/app/views/groups/_new_group_fields.html.haml @@ -1,4 +1,4 @@ -= form_errors(@group) += form_errors(@group, pajamas_alert: true) = render 'shared/group_form', f: f, autofocus: true .row diff --git a/app/views/groups/_personalize.html.haml b/app/views/groups/_personalize.html.haml index 07b3b29c20c..bae76952ef8 100644 --- a/app/views/groups/_personalize.html.haml +++ b/app/views/groups/_personalize.html.haml @@ -15,11 +15,9 @@ = f.label :setup_for_company, _('Who will be using this group?') .gl-display-flex.gl-flex-direction-column.gl-lg-flex-direction-row .gl-flex-grow-1.gl-display-flex.gl-align-items-center - = f.radio_button :setup_for_company, true - = f.label :setup_for_company, _('My company or team'), class: 'gl-font-weight-normal gl-mb-0 gl-ml-2', value: 'true' + = f.gitlab_ui_radio_component :setup_for_company, true, _('My company or team') .gl-flex-grow-1.gl-display-flex.gl-align-items-center - = f.radio_button :setup_for_company, false - = f.label :setup_for_company, _('Just me'), class: 'gl-font-weight-normal gl-mb-0 gl-ml-2', value: 'false' + = f.gitlab_ui_radio_component :setup_for_company, false, _('Just me') .row .form-group.col-sm-4 diff --git a/app/views/groups/_subgroups_and_projects.html.haml b/app/views/groups/_subgroups_and_projects.html.haml index 427a36aaec4..dc749af3c0c 100644 --- a/app/views/groups/_subgroups_and_projects.html.haml +++ b/app/views/groups/_subgroups_and_projects.html.haml @@ -1,7 +1,4 @@ #js-groups-subgroups_and_projects-tree - .empty-state.hidden - = render "shared/groups/empty_state" - %section{ data: { hide_projects: 'false', group_id: group.id, path: group_path(group) } } - .js-groups-list-holder{ data: { show_schema_markup: 'true'} } + .js-groups-list-holder{ data: subgroups_and_projects_list_app_data(group) } = gl_loading_icon(size: 'md', css_class: 'gl-mt-6') diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 3dcc75ce8f4..bca1c874cc6 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -4,13 +4,12 @@ - expanded = expanded_by_default? = render 'shared/namespaces/cascading_settings/lock_popovers' -= render_if_exists 'shared/minute_limit_banner', namespace: @group %section.settings.gs-general.no-animate.expanded#js-general-settings .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = _('Naming, visibility') - %button.btn.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Collapse') %p = _('Update your group name, description, avatar, and visibility.') @@ -22,7 +21,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = _('Permissions and group features') - %button.btn.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Configure advanced permissions, Large File Storage, two-factor authentication, and customer relations settings.') @@ -36,7 +35,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = s_('GroupSettings|Badges') - %button.btn.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = s_('GroupSettings|Customize this group\'s badges.') @@ -52,7 +51,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only{ role: 'button' } = _('Advanced') - %button.btn.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Perform advanced options such as changing path, transferring, exporting, or removing the group.') diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index 9aa626724a8..635a74d8179 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -1,7 +1,7 @@ - add_page_specific_style 'page_bundles/members' - page_title _('Group members') -= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @group += render_if_exists 'shared/free_user_cap_alert', source: @group .row.gl-mt-3 .col-lg-12 @@ -11,7 +11,7 @@ %h4 = _('Group members') %p - = html_escape(_('You can invite a new member to %{strong_start}%{group_name}%{strong_end}.')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + = group_member_header_subtext(@group) .gl-w-half.gl-xs-w-full .gl-display-flex.gl-flex-wrap.gl-justify-content-end.gl-mb-3 .js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite a group') } } diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 209faa937dc..925e7d46f14 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -1,28 +1,8 @@ -- @can_bulk_update = can?(current_user, :admin_issue, @group) && @group.licensed_feature_available?(:group_bulk_edit) - -- page_title _("Issues") +- page_title _('Issues') - add_page_specific_style 'page_bundles/issues_list' = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@group.name} issues") -- if Feature.enabled?(:vue_issues_list, @group) - .js-issues-list{ data: group_issues_list_data(@group, current_user) } - - if @can_bulk_update - = render_if_exists 'shared/issuable/group_bulk_update_sidebar', group: @group, type: :issues -- else - .top-area - = render 'shared/issuable/nav', type: :issues - .nav-controls - = render 'shared/issuable/feed_buttons' - - - if @can_bulk_update - = render_if_exists 'shared/issuable/bulk_update_button', type: :issues - - = render 'shared/new_project_item_select', path: 'issues/new', label: _("issue"), type: :issues, with_feature_enabled: 'issues', with_shared: false, include_projects_in_subgroups: true - - = render 'shared/issuable/search_bar', type: :issues - - - if @can_bulk_update - = render_if_exists 'shared/issuable/group_bulk_update_sidebar', group: @group, type: :issues - - = render 'shared/issues', project_select_button: true +.js-issues-list{ data: group_issues_list_data(@group, current_user) } +- if can?(current_user, :admin_issue, @group) && @group.licensed_feature_available?(:group_bulk_edit) + = render_if_exists 'shared/issuable/group_bulk_update_sidebar', group: @group, type: :issues diff --git a/app/views/groups/labels/edit.html.haml b/app/views/groups/labels/edit.html.haml index d9b8f99ea0c..9af842b01df 100644 --- a/app/views/groups/labels/edit.html.haml +++ b/app/views/groups/labels/edit.html.haml @@ -2,8 +2,7 @@ - breadcrumb_title _("Edit") - 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: group_label_path(@group, @label), back_path: @previous_labels_path diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml index c480123dad1..8187dda5471 100644 --- a/app/views/groups/labels/index.html.haml +++ b/app/views/groups/labels/index.html.haml @@ -8,13 +8,13 @@ #js-promote-label-modal = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label - .labels-container.gl-mt-2.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100 + .labels-container.gl-mt-5 - if @labels.any? - .text-muted + .text-muted.gl-mb-5 = _('Labels can be applied to %{features}. Group labels are available for any project within the group.') % { features: issuable_types.to_sentence } .other-labels - %h5= _('Labels') - %ul.content-list.manage-labels-list.js-other-labels + %h4= _('Labels') + %ul.manage-labels-list.js-other-labels = render partial: 'shared/label', collection: @labels, as: :label, locals: { use_label_priority: false, subject: @group } = paginate @labels, theme: 'gitlab' - elsif search.present? diff --git a/app/views/groups/labels/new.html.haml b/app/views/groups/labels/new.html.haml index 75b4ad5c795..fd9aae987d4 100644 --- a/app/views/groups/labels/new.html.haml +++ b/app/views/groups/labels/new.html.haml @@ -2,8 +2,7 @@ - breadcrumb_title _("New") - page_title _("New Label") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New Label') -%hr = render 'shared/labels/form', url: group_labels_path, back_path: @previous_labels_path diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml index 011c76e5ae7..b33d1443706 100644 --- a/app/views/groups/merge_requests.html.haml +++ b/app/views/groups/merge_requests.html.haml @@ -10,7 +10,7 @@ - if current_user .nav-controls - if @can_bulk_update - = render_if_exists 'shared/issuable/bulk_update_button', type: :merge_requests + = render_if_exists 'projects/merge_requests/bulk_update_button' = render 'shared/new_project_item_select', path: 'merge_requests/new', label: _("merge request"), type: :merge_requests, with_feature_enabled: 'merge_requests', with_shared: false, include_projects_in_subgroups: true diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index a6302569187..7da5a9e9664 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -1,5 +1,5 @@ = form_for [@group, @milestone], html: { class: 'milestone-form common-note-form js-quick-submit js-requires-input' } do |f| - = form_errors(@milestone) + = form_errors(@milestone, pajamas_alert: true) .form-group.row .col-form-label.col-sm-2 = f.label :title, _("Title") diff --git a/app/views/groups/milestones/edit.html.haml b/app/views/groups/milestones/edit.html.haml index 187c2d24b56..931d73715d3 100644 --- a/app/views/groups/milestones/edit.html.haml +++ b/app/views/groups/milestones/edit.html.haml @@ -3,7 +3,7 @@ - render "header_title" -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Edit Milestone') %hr diff --git a/app/views/groups/milestones/new.html.haml b/app/views/groups/milestones/new.html.haml index 0d4565706d4..8bceb1ddd5c 100644 --- a/app/views/groups/milestones/new.html.haml +++ b/app/views/groups/milestones/new.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _("New") - page_title _("Milestones"), @milestone.name, _("Milestones") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("New Milestone") %hr diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 58a78a8adc1..3fb2b88dadd 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -10,7 +10,7 @@ .row{ 'v-cloak': true } #create-group-pane.tab-pane - = form_for @group, html: { class: 'group-form gl-show-field-errors gl-mt-3' } do |f| + = gitlab_ui_form_for @group, html: { class: 'group-form gl-show-field-errors gl-mt-3' } do |f| = render 'new_group_fields', f: f, group_name_id: 'create-group-name' #import-group-pane.tab-pane diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 3507f4574ab..d5c22d9b1f2 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _("Projects") - page_title _("Projects") +- @content_class = "limit-container-width" unless fluid_layout .card.gl-mt-3 .card-header diff --git a/app/views/groups/runners/_settings.html.haml b/app/views/groups/runners/_settings.html.haml index 7716a2f125f..3e5ec3c26e2 100644 --- a/app/views/groups/runners/_settings.html.haml +++ b/app/views/groups/runners/_settings.html.haml @@ -1,14 +1,12 @@ -.gl-mb-6 +.gl-mb-5 #update-shared-runners-form{ data: group_shared_runners_settings_data(@group) } -.gl-card.gl-px-8.gl-py-6.gl-line-height-20 - .gl-card-body.gl-display-flex{ :class => "gl-p-0!" } - .gl-banner-illustration - = image_tag('illustrations/rocket-launch-md.svg', alt: s_('Runners|Rocket launch illustration')) - .gl-banner-content - %h1.gl-banner-title - = s_('Runners|New group runners view') - %p - = s_('Runners|The new view gives you more space and better visibility into your fleet of runners.') - %a.btn.btn-confirm.btn-md.gl-button{ :href => group_runners_path(@group) } - %span.gl-button-text - = s_('Runners|Take me there!') +- if @group.licensed_feature_available?(:stale_runner_cleanup_for_namespace) + .gl-mb-5 + #stale-runner-cleanup-form{ data: { group_full_path: @group.full_path, stale_timeout_secs: ::Ci::Runner::STALE_TIMEOUT.to_i } } += render Pajamas::BannerComponent.new(button_text: s_('Runners|Take me there!'), + button_link: group_runners_path(@group), + svg_path: 'illustrations/rocket-launch-md.svg', + close_options: { class: 'gl-display-none' }) do |c| + - c.title do + = s_('Runners|New group runners view') + %p= s_('Runners|The new view gives you more space and better visibility into your fleet of runners.') diff --git a/app/views/groups/runners/edit.html.haml b/app/views/groups/runners/edit.html.haml index 04b9d88723f..c5999317597 100644 --- a/app/views/groups/runners/edit.html.haml +++ b/app/views/groups/runners/edit.html.haml @@ -5,7 +5,7 @@ - add_to_breadcrumbs "#{@runner.short_sha}", group_runner_path(@group, @runner) -%h2.page-title +%h1.page-title.gl-font-size-h-display = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id }) = render 'shared/runners/runner_type_badge', runner: @runner diff --git a/app/views/groups/runners/show.html.haml b/app/views/groups/runners/show.html.haml index b6c0c8a707f..5a9d2ca858e 100644 --- a/app/views/groups/runners/show.html.haml +++ b/app/views/groups/runners/show.html.haml @@ -1,3 +1,6 @@ - add_to_breadcrumbs _('Runners'), group_runners_path(@group) -= render 'shared/runners/runner_details', runner: @runner +- if Feature.enabled?(:group_runner_view_ui) + #js-group-runner-show{ data: {runner_id: @runner.id, runners_path: group_runners_path(@group)} } +- else + = render 'shared/runners/runner_details', runner: @runner diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml index ebeec2ee95a..3624ff2bcb3 100644 --- a/app/views/groups/settings/_advanced.html.haml +++ b/app/views/groups/settings/_advanced.html.haml @@ -4,7 +4,7 @@ .sub-section %h4.warning-title= s_('GroupSettings|Change group URL') = form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f| - = form_errors(@group) + = form_errors(@group, pajamas_alert: true) .form-group %p = s_("GroupSettings|Changing a group's URL can have unintended side effects.") @@ -23,7 +23,7 @@ title: group_url_error_message, maxlength: ::Namespace::URL_MAX_LENGTH, "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" - = f.submit s_('GroupSettings|Change group URL'), class: 'btn gl-button btn-warning' + = f.submit s_('GroupSettings|Change group URL'), class: 'btn gl-button btn-danger' = render 'groups/settings/transfer', group: @group = render 'groups/settings/remove', group: @group, remove_form_id: remove_form_id diff --git a/app/views/groups/settings/_export.html.haml b/app/views/groups/settings/_export.html.haml index 6cae416311e..66c1341fb15 100644 --- a/app/views/groups/settings/_export.html.haml +++ b/app/views/groups/settings/_export.html.haml @@ -3,7 +3,7 @@ .sub-section %h4= s_('GroupSettings|Export group') %p= _('Export this group with all related data.') - = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_class: 'gl-mb-4') do |c| + = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mb-4' }) do |c| = c.body do - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/group/import/index.md') } - docs_link_end = '</a>'.html_safe @@ -12,7 +12,7 @@ - export_information = _('After the export is complete, download the data file from a notification email or from this page. You can then import the data file from the %{strong_text_start}Create new group%{strong_text_end} page of another GitLab instance.') % { strong_text_start: '<strong>'.html_safe, strong_text_end: '</strong>'.html_safe} = export_information.html_safe = link_to _('Learn more.'), help_page_path('user/group/settings/import_export.md'), target: '_blank', rel: 'noopener noreferrer' - = render Pajamas::AlertComponent.new(dismissible: false, alert_class: 'gl-mb-5') do |c| + = render Pajamas::AlertComponent.new(dismissible: false, alert_options: { class: 'gl-mb-5' }) do |c| = c.body do %p.gl-mb-0 %p= _('The following items will be exported:') diff --git a/app/views/groups/settings/_git_access_protocols.html.haml b/app/views/groups/settings/_git_access_protocols.html.haml new file mode 100644 index 00000000000..df798db79ad --- /dev/null +++ b/app/views/groups/settings/_git_access_protocols.html.haml @@ -0,0 +1,7 @@ +- if group.root? && Feature.enabled?(:group_level_git_protocol_control, group) + .form-group + = f.label s_('Enabled Git access protocols'), class: 'label-bold' + = f.select :enabled_git_access_protocol, options_for_select(enabled_git_access_protocol_options_for_group, group.enabled_git_access_protocol), {}, class: 'form-control', data: { qa_selector: 'enabled_git_access_protocol_dropdown' }, disabled: !::Gitlab::CurrentSettings.enabled_git_access_protocol.blank? + - if !::Gitlab::CurrentSettings.enabled_git_access_protocol.blank? + .form-text.text-muted + = _("This setting has been configured at the instance level and cannot be overridden per group") diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml index ecb31b37fd3..319af7be22e 100644 --- a/app/views/groups/settings/_permissions.html.haml +++ b/app/views/groups/settings/_permissions.html.haml @@ -37,6 +37,7 @@ - if @group.licensed_feature_available?(:group_wikis) = render_if_exists 'groups/settings/wiki', f: f, group: @group = render 'groups/settings/lfs', f: f + = render 'groups/settings/git_access_protocols', f: f, group: @group = render 'groups/settings/project_creation_level', f: f, group: @group = render 'groups/settings/subgroup_creation_level', f: f, group: @group = render_if_exists 'groups/settings/prevent_forking', f: f, group: @group @@ -44,12 +45,11 @@ = render_if_exists 'groups/personal_access_token_expiration_policy', f: f, group: @group = render 'groups/settings/membership', f: f, group: @group - - if crm_feature_available?(@group) - %h5= _('Customer relations') - .form-group.gl-mb-3 - = f.gitlab_ui_checkbox_component :crm_enabled, - s_('GroupSettings|Enable customer relations'), - checkbox_options: { checked: @group.crm_enabled? }, - help_text: s_('GroupSettings|Allows creating organizations and contacts and associating them with issues.') + %h5= _('Customer relations') + .form-group.gl-mb-3 + = f.gitlab_ui_checkbox_component :crm_enabled, + s_('GroupSettings|Enable customer relations'), + checkbox_options: { checked: @group.crm_enabled? }, + help_text: s_('GroupSettings|Allows creating organizations and contacts and associating them with issues.') = f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' } diff --git a/app/views/groups/settings/_remove_button.html.haml b/app/views/groups/settings/_remove_button.html.haml index e765638953a..df978f3cb96 100644 --- a/app/views/groups/settings/_remove_button.html.haml +++ b/app/views/groups/settings/_remove_button.html.haml @@ -1,7 +1,7 @@ - remove_form_id = local_assigns.fetch(:remove_form_id, nil) - if group.paid? - = render Pajamas::AlertComponent.new(dismissible: false, alert_class: 'gl-mb-5', alert_data: { testid: 'group-has-linked-subscription-alert' }) do |c| + = render Pajamas::AlertComponent.new(dismissible: false, alert_options: { class: 'gl-mb-5', data: { testid: 'group-has-linked-subscription-alert' }}) do |c| = c.body do = html_escape(_("This group can't be removed because it is linked to a subscription. To remove this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe } diff --git a/app/views/groups/settings/_transfer.html.haml b/app/views/groups/settings/_transfer.html.haml index e65c3cd13f6..e6c88977cb1 100644 --- a/app/views/groups/settings/_transfer.html.haml +++ b/app/views/groups/settings/_transfer.html.haml @@ -13,7 +13,7 @@ %li= s_('GroupSettings|You will need to update your local repositories to point to the new location.') %li= s_("GroupSettings|If the parent group's visibility is lower than the group's current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.") - if group.paid? - = render Pajamas::AlertComponent.new(dismissible: false, alert_class: 'gl-mb-5') do |c| + = render Pajamas::AlertComponent.new(dismissible: false, alert_options: { class: 'gl-mb-5' }) do |c| = c.body do = html_escape(_("This group can't be transferred because it is linked to a subscription. To transfer this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe } .js-transfer-group-form{ data: initial_data } diff --git a/app/views/groups/settings/applications/edit.html.haml b/app/views/groups/settings/applications/edit.html.haml index cba4892eef9..ee71fd5d886 100644 --- a/app/views/groups/settings/applications/edit.html.haml +++ b/app/views/groups/settings/applications/edit.html.haml @@ -1,5 +1,5 @@ - page_title _("Edit"), @application.name, _("Group applications") - @content_class = "limit-container-width" unless fluid_layout -%h3.page-title= _('Edit group application') +%h1.page-title.gl-font-size-h-display= _('Edit group application') = render 'shared/doorkeeper/applications/form', url: group_settings_application_path(@group, @application) diff --git a/app/views/groups/settings/applications/show.html.haml b/app/views/groups/settings/applications/show.html.haml index 6e7f6ce4df0..4a83d96aae4 100644 --- a/app/views/groups/settings/applications/show.html.haml +++ b/app/views/groups/settings/applications/show.html.haml @@ -3,7 +3,7 @@ - page_title @application.name, _("Group applications") - @content_class = "limit-container-width" unless fluid_layout -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Group application: %{name}") % { name: @application.name } = render 'shared/doorkeeper/applications/show', diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index f6dda9358f3..3b117022d1e 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -3,7 +3,6 @@ - expanded = expanded_by_default? - general_expanded = @group.errors.empty? ? expanded : true -= render_if_exists 'shared/minute_limit_banner', namespace: @group -# Given we only have one field in this form which is also admin-only, -# we don't want to show an empty section to non-admin users, @@ -12,7 +11,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("General pipelines") - %button.btn.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _("Customize your pipeline configuration.") @@ -29,7 +28,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Runners') - %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 = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") @@ -41,7 +40,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Auto DevOps') - %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 - auto_devops_url = help_page_path('topics/autodevops/index') @@ -52,3 +51,5 @@ .settings-content = render 'groups/settings/ci_cd/auto_devops_form', group: @group + += render_if_exists 'groups/settings/ci_cd/protected_environments', expanded: expanded diff --git a/app/views/groups/settings/repository/_default_branch.html.haml b/app/views/groups/settings/repository/_default_branch.html.haml index f2644465a49..844a5f890a4 100644 --- a/app/views/groups/settings/repository/_default_branch.html.haml +++ b/app/views/groups/settings/repository/_default_branch.html.haml @@ -2,7 +2,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Default branch') - %button.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded_by_default? ? _('Collapse') : _('Expand') %p = s_('GroupSettings|Set the initial name and protections for the default branch of new repositories created in the group.') diff --git a/app/views/groups/settings/repository/show.html.haml b/app/views/groups/settings/repository/show.html.haml index 072c8c4d821..d3b9117c05b 100644 --- a/app/views/groups/settings/repository/show.html.haml +++ b/app/views/groups/settings/repository/show.html.haml @@ -1,5 +1,6 @@ - breadcrumb_title _('Repository Settings') - page_title _('Repository') +- @content_class = "limit-container-width" unless fluid_layout - deploy_token_description = s_('DeployTokens|Group deploy tokens allow access to the packages, repositories, and registry images within the group.') diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 7bbc2f839f7..3614d854036 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -7,8 +7,7 @@ = render_if_exists 'shared/thanks_for_purchase_banner', plan_title: plan_title, quantity: params[:purchased_quantity].to_i = render_if_exists 'shared/qrtly_reconciliation_alert', group: @group -= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @group -= render_if_exists 'shared/minute_limit_banner', namespace: @group += render_if_exists 'shared/free_user_cap_alert', source: @group - if show_invite_banner?(@group) = content_for :group_invite_members_banner do diff --git a/app/views/import/bitbucket/status.html.haml b/app/views/import/bitbucket/status.html.haml index 8946ab898e0..e69ca4663b4 100644 --- a/app/views/import/bitbucket/status.html.haml +++ b/app/views/import/bitbucket/status.html.haml @@ -1,7 +1,7 @@ - page_title _('Bitbucket import') - header_title _('Projects'), root_path -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('bitbucket', css_class: 'gl-mr-2') = _('Import projects from Bitbucket') diff --git a/app/views/import/bitbucket_server/new.html.haml b/app/views/import/bitbucket_server/new.html.haml index 721447186a6..0d87cf66814 100644 --- a/app/views/import/bitbucket_server/new.html.haml +++ b/app/views/import/bitbucket_server/new.html.haml @@ -2,7 +2,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('bitbucket', css_class: 'gl-mr-2') = _('Import repositories from Bitbucket Server') diff --git a/app/views/import/bitbucket_server/status.html.haml b/app/views/import/bitbucket_server/status.html.haml index 79b2810e06d..05b42767668 100644 --- a/app/views/import/bitbucket_server/status.html.haml +++ b/app/views/import/bitbucket_server/status.html.haml @@ -1,6 +1,6 @@ - page_title _('Bitbucket Server import') -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('bitbucket', css_class: 'gl-mr-2') = _('Import projects from Bitbucket Server') diff --git a/app/views/import/fogbugz/new.html.haml b/app/views/import/fogbugz/new.html.haml index d716d08529c..b74262f2567 100644 --- a/app/views/import/fogbugz/new.html.haml +++ b/app/views/import/fogbugz/new.html.haml @@ -2,7 +2,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('bug', css_class: 'gl-mr-2') = _('Import projects from FogBugz') diff --git a/app/views/import/fogbugz/new_user_map.html.haml b/app/views/import/fogbugz/new_user_map.html.haml index 93572e14a65..5caee78b9c4 100644 --- a/app/views/import/fogbugz/new_user_map.html.haml +++ b/app/views/import/fogbugz/new_user_map.html.haml @@ -2,7 +2,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('bug', css_class: 'gl-mr-2') = _('Import projects from FogBugz') diff --git a/app/views/import/fogbugz/status.html.haml b/app/views/import/fogbugz/status.html.haml index dcc0e94441c..3e303d3163d 100644 --- a/app/views/import/fogbugz/status.html.haml +++ b/app/views/import/fogbugz/status.html.haml @@ -1,5 +1,5 @@ - page_title _("FogBugz import") -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('bug', css_class: 'gl-mr-2') = _('Import projects from FogBugz') diff --git a/app/views/import/gitea/new.html.haml b/app/views/import/gitea/new.html.haml index de717ce87eb..4a293bb6f4e 100644 --- a/app/views/import/gitea/new.html.haml +++ b/app/views/import/gitea/new.html.haml @@ -2,7 +2,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title +%h1.page-title.gl-font-size-h-display = custom_icon('gitea_logo') = _('Import Projects from Gitea') @@ -11,6 +11,7 @@ = _('To get started, please enter your Gitea Host URL and a %{link_to_personal_token}.').html_safe % { link_to_personal_token: link_to_personal_token } = form_tag personal_access_token_import_gitea_path do + = hidden_field_tag(:namespace_id, params[:namespace_id]) .form-group.row = label_tag :gitea_host_url, _('Gitea Host URL'), class: 'col-form-label col-sm-2' .col-sm-4 diff --git a/app/views/import/gitea/status.html.haml b/app/views/import/gitea/status.html.haml index 1bdcec0c574..c717d4848f4 100644 --- a/app/views/import/gitea/status.html.haml +++ b/app/views/import/gitea/status.html.haml @@ -1,6 +1,6 @@ - page_title _("Gitea Import") -%h3.page-title +%h1.page-title.gl-font-size-h-display = custom_icon('gitea_logo') = _('Import Projects from Gitea') -= render 'import/githubish_status', provider: 'gitea' += render 'import/githubish_status', provider: 'gitea', default_namespace: @namespace diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index fbb27ba620a..7d0a46f3630 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -3,7 +3,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title +%h1.page-title.gl-font-size-h-display = title %p @@ -25,11 +25,11 @@ %label.label-bold= _('Personal Access Token') = hidden_field_tag(:namespace_id, params[:namespace_id]) = text_field_tag :personal_access_token, '', class: 'form-control gl-form-input', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' } - %span.form-text.text-muted + %span.form-text.gl-text-gray-600 = import_github_personal_access_token_message = render_if_exists 'import/github/ci_cd_only' - .form-actions.d-flex.justify-content-end + .form-actions.gl-display-flex.gl-justify-content-end = link_to _('Cancel'), new_project_path, class: 'gl-button btn btn-default' - = submit_tag _('Authenticate'), class: 'gl-button btn btn-confirm ml-2', data: { qa_selector: 'authenticate_button' } + = submit_tag _('Authenticate'), class: 'gl-button btn btn-confirm gl-ml-3', data: { qa_selector: 'authenticate_button' } diff --git a/app/views/import/github/status.html.haml b/app/views/import/github/status.html.haml index 26b048c8195..1b556cd0f7f 100644 --- a/app/views/import/github/status.html.haml +++ b/app/views/import/github/status.html.haml @@ -1,6 +1,6 @@ - title = has_ci_cd_only_params? ? _('Connect repositories from GitHub') : _('GitHub import') - page_title title -%h3.page-title.mb-0.gl-display-flex +%h1.page-title.gl-font-size-h-display.mb-0.gl-display-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('github', css_class: 'gl-mr-2') = _('Import repositories from GitHub') diff --git a/app/views/import/gitlab/status.html.haml b/app/views/import/gitlab/status.html.haml index b7b1fae1b73..13aaa41de9b 100644 --- a/app/views/import/gitlab/status.html.haml +++ b/app/views/import/gitlab/status.html.haml @@ -1,5 +1,5 @@ - page_title _("GitLab.com import") -%h3.page-title +%h1.page-title.gl-font-size-h-display = sprite_icon('heart', css_class: 'gl-vertical-align-middle') = _('Import projects from GitLab.com') diff --git a/app/views/import/gitlab_projects/new.html.haml b/app/views/import/gitlab_projects/new.html.haml index 533d0d13be3..42a9d2c3136 100644 --- a/app/views/import/gitlab_projects/new.html.haml +++ b/app/views/import/gitlab_projects/new.html.haml @@ -2,7 +2,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('tanuki', css_class: 'gl-mr-2') = _('Import an exported GitLab project') diff --git a/app/views/import/manifest/_form.html.haml b/app/views/import/manifest/_form.html.haml index 365184537cc..096d2543502 100644 --- a/app/views/import/manifest/_form.html.haml +++ b/app/views/import/manifest/_form.html.haml @@ -6,7 +6,7 @@ .input-group-prepend.has-tooltip{ title: root_url } .input-group-text = root_url - = select_tag :group_id, namespaces_options(nil, display_path: true, groups_only: true), { class: 'select2 js-select-namespace' } + = select_tag :group_id, namespaces_options(params[:namespace_id], display_path: true, groups_only: true), { class: 'select2 js-select-namespace' } .form-text.text-muted = _('Choose the top-level group for your repository imports.') diff --git a/app/views/import/manifest/new.html.haml b/app/views/import/manifest/new.html.haml index a949e14e273..3d33e229f8f 100644 --- a/app/views/import/manifest/new.html.haml +++ b/app/views/import/manifest/new.html.haml @@ -3,7 +3,7 @@ - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Manifest file import') = render 'import/shared/errors' diff --git a/app/views/import/manifest/status.html.haml b/app/views/import/manifest/status.html.haml index 45d03575713..ced507de271 100644 --- a/app/views/import/manifest/status.html.haml +++ b/app/views/import/manifest/status.html.haml @@ -1,6 +1,6 @@ - page_title _("Manifest import") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Manifest file import') = render 'import/githubish_status', provider: 'manifest' diff --git a/app/views/import/phabricator/new.html.haml b/app/views/import/phabricator/new.html.haml index 0249dc446e4..d4fdd107043 100644 --- a/app/views/import/phabricator/new.html.haml +++ b/app/views/import/phabricator/new.html.haml @@ -2,7 +2,7 @@ - header_title _("New project"), new_project_path - add_to_breadcrumbs s_('ProjectsNew|Import project'), new_project_path(anchor: 'import_project') -%h3.page-title.d-flex +%h1.page-title.gl-font-size-h-display.d-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center = sprite_icon('issues', css_class: 'gl-mr-2') = _('Import tasks from Phabricator into issues') diff --git a/app/views/import/shared/_errors.html.haml b/app/views/import/shared/_errors.html.haml index ae54d0544f3..2dbb54a9a0e 100644 --- a/app/views/import/shared/_errors.html.haml +++ b/app/views/import/shared/_errors.html.haml @@ -1,7 +1,7 @@ - if @errors.present? = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false, - alert_class: 'gl-mb-5') do |c| + alert_options: { class: 'gl-mb-5' }) do |c| = c.body do - @errors.each do |error| = error diff --git a/app/views/invites/show.html.haml b/app/views/invites/show.html.haml index 3622fc46983..c1ee12bb6c8 100644 --- a/app/views/invites/show.html.haml +++ b/app/views/invites/show.html.haml @@ -1,5 +1,5 @@ - page_title _("Invitation") -%h3.page-title= _("Invitation") +%h1.page-title.gl-font-size-h-display= _("Invitation") - if current_user_matches_invite? - if member? diff --git a/app/views/jira_connect/subscriptions/index.html.haml b/app/views/jira_connect/subscriptions/index.html.haml index 3319137551b..d4ced15b869 100644 --- a/app/views/jira_connect/subscriptions/index.html.haml +++ b/app/views/jira_connect/subscriptions/index.html.haml @@ -1,8 +1,4 @@ -%header.jira-connect-header.gl-display-flex.gl-align-items-center.gl-justify-content-center.gl-px-5.gl-border-b-solid.gl-border-b-gray-100.gl-border-b-1.gl-bg-white - = link_to brand_header_logo, Gitlab.config.gitlab.url, target: '_blank', rel: 'noopener noreferrer' - -%main.jira-connect-app.gl-px-5.gl-pt-7.gl-mx-auto - .js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } +.js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? = webpack_bundle_tag 'jira_connect_app' diff --git a/app/views/kaminari/gitlab/_keyset_paginator.html.haml b/app/views/kaminari/gitlab/_keyset_paginator.html.haml index f64c70dadfc..aed8b912fc6 100644 --- a/app/views/kaminari/gitlab/_keyset_paginator.html.haml +++ b/app/views/kaminari/gitlab/_keyset_paginator.html.haml @@ -9,22 +9,22 @@ %li.page-item - first_page_path = url_for(page_params.merge(cursor: paginator.cursor_for_first_page)) = link_to first_page_path, rel: 'first', class: 'page-link' do - = sprite_icon('angle-double-left', size: 8) + = sprite_icon('chevron-double-lg-left', size: 8) = s_('Pagination|First') %li.page-item.prev = link_to previous_path, rel: 'prev', class: 'page-link' do - = sprite_icon('angle-left', size: 8) + = sprite_icon('chevron-lg-left', size: 8) = s_('Pagination|Prev') - if paginator.has_next_page? %li.page-item.next = link_to next_path, rel: 'next', class: 'page-link' do = s_('Pagination|Next') - = sprite_icon('angle-right', size: 8) + = sprite_icon('chevron-lg-right', size: 8) - unless without_first_and_last_pages %li.page-item - last_page_path = url_for(page_params.merge(cursor: paginator.cursor_for_last_page)) = link_to last_page_path, rel: 'last', class: 'page-link' do = s_('Pagination|Last') - = sprite_icon('angle-double-right', size: 8) + = sprite_icon('chevron-double-lg-right', size: 8) diff --git a/app/views/kaminari/gitlab/_next_page.html.haml b/app/views/kaminari/gitlab/_next_page.html.haml index 9572dd91330..3ddd9fe655f 100644 --- a/app/views/kaminari/gitlab/_next_page.html.haml +++ b/app/views/kaminari/gitlab/_next_page.html.haml @@ -11,4 +11,4 @@ %li.page-item.js-next-button{ class: ('disabled' if current_page.last?) } = link_to page_url, rel: 'next', remote: remote, class: 'page-link' do = s_('Pagination|Next') - = sprite_icon('angle-right', size: 8) + = sprite_icon('chevron-lg-right', size: 8) diff --git a/app/views/kaminari/gitlab/_prev_page.html.haml b/app/views/kaminari/gitlab/_prev_page.html.haml index 4ba7ab6488a..5fb11c975de 100644 --- a/app/views/kaminari/gitlab/_prev_page.html.haml +++ b/app/views/kaminari/gitlab/_prev_page.html.haml @@ -10,5 +10,5 @@ %li.page-item.js-previous-button{ class: ('disabled' if current_page.first?) } = link_to page_url, rel: 'prev', remote: remote, class: 'page-link' do - = sprite_icon('angle-left', size: 8) + = sprite_icon('chevron-lg-left', size: 8) = s_('Pagination|Prev') diff --git a/app/views/kaminari/gitlab/_without_count.html.haml b/app/views/kaminari/gitlab/_without_count.html.haml index dc9dcbeed1d..8b29cb1988f 100644 --- a/app/views/kaminari/gitlab/_without_count.html.haml +++ b/app/views/kaminari/gitlab/_without_count.html.haml @@ -3,10 +3,10 @@ - if previous_path %li.page-item.prev = link_to previous_path, rel: 'prev', class: 'page-link' do - = sprite_icon('angle-left', size: 8) + = sprite_icon('chevron-lg-left', size: 8) = s_('Pagination|Prev') - if next_path %li.page-item.next = link_to next_path, rel: 'next', class: 'page-link' do = s_('Pagination|Next') - = sprite_icon('angle-right', size: 8) + = sprite_icon('chevron-lg-right', size: 8) diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 55c66454d0b..84eb2706929 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -68,6 +68,7 @@ %meta{ name: "description", content: page_description } + %link{ rel: 'manifest', href: manifest_path(format: :json) } %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1' } %meta{ name: 'theme-color', content: user_theme_primary_color } diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index 3c4b612f33f..b7cf7b7468f 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -8,6 +8,7 @@ = dispensable_render 'shared/outdated_browser' = dispensable_render_if_exists "layouts/header/licensed_user_count_threshold" = dispensable_render_if_exists "layouts/header/token_expiry_notification" + = dispensable_render "shared/projects/inactive_project_deletion_alert" = dispensable_render "layouts/broadcast" = dispensable_render "layouts/header/read_only_banner" = dispensable_render "layouts/header/registration_enabled_callout" @@ -15,12 +16,12 @@ = yield :flash_message = dispensable_render "shared/service_ping_consent" = dispensable_render_if_exists "layouts/header/ee_subscribable_banner" - = dispensable_render_if_exists "layouts/header/seats_count_alert" + = dispensable_render_if_exists "layouts/header/seat_count_alert" = dispensable_render_if_exists "shared/namespace_storage_limit_alert" = dispensable_render_if_exists "shared/namespace_user_cap_reached_alert" = dispensable_render_if_exists "shared/new_user_signups_cap_reached_alert" = yield :page_level_alert - = yield :user_over_limit_free_plan_alert + = yield :free_user_cap_alert = yield :group_invite_members_banner - unless @hide_breadcrumbs = render "layouts/nav/breadcrumbs" diff --git a/app/views/layouts/_visual_review.html.haml b/app/views/layouts/_visual_review.html.haml new file mode 100644 index 00000000000..73da841964a --- /dev/null +++ b/app/views/layouts/_visual_review.html.haml @@ -0,0 +1 @@ += javascript_tag "", visual_review_toolbar_options diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index bdab5d7ea07..455d18a5ae8 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -8,6 +8,7 @@ %body{ class: body_classes, data: body_data } = render "layouts/init_auto_complete" if @gfm_form = render "layouts/init_client_detection_flags" + = render "layouts/visual_review" if ENV['REVIEW_APPS_ENABLED'] = render 'peek/bar' = header_message = render partial: "layouts/header/default", locals: { project: @project, group: @group } diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 3cae8186750..911cb85de53 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -6,13 +6,10 @@ .container-fluid .header-content.js-header-content .title-container.hide-when-top-nav-responsive-open.gl-transition-medium.gl-display-flex.gl-align-items-stretch.gl-pt-0 - %h1.title + .title %span.gl-sr-only GitLab = link_to root_path, title: _('Dashboard'), id: 'logo', **tracking_attrs('main_navigation', 'click_gitlab_logo_link', 'navigation') do - %span{ :class => "gl-display-none gl-lg-display-flex" } - = brand_header_logo({add_gitlab_white_text: true}) - %span{ :class => "gl-lg-display-none! gl-display-flex" } - = brand_header_logo + = brand_header_logo - if Gitlab.com_and_canary? = link_to Gitlab::Saas.canary_toggle_com_url, class: 'canary-badge bg-transparent', data: { qa_selector: 'canary_badge_link' }, target: :_blank, rel: 'noopener noreferrer' do = gl_badge_tag({ variant: :success, size: :sm }) do @@ -32,12 +29,12 @@ = render "layouts/nav/top_nav" .navbar-collapse.gl-transition-medium.collapse - %ul.nav.navbar-nav.gl-w-full + %ul.nav.navbar-nav.gl-w-full.gl-align-items-center.gl-justify-content-end - if current_user = render 'layouts/header/new_dropdown', class: 'gl-display-none gl-sm-display-block gl-white-space-nowrap gl-text-right' - if top_nav_show_search - search_menu_item = top_nav_search_menu_item_attrs - %li.nav-item.header-search-new.gl-display-none.gl-lg-display-block.m-auto.gl-w-full + %li.nav-item.header-search-new.gl-display-none.gl-lg-display-block.gl-w-full - unless current_controller?(:search) - if Feature.enabled?(:new_header_search) = render 'layouts/header_search' diff --git a/app/views/layouts/header/_registration_enabled_callout.html.haml b/app/views/layouts/header/_registration_enabled_callout.html.haml index 03e961bda8f..dd3d14a5678 100644 --- a/app/views/layouts/header/_registration_enabled_callout.html.haml +++ b/app/views/layouts/header/_registration_enabled_callout.html.haml @@ -2,10 +2,10 @@ = render Pajamas::AlertComponent.new(title: _('Anyone can register for an account.'), variant: :warning, - alert_class: 'js-registration-enabled-callout', - alert_data: { feature_id: Users::CalloutsHelper::REGISTRATION_ENABLED_CALLOUT, - dismiss_endpoint: callouts_path }, - close_button_data: { testid: 'close-registration-enabled-callout' }) do |c| + alert_options: { class: 'js-registration-enabled-callout', + data: { feature_id: Users::CalloutsHelper::REGISTRATION_ENABLED_CALLOUT, + dismiss_endpoint: callouts_path }}, + close_button_options: { data: { testid: 'close-registration-enabled-callout' }}) do |c| = c.body do = _('Only allow anyone to register for accounts on GitLab instances that you intend to be used by anyone. Allowing anyone to register makes GitLab instances more vulnerable.') = c.actions do diff --git a/app/views/layouts/header/_storage_enforcement_banner.html.haml b/app/views/layouts/header/_storage_enforcement_banner.html.haml index 6613130fdf3..c117f22a402 100644 --- a/app/views/layouts/header/_storage_enforcement_banner.html.haml +++ b/app/views/layouts/header/_storage_enforcement_banner.html.haml @@ -4,11 +4,11 @@ - return unless banner_info.present? = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'js-storage-enforcement-banner', - alert_data: { feature_id: banner_info[:callouts_feature_name], - dismiss_endpoint: banner_info[:callouts_path], - group_id: namespace.id, - defer_links: "true" }) do |c| + alert_options: { class: 'js-storage-enforcement-banner', + data: { feature_id: banner_info[:callouts_feature_name], + dismiss_endpoint: banner_info[:callouts_path], + group_id: namespace.id, + defer_links: "true" }}) do |c| = c.body do = banner_info[:text] = banner_info[:learn_more_link] diff --git a/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml b/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml index ccb660c050e..dd2d23320be 100644 --- a/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml +++ b/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml @@ -4,8 +4,8 @@ %li.expander %button.text-expander.has-tooltip.js-breadcrumbs-collapsed-expander{ type: "button", data: { container: "body" }, "aria-label": button_tooltip, title: button_tooltip } = sprite_icon("ellipsis_h", size: 12) - = sprite_icon("angle-right", size: 8, css_class: "breadcrumbs-list-angle") + = sprite_icon("chevron-lg-right", size: 8, css_class: "breadcrumbs-list-angle") - @breadcrumb_collapsed_links[dropdown_location].each_with_index do |link, index| %li{ :class => "gl-display-none! breadcrumbs-detail-item" } = link - = sprite_icon("angle-right", size: 8, css_class: "breadcrumbs-list-angle") + = sprite_icon("chevron-lg-right", size: 8, css_class: "breadcrumbs-list-angle") diff --git a/app/views/layouts/notify.html.haml b/app/views/layouts/notify.html.haml index 3b979f69cac..d9f16a89fbc 100644 --- a/app/views/layouts/notify.html.haml +++ b/app/views/layouts/notify.html.haml @@ -5,6 +5,10 @@ GitLab - if Feature.enabled?(:enhanced_notify_css) = stylesheet_link_tag 'notify_enhanced' + %style{ type: 'text/css', 'data-premailer': 'ignore' } + -# The MUA automatically turns some text into links. + -# Match the color of explicit links ($blue-600 from typography.scss). + a { color: #1068bf; } - else = stylesheet_link_tag 'notify' = yield :head diff --git a/app/views/layouts/service_desk.html.haml b/app/views/layouts/service_desk.html.haml index a838ba91d26..bab7bc6b9da 100644 --- a/app/views/layouts/service_desk.html.haml +++ b/app/views/layouts/service_desk.html.haml @@ -7,6 +7,10 @@ -# haml-lint:enable NoPlainNodes - if Feature.enabled?(:enhanced_notify_css) = stylesheet_link_tag 'notify_enhanced' + %style{ type: 'text/css', 'data-premailer': 'ignore' } + -# The MUA automatically turns some text into links. + -# Match the color of explicit links ($blue-600 from typography.scss). + a { color: #1068bf; } - else = stylesheet_link_tag 'notify' = yield :head diff --git a/app/views/layouts/terms.html.haml b/app/views/layouts/terms.html.haml index 91301e1e226..c9baf0cd2b8 100644 --- a/app/views/layouts/terms.html.haml +++ b/app/views/layouts/terms.html.haml @@ -16,16 +16,17 @@ %div{ class: "#{container_class} limit-container-width" } .content{ id: "content-body" } - .gl-card - .gl-card-header + = render Pajamas::CardComponent.new do |c| + = c.header do = brand_header_logo({add_gitlab_black_text: true}) - - if header_link?(:user_dropdown) - .navbar-collapse - %ul.nav.navbar-nav - %li.header-user.dropdown - = link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do - = image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar", data: { qa_selector: 'user_avatar' } - = sprite_icon('angle-down', css_class: 'caret-down') - .dropdown-menu.dropdown-menu-right - = render 'layouts/header/current_user_dropdown' - = yield + = c.body do + - if header_link?(:user_dropdown) + .navbar-collapse + %ul.nav.navbar-nav + %li.header-user.dropdown + = link_to current_user, class: user_dropdown_class, data: { toggle: "dropdown" } do + = image_tag avatar_icon_for_user(current_user, 23), width: 23, height: 23, class: "header-user-avatar", data: { qa_selector: 'user_avatar' } + = sprite_icon('chevron-down') + .dropdown-menu.dropdown-menu-right + = render 'layouts/header/current_user_dropdown' + = yield diff --git a/app/views/notify/approved_merge_request_email.html.haml b/app/views/notify/approved_merge_request_email.html.haml index 4393186a8ad..c51fe02370d 100644 --- a/app/views/notify/approved_merge_request_email.html.haml +++ b/app/views/notify/approved_merge_request_email.html.haml @@ -61,7 +61,7 @@ %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" } %tr.header %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" } - %img{ alt: "GitLab", height: "55", src: image_url('mailers/gitlab_logo.png'), width: "55" }/ + = header_logo %tr %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" } %table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" } diff --git a/app/views/notify/merge_when_pipeline_succeeds_email.html.haml b/app/views/notify/merge_when_pipeline_succeeds_email.html.haml index e4d138cce96..550d386c843 100644 --- a/app/views/notify/merge_when_pipeline_succeeds_email.html.haml +++ b/app/views/notify/merge_when_pipeline_succeeds_email.html.haml @@ -61,7 +61,7 @@ %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" } %tr.header %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" } - %img{ alt: "GitLab", height: "55", src: image_url('mailers/gitlab_logo.png'), width: "55" } + = header_logo %tr %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" } %table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" } diff --git a/app/views/notify/unapproved_merge_request_email.html.haml b/app/views/notify/unapproved_merge_request_email.html.haml index 8a4138b7515..ae58ccd3995 100644 --- a/app/views/notify/unapproved_merge_request_email.html.haml +++ b/app/views/notify/unapproved_merge_request_email.html.haml @@ -61,7 +61,7 @@ %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;background-color:#6b4fbb;height:4px;font-size:4px;line-height:4px;" } %tr.header %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;padding:25px 0;font-size:13px;line-height:1.6;color:#5c5c5c;" } - %img{ alt: "GitLab", height: "55", src: image_url('mailers/gitlab_logo.png'), width: "55" }/ + = header_logo %tr %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;" } %table.wrapper{ border: "0", cellpadding: "0", cellspacing: "0", style: "width:640px;margin:0 auto;border-collapse:separate;border-spacing:0;" } diff --git a/app/views/notify/user_auto_banned_email.html.haml b/app/views/notify/user_auto_banned_email.html.haml new file mode 100644 index 00000000000..d88c06526eb --- /dev/null +++ b/app/views/notify/user_auto_banned_email.html.haml @@ -0,0 +1,9 @@ +- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe +- link_end = '</a>'.html_safe += email_default_heading(_("We've detected some unusual activity")) +%p + = _('We want to let you know %{username} has been banned from your GitLab instance due to them downloading more than %{max_project_downloads} project repositories within %{within_minutes} minutes.') % { username: sanitize_name(@user.name), max_project_downloads: @max_project_downloads, within_minutes: @within_minutes } +%p + = _('If this is a mistake, you can %{link_start}unban them%{link_end}.').html_safe % { link_start: link_start % { url: admin_users_url(filter: 'banned') }, link_end: link_end } +%p + = _('You can adjust rules on auto-banning %{link_start}here%{link_end}.').html_safe % { link_start: link_start % { url: network_admin_application_settings_url(anchor: 'js-ip-limits-settings') }, link_end: link_end } diff --git a/app/views/notify/user_auto_banned_email.text.erb b/app/views/notify/user_auto_banned_email.text.erb new file mode 100644 index 00000000000..0469ee9788c --- /dev/null +++ b/app/views/notify/user_auto_banned_email.text.erb @@ -0,0 +1,7 @@ +<%= _("We've detected some unusual activity") %> + +<%= _('We want to let you know %{username} has been banned from your GitLab instance due to them downloading more than %{max_project_downloads} project repositories within %{within_minutes} minutes.') % { username: sanitize_name(@user.name), max_project_downloads: @max_project_downloads, within_minutes: @within_minutes } %> + +<%= _('If this is a mistake, you can unban them: %{url}.') % { url: admin_users_url(filter: 'banned') } %> + +<%= _('You can adjust rules on auto-banning here: %{url}.') % { url: network_admin_application_settings_url(anchor: 'js-ip-limits-settings') } %> diff --git a/app/views/profiles/_email_settings.html.haml b/app/views/profiles/_email_settings.html.haml index 35cad79b6fd..457d6690a78 100644 --- a/app/views/profiles/_email_settings.html.haml +++ b/app/views/profiles/_email_settings.html.haml @@ -7,7 +7,7 @@ .form-group.gl-form-group = form.label :email, _('Email') - = form.text_field :email, required: true, class: 'gl-form-input form-control gl-form-input-lg', value: (@user.email unless @user.temp_oauth_email?), readonly: readonly || email_change_disabled + = form.text_field :email, required: true, class: 'gl-form-input form-control gl-md-form-input-lg', value: (@user.email unless @user.temp_oauth_email?), readonly: readonly || email_change_disabled %small.form-text.text-gl-muted = help_text.html_safe @@ -16,7 +16,7 @@ .form-group.gl-form-group = form.label :public_email, s_('Profiles|Public email') - .gl-form-input-lg + .gl-md-form-input-lg = form.select :public_email, options_for_select(@user.public_verified_emails, selected: @user.public_email), { include_blank: s_("Profiles|Do not show on profile") }, @@ -29,7 +29,7 @@ - commit_email_link_start = '<a href="%{url}">'.html_safe % { url: commit_email_link_url } - commit_email_docs_link = s_('Profiles|This email will be used for web based operations, such as edits and merges. %{commit_email_link_start}Learn more%{commit_email_link_end}').html_safe % { commit_email_link_start: commit_email_link_start, commit_email_link_end: '</a>'.html_safe } = form.label :commit_email, s_('Profiles|Commit email') - .gl-form-input-lg + .gl-md-form-input-lg = form.select :commit_email, options_for_select(commit_email_select_options(@user), selected: @user.commit_email), {}, diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index bbbb8154c51..745d3c62c5d 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -2,15 +2,15 @@ - @content_class = "limit-container-width" unless fluid_layout - if current_user.ldap_user? - = render Pajamas::AlertComponent.new(alert_class: 'gl-my-5', + = render Pajamas::AlertComponent.new(alert_options: { class: 'gl-my-5' }, dismissible: false) do |c| = c.body do = s_('Profiles|Some options are unavailable for LDAP accounts') - if params[:two_factor_auth_enabled_successfully] = render Pajamas::AlertComponent.new(variant: :success, - alert_class: 'gl-my-5', - close_button_class: 'js-close-2fa-enabled-success-alert') do |c| + alert_options: { class: 'gl-my-5' }, + close_button_options: { class: 'js-close-2fa-enabled-success-alert' }) do |c| = c.body do = html_escape(_('You have set up 2FA for your account! If you lose access to your 2FA device, you can use your recovery codes to access your account. Alternatively, if you upload an SSH key, you can %{anchorOpen}use that key to generate additional recovery codes%{anchorClose}.')) % { anchorOpen: '<a href="%{href}">'.html_safe % { href: help_page_path('user/profile/account/two_factor_authentication', anchor: 'generate-new-recovery-codes-using-ssh') }, anchorClose: '</a>'.html_safe } @@ -85,7 +85,7 @@ %p = s_('Profiles|GitLab is unable to verify your identity automatically. For security purposes, you must set a password by %{openingTag}resetting your password%{closingTag} to delete your account.').html_safe % { openingTag: "<a href='#{reset_profile_password_path}' rel=\"nofollow\" data-method=\"put\">".html_safe, closingTag: '</a>'.html_safe} %p - = s_('Profiles|If after setting a password, the option to delete your account is still not available, please email %{data_request} to begin the account deletion process.').html_safe % { data_request: mail_to('personal-data-request@gitlab.com') } + = s_('Profiles|If after setting a password, the option to delete your account is still not available, please %{link_start}submit a request%{link_end} to begin the account deletion process.').html_safe % { link_start: '<a href="https://support.gitlab.io/account-deletion/" rel="nofollow noreferrer noopener" target="_blank">'.html_safe, link_end: '</a>'.html_safe} - else %p = s_("Profiles|You don't have access to delete this user.") diff --git a/app/views/profiles/chat_names/_chat_name.html.haml b/app/views/profiles/chat_names/_chat_name.html.haml index 8f80c9fdc6c..0b45869bdf9 100644 --- a/app/views/profiles/chat_names/_chat_name.html.haml +++ b/app/views/profiles/chat_names/_chat_name.html.haml @@ -6,11 +6,11 @@ - if can?(current_user, :read_project, project) = link_to project.full_name, project_path(project) - else - .light= _('N/A') + .light= _('Not applicable.') %td %strong - if can?(current_user, :admin_project, project) - = link_to integration.title, edit_project_integration_path(project, integration) + = link_to integration.title, edit_project_settings_integration_path(project, integration) - else = integration.title %td diff --git a/app/views/profiles/chat_names/new.html.haml b/app/views/profiles/chat_names/new.html.haml index f008abf376d..303b8b10027 100644 --- a/app/views/profiles/chat_names/new.html.haml +++ b/app/views/profiles/chat_names/new.html.haml @@ -1,4 +1,4 @@ -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Authorization required") %main{ :role => "main" } %p.h4 diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index fef55f5d384..69f765ee163 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -56,7 +56,7 @@ = gl_badge_tag s_('Profiles|Notification email'), variant: :info - unless email.confirmed? - confirm_title = "#{email.confirmation_sent_at ? _('Resend confirmation email') : _('Send confirmation email')}" - = link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'gl-button btn btn-sm btn-warning gl-ml-3' + = link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'gl-button btn btn-sm btn-default gl-ml-3' = link_to profile_email_path(email), data: { confirm: _('Are you sure?'), qa_selector: 'delete_email_link'}, method: :delete, class: 'gl-button btn btn-sm btn-danger gl-ml-3' do %span.sr-only= _('Remove') diff --git a/app/views/profiles/keys/_form.html.haml b/app/views/profiles/keys/_form.html.haml index 941b8545745..a749fbd1eec 100644 --- a/app/views/profiles/keys/_form.html.haml +++ b/app/views/profiles/keys/_form.html.haml @@ -1,7 +1,7 @@ - max_date = ::Gitlab::CurrentSettings.max_ssh_key_lifetime_from_now.to_date if ssh_key_expiration_policy_enabled? %div = form_for [:profile, @key], html: { class: 'js-requires-input' } do |f| - = form_errors(@key) + = form_errors(@key, pajamas_alert: true) .form-group = f.label :key, s_('Profiles|Key'), class: 'label-bold' @@ -23,7 +23,8 @@ %strong= _('Oops, are you sure?') %p= s_("Profiles|Publicly visible private SSH keys can compromise your system.") - %button.btn.gl-button.btn-confirm.js-add-ssh-key-validation-confirm-submit= _("Yes, add it") - + = render Pajamas::ButtonComponent.new(variant: :confirm, + button_options: { class: 'js-add-ssh-key-validation-confirm-submit' }) do + = _("Yes, add it") .gl-mt-3 = f.submit s_('Profiles|Add key'), class: "gl-button btn btn-confirm js-add-ssh-key-validation-original-submit qa-add-key-button" diff --git a/app/views/profiles/keys/_key_details.html.haml b/app/views/profiles/keys/_key_details.html.haml index 8016d989ff1..8f7ccadd108 100644 --- a/app/views/profiles/keys/_key_details.html.haml +++ b/app/views/profiles/keys/_key_details.html.haml @@ -19,7 +19,7 @@ %strong= @key.last_used_at.try(:to_s, :medium) || _('Never') .col-md-8 - = form_errors(@key, type: 'key') unless @key.valid? + = form_errors(@key, type: 'key', pajamas_alert: true) unless @key.valid? %pre.well-pre = @key.key .card diff --git a/app/views/profiles/passwords/new.html.haml b/app/views/profiles/passwords/new.html.haml index 9154c94abb6..a2180dc68a6 100644 --- a/app/views/profiles/passwords/new.html.haml +++ b/app/views/profiles/passwords/new.html.haml @@ -1,7 +1,7 @@ - page_title _('New Password') - breadcrumb_title _('New Password') -%h3.page-title= _('Set up new password') +%h1.page-title.gl-font-size-h-display= _('Set up new password') %hr = form_for @user, url: profile_password_path, method: :post do |f| %p.slead diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml index 887d07f7a20..636defb3f10 100644 --- a/app/views/profiles/personal_access_tokens/index.html.haml +++ b/app/views/profiles/personal_access_tokens/index.html.haml @@ -15,22 +15,16 @@ = s_('AccessTokens|They are the only accepted password when you have Two-Factor Authentication (2FA) enabled.') .col-lg-8 - - if @new_personal_access_token - = render 'shared/access_tokens/created_container', - type: type, - new_token_value: @new_personal_access_token + #js-new-access-token-app{ data: { access_token_type: type } } = render 'shared/access_tokens/form', + ajax: true, type: type, path: profile_personal_access_tokens_path, token: @personal_access_token, scopes: @scopes, help_path: help_page_path('user/profile/personal_access_tokens.md', anchor: 'personal-access-token-scopes') - = render 'shared/access_tokens/table', - type: type, - type_plural: type_plural, - active_tokens: @active_personal_access_tokens, - revoke_route_helper: ->(token) { revoke_profile_personal_access_token_path(token) } + #js-access-token-table-app{ data: { access_token_type: type, access_token_type_plural: type_plural, initial_active_access_tokens: @active_personal_access_tokens.to_json } } #js-tokens-app{ data: { tokens_data: tokens_app_data } } diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 8c799a5e3fe..a63e02fca1d 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -1,6 +1,7 @@ - page_title _('Preferences') - @content_class = "limit-container-width" unless fluid_layout - user_theme_id = Gitlab::Themes.for_user(@user).id +- user_color_schema_id = Gitlab::ColorSchemes.for_user(@user).id - user_fields = { theme: user_theme_id, gitpod_enabled: @user.gitpod_enabled, sourcegraph_enabled: @user.sourcegraph_enabled }.to_json - @themes = Gitlab::Themes::available_themes.to_json - data_attributes = { themes: @themes, integration_views: integration_views.to_json, user_fields: user_fields, body_classes: Gitlab::Themes.body_classes, profile_preferences_path: profile_preferences_path } @@ -12,16 +13,17 @@ .row.gl-mt-3.js-preferences-form.js-search-settings-section .col-lg-4.application-theme#navigation-theme %h4.gl-mt-0 - = s_('Preferences|Navigation theme') + = s_('Preferences|Color theme') %p - = s_('Preferences|Customize the appearance of the application header and navigation sidebar.') + = s_('Preferences|Customize the color of GitLab.') .col-lg-8.application-theme .row - Gitlab::Themes.each do |theme| %label.col-6.col-sm-4.col-md-3.gl-mb-5.gl-text-center .preview{ class: theme.css_class } - = f.radio_button :theme_id, theme.id, checked: user_theme_id == theme.id - = theme.name + = f.gitlab_ui_radio_component :theme_id, theme.id, + theme.name, + radio_options: { checked: user_theme_id == theme.id } .col-sm-12 %hr @@ -38,8 +40,9 @@ - Gitlab::ColorSchemes.each do |scheme| = label_tag do .preview= image_tag "#{scheme.css_class}-scheme-preview.png" - = f.radio_button :color_scheme_id, scheme.id - = scheme.name + = f.gitlab_ui_radio_component :color_scheme_id, scheme.id, + scheme.name, + radio_options: { checked: user_color_schema_id == scheme.id } .col-sm-12 %hr diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 107c7cebc61..d1f1ff892d5 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -109,44 +109,44 @@ = f.text_field :id, class: 'gl-form-input form-control', readonly: true .form-group.gl-form-group = f.label :pronouns, s_('Profiles|Pronouns') - = f.text_field :pronouns, class: 'gl-form-input form-control gl-form-input-lg' + = f.text_field :pronouns, class: 'gl-form-input form-control gl-md-form-input-lg' %small.form-text.text-gl-muted = s_("Profiles|Enter your pronouns to let people know how to refer to you") .form-group.gl-form-group = f.label :pronunciation, s_('Profiles|Pronunciation') - = f.text_field :pronunciation, class: 'gl-form-input form-control gl-form-input-lg' + = f.text_field :pronunciation, class: 'gl-form-input form-control gl-md-form-input-lg' %small.form-text.text-gl-muted = s_("Profiles|Enter how your name is pronounced to help people address you correctly") = render_if_exists 'profiles/extra_settings', form: f = render_if_exists 'profiles/email_settings', form: f .form-group.gl-form-group = f.label :skype - = f.text_field :skype, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|username") + = f.text_field :skype, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|username") .form-group.gl-form-group = f.label :linkedin - = f.text_field :linkedin, class: 'gl-form-input form-control gl-form-input-lg' + = f.text_field :linkedin, class: 'gl-form-input form-control gl-md-form-input-lg' %small.form-text.text-gl-muted = s_("Profiles|Your LinkedIn profile name from linkedin.com/in/profilename") .form-group.gl-form-group = f.label :twitter - = f.text_field :twitter, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|@username") + = f.text_field :twitter, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|@username") .form-group.gl-form-group = f.label :website_url, s_('Profiles|Website url') - = f.text_field :website_url, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|https://website.com") + = f.text_field :website_url, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|https://website.com") .form-group.gl-form-group = f.label :location, s_('Profiles|Location') - if @user.read_only_attribute?(:location) - = f.text_field :location, class: 'gl-form-input form-control gl-form-input-lg', readonly: true + = f.text_field :location, class: 'gl-form-input form-control gl-md-form-input-lg', readonly: true %small.form-text.text-gl-muted = s_("Profiles|Your location was automatically set based on your %{provider_label} account") % { provider_label: attribute_provider_label(:location) } - else - = f.text_field :location, class: 'gl-form-input form-control gl-form-input-lg', placeholder: s_("Profiles|City, country") + = f.text_field :location, class: 'gl-form-input form-control gl-md-form-input-lg', placeholder: s_("Profiles|City, country") .form-group.gl-form-group = f.label :job_title, s_('Profiles|Job title') - = f.text_field :job_title, class: 'gl-form-input form-control gl-form-input-lg' + = f.text_field :job_title, class: 'gl-form-input form-control gl-md-form-input-lg' .form-group.gl-form-group = f.label :organization, s_('Profiles|Organization') - = f.text_field :organization, class: 'gl-form-input form-control gl-form-input-lg' + = f.text_field :organization, class: 'gl-form-input form-control gl-md-form-input-lg' %small.form-text.text-gl-muted = s_("Profiles|Who you represent or work for") .form-group.gl-form-group diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index ace644a493b..845baae3bb2 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -24,8 +24,9 @@ - register_2fa_token = _('We recommend cloud-based mobile authenticator apps such as Authy, Duo Mobile, and LastPass. They can restore access if you lose your hardware device.') = register_2fa_token.html_safe .row.gl-mb-3 - .col-md-4.gl-pt-2{ style: 'background: #fff' } - = raw @qr_code + .col-md-4.gl-min-w-fit-content + .gl-p-2.gl-mb-3{ style: 'background: #fff' } + = raw @qr_code .col-md-8 .account-well %p.gl-mt-0.gl-mb-0 diff --git a/app/views/projects/_clusters_deprecation_alert.html.haml b/app/views/projects/_clusters_deprecation_alert.html.haml new file mode 100644 index 00000000000..67e65b0e81b --- /dev/null +++ b/app/views/projects/_clusters_deprecation_alert.html.haml @@ -0,0 +1,2 @@ +- if show_clusters_alert?(@project) + .js-clusters-deprecation-alert{ data: { message: clusters_deprecation_alert_message } } diff --git a/app/views/projects/_commit_button.html.haml b/app/views/projects/_commit_button.html.haml index d987c4b1033..659bca25533 100644 --- a/app/views/projects/_commit_button.html.haml +++ b/app/views/projects/_commit_button.html.haml @@ -1,7 +1,8 @@ .form-actions.gl-display-flex - = button_tag 'Commit changes', id: 'commit-changes', class: 'gl-button btn btn-confirm js-commit-button qa-commit-button' + = render Pajamas::ButtonComponent.new(type: :submit, variant: :confirm, button_options: { id: 'commit-changes', class: 'js-commit-button qa-commit-button' }) do + = _('Commit changes') - = link_to _('Cancel'), cancel_path, - id: 'cancel-changes', class: 'gl-button btn btn-default gl-ml-3', data: {confirm: leave_edit_message, confirm_btn_variant: "danger"}, aria: { label: _('Discard changes') } + = render Pajamas::ButtonComponent.new(href: cancel_path, button_options: { class: 'gl-ml-3', id: 'cancel-changes', aria: { label: _('Discard changes') }, data: { confirm: leave_edit_message, confirm_btn_variant: "danger" } }) do + = _('Cancel') = render 'shared/projects/edit_information' diff --git a/app/views/projects/_deletion_failed.html.haml b/app/views/projects/_deletion_failed.html.haml index 85a7b9eb22b..489d303c5b9 100644 --- a/app/views/projects/_deletion_failed.html.haml +++ b/app/views/projects/_deletion_failed.html.haml @@ -3,7 +3,7 @@ = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, - alert_class: 'project-deletion-failed-message') do |c| + alert_options: { class: 'project-deletion-failed-message' }) do |c| = c.body do This project was scheduled for deletion, but failed with the following message: = project.delete_error diff --git a/app/views/projects/_errors.html.haml b/app/views/projects/_errors.html.haml index 2dba22d3be6..5982aaf3622 100644 --- a/app/views/projects/_errors.html.haml +++ b/app/views/projects/_errors.html.haml @@ -1 +1 @@ -= form_errors(@project) += form_errors(@project, pajamas_alert: true) diff --git a/app/views/projects/_import_project_pane.html.haml b/app/views/projects/_import_project_pane.html.haml index 6dfb338a916..cb15858a935 100644 --- a/app/views/projects/_import_project_pane.html.haml +++ b/app/views/projects/_import_project_pane.html.haml @@ -53,7 +53,7 @@ - if gitea_import_enabled? %div - = link_to new_import_gitea_path, class: 'gl-button btn-default btn import_gitea js-import-project-btn', data: { platform: 'gitea', **tracking_attrs_data(track_label, 'click_button', 'gitea') } do + = link_to new_import_gitea_path(namespace_id: namespace_id), class: 'gl-button btn-default btn import_gitea js-import-project-btn', data: { platform: 'gitea', **tracking_attrs_data(track_label, 'click_button', 'gitea') } do .gl-button-icon = custom_icon('gitea_logo') Gitea @@ -63,18 +63,18 @@ %button.gl-button.btn-default.btn.btn-svg.js-toggle-button.js-import-git-toggle-button.js-import-project-btn{ type: "button", data: { platform: 'repo_url', toggle_open_class: 'active', **tracking_attrs_data(track_label, 'click_button', 'repo_url') } } .gl-button-icon = sprite_icon('link', css_class: 'gl-icon') - = _('Repo by URL') + = _('Repository by URL') - if manifest_import_enabled? %div - = link_to new_import_manifest_path, class: 'gl-button btn-default btn import_manifest js-import-project-btn', data: { platform: 'manifest_file', **tracking_attrs_data(track_label, 'click_button', 'manifest_file') } do + = link_to new_import_manifest_path(namespace_id: namespace_id), class: 'gl-button btn-default btn import_manifest js-import-project-btn', data: { platform: 'manifest_file', **tracking_attrs_data(track_label, 'click_button', 'manifest_file') } do .gl-button-icon = sprite_icon('doc-text') Manifest file - if phabricator_import_enabled? %div - = link_to new_import_phabricator_path, class: 'gl-button btn-default btn import_phabricator js-import-project-btn', data: { platform: 'phabricator', track_label: "#{track_label}", track_action: "click_button", track_property: "phabricator" } do + = link_to new_import_phabricator_path(namespace_id: namespace_id), class: 'gl-button btn-default btn import_phabricator js-import-project-btn', data: { platform: 'phabricator', track_label: "#{track_label}", track_action: "click_button", track_property: "phabricator" } do .gl-button-icon = custom_icon('issues') = _("Phabricator Tasks") diff --git a/app/views/projects/_invite_members_modal.html.haml b/app/views/projects/_invite_members_modal.html.haml index 6375a56bf5d..16288f4357a 100644 --- a/app/views/projects/_invite_members_modal.html.haml +++ b/app/views/projects/_invite_members_modal.html.haml @@ -1,5 +1,5 @@ - return unless can_admin_project_member?(project) .js-invite-members-modal{ data: { is_project: 'true', - access_levels: ProjectMember.access_level_roles.to_json, + access_levels: ProjectMember.permissible_access_level_roles(current_user, project).to_json, help_link: help_page_url('user/permissions') }.merge(common_invite_modal_dataset(project)).merge(users_filter_data(project.group)) } diff --git a/app/views/projects/_invite_members_side_nav_link.html.haml b/app/views/projects/_invite_members_side_nav_link.html.haml index fae681b1a71..b96a7608ce2 100644 --- a/app/views/projects/_invite_members_side_nav_link.html.haml +++ b/app/views/projects/_invite_members_side_nav_link.html.haml @@ -1,7 +1,8 @@ .js-invite-members-trigger{ data: { trigger_source: 'project-side-nav', icon: 'users', display_text: title, - trigger_element: 'side-nav'} } + trigger_element: 'side-nav', + qa_selector: 'invite_members_sidebar_button' } } = render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } = render 'projects/invite_members_modal', project: project diff --git a/app/views/projects/_last_push.html.haml b/app/views/projects/_last_push.html.haml index 5a2add9de1e..9845de17a11 100644 --- a/app/views/projects/_last_push.html.haml +++ b/app/views/projects/_last_push.html.haml @@ -1,8 +1,8 @@ - event = last_push_event - if event && show_last_push_widget?(event) = render Pajamas::AlertComponent.new(variant: :success, - alert_class: 'gl-mt-3', - close_button_class: 'js-close-banner') do |c| + alert_options: { class: 'gl-mt-3' }, + close_button_options: { class: 'js-close-banner' }) do |c| = c.body do %span= s_("LastPushEvent|You pushed to") %strong.gl-display-inline-flex.gl-max-w-50p{ data: { toggle: 'tooltip' }, title: event.ref_name } diff --git a/app/views/projects/_merge_request_merge_method_settings.html.haml b/app/views/projects/_merge_request_merge_method_settings.html.haml index cb660750632..f205fe2b9bf 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/_merge_request_merge_method_settings.html.haml @@ -1,38 +1,34 @@ - form = local_assigns.fetch(:form) +- labelMerge = s_('ProjectSettings|Merge commit') +- everyMergeCommit = s_('ProjectSettings|Every merge creates a merge commit.') + +- labelRebase = s_('ProjectSettings|Merge commit with semi-linear history') +- rebaseUpToDate = s_('ProjectSettings|Merging is only allowed when the source branch is up-to-date with its target.') +- rebaseSemiLinear = s_('ProjectSettings|When semi-linear merge is not possible, the user is given the option to rebase.') + +- labelFastForward = s_('ProjectSettings|Fast-forward merge') +- noMergeCommit = s_('ProjectSettings|No merge commits are created.') +- ffOnly = s_('ProjectSettings|Fast-forward merges only.') +- ffConflictRebase = s_('ProjectSettings|When there is a merge conflict, the user is given the option to rebase.') +- ffTrains = s_('ProjectSettings|If merge trains are enabled, merging is only possible if the branch can be rebased without conflicts.') +- ffTrainsHelp = link_to s_('ProjectSettings|What are merge trains?'), help_page_path('ci/pipelines/merge_trains.md', anchor: 'enable-merge-trains'), target: '_blank', rel: 'noopener noreferrer' + .form-group %b= s_('ProjectSettings|Merge method') %p.text-secondary = s_('ProjectSettings|Determine what happens to the commit history when you merge a merge request.') = link_to s_('ProjectSettings|How do they differ?'), help_page_path('user/project/merge_requests/methods/index.md'), target: '_blank', rel: 'noopener noreferrer' - .form-check.mb-2 - = form.radio_button :merge_method, :merge, class: "js-merge-method-radio form-check-input" - = label_tag :project_merge_method_merge, class: 'form-check-label' do - = s_('ProjectSettings|Merge commit') - .text-secondary - = s_('ProjectSettings|Every merge creates a merge commit.') - - .form-check.mb-2 - = form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio form-check-input" - = label_tag :project_merge_method_rebase_merge, class: 'form-check-label' do - = s_('ProjectSettings|Merge commit with semi-linear history') - .text-secondary - = s_('ProjectSettings|Every merge creates a merge commit.') - %br - = s_('ProjectSettings|Merging is only allowed when the source branch is up-to-date with its target.') - %br - = s_('ProjectSettings|When semi-linear merge is not possible, the user is given the option to rebase.') - - .form-check.mb-2 - = form.radio_button :merge_method, :ff, class: "js-merge-method-radio form-check-input", data: { qa_selector: 'merge_ff_radio' } - = label_tag :project_merge_method_ff, class: 'form-check-label' do - = s_('ProjectSettings|Fast-forward merge') - .text-secondary - = s_('ProjectSettings|No merge commits are created.') - %br - = s_('ProjectSettings|Fast-forward merges only.') - %br - = s_('ProjectSettings|When there is a merge conflict, the user is given the option to rebase.') - %div - = s_('ProjectSettings|If merge trains are enabled, merging is only possible if the branch can be rebased without conflicts.') - = link_to s_('ProjectSettings|What are merge trains?'), help_page_path('ci/pipelines/merge_trains.md', anchor: 'enable-merge-trains'), target: '_blank', rel: 'noopener noreferrer' + = form.gitlab_ui_radio_component :merge_method, + :merge, + labelMerge, + help_text: everyMergeCommit + = form.gitlab_ui_radio_component :merge_method, + :rebase_merge, + labelRebase, + help_text: (everyMergeCommit + "<br />" + rebaseUpToDate + "<br />" + rebaseSemiLinear).html_safe + = form.gitlab_ui_radio_component :merge_method, + :ff, + labelFastForward, + help_text: (noMergeCommit + "<br />" + ffOnly + "<br />" + ffConflictRebase + "<br />" + ffTrains + " " + ffTrainsHelp).html_safe, + radio_options: { data: { qa_selector: 'merge_ff_radio' } } diff --git a/app/views/projects/_merge_request_squash_options_settings.html.haml b/app/views/projects/_merge_request_squash_options_settings.html.haml index bf3000f2b5e..4b428363646 100644 --- a/app/views/projects/_merge_request_squash_options_settings.html.haml +++ b/app/views/projects/_merge_request_squash_options_settings.html.haml @@ -7,34 +7,19 @@ = s_('ProjectSettings|Set the default behavior of this option in merge requests. Changes to this are also applied to existing merge requests.') = link_to "What is squashing?", help_page_path('user/project/merge_requests/squash_and_merge.md'), target: '_blank', rel: 'noopener noreferrer' - .form-check.gl-mb-2 - = settings.radio_button :squash_option, :never, class: "form-check-input" - = label_tag :project_project_setting_attributes_squash_option_never, class: 'form-check-label' do - .gl-font-weight-bold - = s_('ProjectSettings|Do not allow') - .text-secondary - = s_('ProjectSettings|Squashing is never performed and the checkbox is hidden.') - - .form-check.gl-mb-2 - = settings.radio_button :squash_option, :default_off, class: "form-check-input" - = label_tag :project_project_setting_attributes_squash_option_default_off, class: 'form-check-label' do - .gl-font-weight-bold - = s_('ProjectSettings|Allow') - .text-secondary - = s_('ProjectSettings|Checkbox is visible and unselected by default.') - - .form-check.gl-mb-2 - = settings.radio_button :squash_option, :default_on, class: "form-check-input" - = label_tag :project_project_setting_attributes_squash_option_default_on, class: 'form-check-label' do - .gl-font-weight-bold - = s_('ProjectSettings|Encourage') - .text-secondary - = s_('ProjectSettings|Checkbox is visible and selected by default.') - - .form-check.gl-mb-2 - = settings.radio_button :squash_option, :always, class: "form-check-input" - = label_tag :project_project_setting_attributes_squash_option_always, class: 'form-check-label' do - .gl-font-weight-bold - = s_('ProjectSettings|Require') - .text-secondary - = s_('ProjectSettings|Squashing is always performed. Checkbox is visible and selected, and users cannot change it.') + = settings.gitlab_ui_radio_component :squash_option, + :never, + s_('ProjectSettings|Do not allow'), + help_text: s_('ProjectSettings|Squashing is never performed and the checkbox is hidden.') + = settings.gitlab_ui_radio_component :squash_option, + :default_off, + s_('ProjectSettings|Allow'), + help_text: s_('ProjectSettings|Checkbox is visible and unselected by default.') + = settings.gitlab_ui_radio_component :squash_option, + :default_on, + s_('ProjectSettings|Encourage'), + help_text: s_('ProjectSettings|Checkbox is visible and selected by default.') + = settings.gitlab_ui_radio_component :squash_option, + :always, + s_('ProjectSettings|Require'), + help_text: s_('ProjectSettings|Squashing is always performed. Checkbox is visible and selected, and users cannot change it.') diff --git a/app/views/projects/_merge_request_target_project_settings.html.haml b/app/views/projects/_merge_request_target_project_settings.html.haml index 41d37884ac9..6f2917f24e0 100644 --- a/app/views/projects/_merge_request_target_project_settings.html.haml +++ b/app/views/projects/_merge_request_target_project_settings.html.haml @@ -8,16 +8,11 @@ %p.text-secondary = s_('ProjectSettings|The default target project for merge requests created in this fork project.') - .form-check.gl-mb-2 - = settings.radio_button :mr_default_target_self, false, class: "form-check-input" - = label_tag :project_project_setting_attributes_mr_default_target_self_false, class: 'form-check-label' do - .gl-font-weight-bold - = s_('ProjectSettings|Upstream project') - = @project.forked_from_project.full_name - - .form-check.gl-mb-2 - = settings.radio_button :mr_default_target_self, true, class: "form-check-input" - = label_tag :project_project_setting_attributes_mr_default_target_self_true, class: 'form-check-label' do - .gl-font-weight-bold - = s_('ProjectSettings|This project') - = @project.full_name + = settings.gitlab_ui_radio_component :mr_default_target_self, + false, + s_('ProjectSettings|Upstream project'), + help_text: @project.forked_from_project.full_name + = settings.gitlab_ui_radio_component :mr_default_target_self, + true, + s_('ProjectSettings|This project'), + help_text: @project.full_name diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 66fa1a69ef9..2cbb9758703 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -37,7 +37,7 @@ - link_start_group_path = '<a href="%{path}">' % { path: new_group_path } - project_tip = s_('ProjectsNew|Want to house several dependent projects under the same namespace? %{link_start}Create a group.%{link_end}') % { link_start: link_start_group_path, link_end: '</a>' } = project_tip.html_safe -= render Pajamas::AlertComponent.new(alert_class: "gl-mb-4 gl-display-none js-user-readme-repo", += render Pajamas::AlertComponent.new(alert_options: { class: "gl-mb-4 gl-display-none js-user-readme-repo" }, dismissible: false, variant: :success) do |c| = c.body do diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index 63cf4dfe0ab..cee3d9071b6 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -2,7 +2,7 @@ %section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded), data: { qa_selector: 'service_desk_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Service Desk') - %button.btn.gl-button.btn-default.js-settings-toggle + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') - link_start = "<a href='#{help_page_path('user/project/service_desk')}' target='_blank' rel='noopener noreferrer'>".html_safe %p= _('Enable and disable Service Desk. Some additional configuration might be required. %{link_start}Learn more%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml index db98b978f04..66066ceb5b2 100644 --- a/app/views/projects/_visibility_modal.html.haml +++ b/app/views/projects/_visibility_modal.html.haml @@ -5,7 +5,7 @@ .modal-dialog .modal-content .modal-header - %h3.page-title= _('Reduce this project’s visibility?') + %h1.page-title.gl-font-size-h-display= _('Reduce this project’s visibility?') %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } %span{ "aria-hidden": "true" }= sprite_icon("close") .modal-body diff --git a/app/views/projects/activity.html.haml b/app/views/projects/activity.html.haml index 6a4760c3954..e69c4f51ec4 100644 --- a/app/views/projects/activity.html.haml +++ b/app/views/projects/activity.html.haml @@ -1,4 +1,5 @@ - page_title _("Activity") += render_if_exists 'shared/minute_limit_banner', namespace: @project = render 'projects/last_push' = render 'projects/activity' diff --git a/app/views/projects/blob/_new_dir.html.haml b/app/views/projects/blob/_new_dir.html.haml index 3cc9fea56e2..3ae7741d24d 100644 --- a/app/views/projects/blob/_new_dir.html.haml +++ b/app/views/projects/blob/_new_dir.html.haml @@ -2,7 +2,7 @@ .modal-dialog.modal-lg .modal-content .modal-header - %h3.page-title= _('Create New Directory') + %h1.page-title.gl-font-size-h-display= _('Create New Directory') %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } %span{ "aria-hidden": "true" } × .modal-body diff --git a/app/views/projects/blob/_remove.html.haml b/app/views/projects/blob/_remove.html.haml index 1463fcf8052..7511de76223 100644 --- a/app/views/projects/blob/_remove.html.haml +++ b/app/views/projects/blob/_remove.html.haml @@ -2,7 +2,7 @@ .modal-dialog .modal-content .modal-header - %h3.page-title Delete #{@blob.name} + %h1.page-title.gl-font-size-h-display Delete #{@blob.name} %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } %span{ "aria-hidden": "true" } × diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml deleted file mode 100644 index 629fa9c0e8a..00000000000 --- a/app/views/projects/blob/_upload.html.haml +++ /dev/null @@ -1,30 +0,0 @@ -#modal-upload-blob.modal - .modal-dialog.modal-lg - .modal-content - .modal-header - %h3.page-title= title - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": "true" } × - .modal-body - = form_tag form_path, method: method, class: 'js-quick-submit js-upload-blob-form', data: { method: method } do - .dropzone - .dropzone-previews.blob-upload-dropzone-previews - %p.dz-message.light - - upload_link = link_to s_('UploadLink|click to upload'), '#', class: "markdown-selector" - - dropzone_text = _('Attach a file by drag & drop or %{upload_link}') % { upload_link: upload_link } - #{ dropzone_text.html_safe } - - %br - = render Pajamas::AlertComponent.new(variant: :danger, - alert_class: 'dropzone-alerts gl-alert gl-alert-danger gl-mb-5 data gl-display-none', - dismissible: false) - - = render 'shared/new_commit_form', placeholder: placeholder, ref: local_assigns[:ref] - - .form-actions - = button_tag class: 'btn gl-button btn-confirm btn-upload-file gl-mr-2', id: 'submit-all', type: 'button' do - = gl_loading_icon(inline: true, css_class: 'gl-mr-2 js-loading-icon hidden') - = button_title - = link_to _("Cancel"), '#', class: "btn gl-button btn-default btn-cancel", "data-dismiss" => "modal" - - = render 'shared/projects/edit_information' diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index f80601ef221..220319d31b5 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -4,7 +4,7 @@ - webpack_preload_asset_tag('monaco') - if @conflict - = render Pajamas::AlertComponent.new(alert_class: 'gl-mb-5 gl-mt-5', + = render Pajamas::AlertComponent.new(alert_options: { class: 'gl-mb-5 gl-mt-5' }, variant: :danger, dismissible: false) do |c| - blob_url = project_blob_path(@project, @id) @@ -15,7 +15,7 @@ = _('Someone edited the file the same time you did. Please check out %{link_start}the file %{icon}%{link_end} and make sure your changes will not unintentionally remove theirs.').html_safe % { link_start: blob_link_start, link_end: '</a>'.html_safe , icon: external_link_icon } -%h3.page-title.blob-edit-page-title +%h1.page-title.gl-font-size-h-display.blob-edit-page-title Edit file .file-editor = gl_tabs_nav({ class: 'js-edit-mode nav-links gl-border-0'}) do diff --git a/app/views/projects/blob/new.html.haml b/app/views/projects/blob/new.html.haml index 60877db581f..27f64104cf4 100644 --- a/app/views/projects/blob/new.html.haml +++ b/app/views/projects/blob/new.html.haml @@ -1,7 +1,7 @@ - breadcrumb_title _("Repository") - page_title _("New File"), @path.presence, @ref -%h3.page-title.blob-new-page-title +%h1.page-title.blob-new-page-title.gl-font-size-h-display = _('New file') .file-editor = form_tag(project_create_blob_path(@project, @id), method: :post, class: 'js-edit-blob-form js-new-blob-form js-quick-submit js-requires-input', data: blob_editor_paths(@project)) do diff --git a/app/views/projects/blob/show.html.haml b/app/views/projects/blob/show.html.haml index d4e7ee90a84..a91c0d63b00 100644 --- a/app/views/projects/blob/show.html.haml +++ b/app/views/projects/blob/show.html.haml @@ -14,8 +14,5 @@ - if can_modify_blob?(@blob) = render 'projects/blob/remove' - - title = _("Replace %{blob_name}") % { blob_name: @blob.name } - = render 'projects/blob/upload', title: title, placeholder: title, button_title: _('Replace file'), form_path: project_update_blob_path(@project, @id), method: :put - = render partial: 'pipeline_tour_success' if show_suggest_pipeline_creation_celebration? = render 'shared/web_ide_path' diff --git a/app/views/projects/branch_rules/_show.html.haml b/app/views/projects/branch_rules/_show.html.haml new file mode 100644 index 00000000000..af0e656d301 --- /dev/null +++ b/app/views/projects/branch_rules/_show.html.haml @@ -0,0 +1,12 @@ +- expanded = expanded_by_default? + +%section.settings.no-animate#branch-rules{ class: ('expanded' if expanded) } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Branch rules') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded ? _('Collapse') : _('Expand') + %p + = _('Define rules for who can push, merge, and the required approvals for each branch.') + + .settings-content.gl-pr-0 + #js-branch-rules diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index c06f60bd05d..f8bee5a69e9 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -5,7 +5,7 @@ = render Pajamas::AlertComponent.new(variant: :danger) do |c| = c.body do = @error -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New Branch') %hr @@ -26,7 +26,8 @@ = render 'shared/ref_dropdown', dropdown_class: 'wide' .form-text.text-muted Existing branch name, tag, or commit SHA .form-actions - = button_tag 'Create branch', class: 'gl-button btn btn-confirm' + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', class: 'gl-mr-3' }) do + = _('Create branch') = link_to _('Cancel'), project_branches_path(@project), class: 'gl-button btn btn-default btn-cancel' -# haml-lint:disable InlineJavaScript %script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe diff --git a/app/views/projects/buttons/_remove_tag.html.haml b/app/views/projects/buttons/_remove_tag.html.haml index 58af0d91f30..060a854d4e4 100644 --- a/app/views/projects/buttons/_remove_tag.html.haml +++ b/app/views/projects/buttons/_remove_tag.html.haml @@ -1,6 +1,11 @@ - project = local_assigns.fetch(:project, nil) - tag = local_assigns.fetch(:tag, nil) - return unless project && tag +- title = s_('TagsPage|Delete tag') +- if protected_tag?(project, tag) + - title = s_('TagsPage|Delete protected tag') + - if !can?(current_user, :maintainer_access, project) + - title = s_('TagsPage|Only a project maintainer or owner can delete a protected tag') + - disabled = true -%button{ type: "button", class: "js-remove-tag js-confirm-modal-button gl-button btn btn-default btn-icon has-tooltip gl-ml-3\! #{protected_tag?(project, tag) ? 'disabled' : ''}", title: s_('TagsPage|Delete tag'), data: { container: 'body', path: project_tag_path(@project, tag.name), modal_attributes: delete_tag_modal_attributes(tag.name) } } - = sprite_icon('remove', css_class: 'gl-icon') += render Pajamas::ButtonComponent.new(variant: :default, icon: 'remove', button_options: { class: "js-delete-tag-button gl-ml-3\!", 'aria-label': s_('TagsPage|Delete tag'), title: title, disabled: disabled, data: { toggle: 'tooltip', container: 'body', path: project_tag_path(@project, tag.name), tag_name: tag.name, is_protected: protected_tag?(project, tag).to_s } }) diff --git a/app/views/projects/cleanup/_show.html.haml b/app/views/projects/cleanup/_show.html.haml index 5e14b6dacfd..c53205b6c58 100644 --- a/app/views/projects/cleanup/_show.html.haml +++ b/app/views/projects/cleanup/_show.html.haml @@ -3,7 +3,7 @@ %section.settings.no-animate#cleanup{ class: ('expanded' if expanded) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Repository cleanup') - %button.btn.gl-button.btn-default.js-settings-toggle + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p - link_url = 'https://github.com/newren/git-filter-repo' diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index c26f24dd52c..feaac255d8c 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -9,7 +9,7 @@ - page_description @commit.description - add_page_specific_style 'page_bundles/pipelines' -.container-fluid.commits-container{ class: [limited_container_width, container_class] } +.container-fluid{ class: [limited_container_width, container_class] } = render "commit_box" = render "ci_menu" = render "projects/diffs/diffs", diff --git a/app/views/projects/commits/_commits.html.haml b/app/views/projects/commits/_commits.html.haml index c6fb3bcd559..764ddace0ad 100644 --- a/app/views/projects/commits/_commits.html.haml +++ b/app/views/projects/commits/_commits.html.haml @@ -23,7 +23,7 @@ %li.commit-header.js-commit-header %span.font-weight-bold= n_("%d previously merged commit", "%d previously merged commits", context_commits.count) % context_commits.count - if can_update_merge_request - %button.gl-button.btn.btn-default.ml-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'false' } } + = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-ml-3 add-review-item-modal-trigger', data: { context_commits_empty: 'false' } }) do = _('Add/remove') %li.commits-row @@ -41,7 +41,7 @@ = n_('%s additional commit has been omitted to prevent performance issues.', '%s additional commits have been omitted to prevent performance issues.', hidden) % number_with_delimiter(hidden) - if can_update_merge_request && context_commits&.empty? - %button.gl-button.btn.btn-default.mt-3.add-review-item-modal-trigger{ type: "button", data: { context_commits_empty: 'true' } } + = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-mt-5', data: { context_commits_empty: 'true' } }) do = _('Add previously merged commits') - if commits.size == 0 && context_commits.nil? diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index 12d3f28dc20..b3590eea631 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -1,9 +1,9 @@ - breadcrumb_title _("Compare Revisions") - page_title _("Compare") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Compare Git revisions") -.sub-header-block +%div - example_branch = capture do %code.ref-name= @project.default_branch_or_main - example_sha = capture do diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index cb2c2d488e8..a6be6695b75 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -17,7 +17,7 @@ paginate_diffs: true, paginate_diffs_per_page: Projects::CompareController::COMMIT_DIFFS_PER_PAGE - else - .card.bg-light + .card.gl-bg-gray-50.gl-border-none.gl-p-2 .center %h4 = s_("CompareBranches|There isn't anything to compare.") diff --git a/app/views/projects/confluences/show.html.haml b/app/views/projects/confluences/show.html.haml index 413de90b67b..6fec9b501ea 100644 --- a/app/views/projects/confluences/show.html.haml +++ b/app/views/projects/confluences/show.html.haml @@ -8,6 +8,6 @@ - wiki_confluence_epic_link_url = 'https://gitlab.com/groups/gitlab-org/-/epics/3629' - wiki_confluence_epic_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wiki_confluence_epic_link_url } = html_escape(s_("WikiEmpty|You've enabled the Confluence Workspace integration. Your wiki will be viewable directly within Confluence. We are hard at work integrating Confluence more seamlessly into GitLab. If you'd like to stay up to date, follow our %{wiki_confluence_epic_link_start}Confluence epic%{wiki_confluence_epic_link_end}.")) % { wiki_confluence_epic_link_start: wiki_confluence_epic_link_start, wiki_confluence_epic_link_end: '</a>'.html_safe } - = link_to @project.confluence_integration.confluence_url, target: '_blank', rel: 'noopener noreferrer', class: 'gl-button btn btn-success external-url', title: s_('WikiEmpty|Go to Confluence') do + = link_to @project.confluence_integration.confluence_url, target: '_blank', rel: 'noopener noreferrer', class: 'gl-button btn btn-confirm external-url', title: s_('WikiEmpty|Go to Confluence') do = s_('WikiEmpty|Go to Confluence') = sprite_icon('external-link') diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml index 2d3d36a9157..b1fb9c70a54 100644 --- a/app/views/projects/default_branch/_show.html.haml +++ b/app/views/projects/default_branch/_show.html.haml @@ -3,7 +3,7 @@ %section.settings.no-animate#default-branch-settings{ class: ('expanded' if expanded) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default branch') - %button.btn.gl-button.btn-default.js-settings-toggle + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Set the default branch for this project. All merge requests and commits are made against this branch unless you specify a different one.') diff --git a/app/views/projects/deploy_keys/edit.html.haml b/app/views/projects/deploy_keys/edit.html.haml index 263b0025fe8..04e364d6b15 100644 --- a/app/views/projects/deploy_keys/edit.html.haml +++ b/app/views/projects/deploy_keys/edit.html.haml @@ -1,5 +1,5 @@ - page_title _('Edit Deploy Key') -%h3.page-title= _('Edit Deploy Key') +%h1.page-title.gl-font-size-h-display= _('Edit Deploy Key') %hr %div diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 92dbde07709..41d6b7086c1 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -10,14 +10,16 @@ %section.settings.general-settings.no-animate.expanded#js-general-settings .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar') - %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }= _('Collapse') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = _('Collapse') %p= _('Update your project name, topics, description, and avatar.') .settings-content= render 'projects/settings/general' %section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded), data: { qa_selector: 'visibility_features_permissions_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions') - %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= _('Choose visibility level, enable/disable project features and their permissions, disable email notifications, and show default award emoji.') .settings-content @@ -29,7 +31,8 @@ %section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests') - %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') = render_if_exists 'projects/merge_request_settings_description_text' .settings-content @@ -47,7 +50,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = s_('ProjectSettings|Badges') - %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_('ProjectSettings|Customize this project\'s badges.') @@ -64,7 +67,8 @@ %section.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded), data: { qa_selector: 'advanced_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced') - %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_('ProjectSettings|Housekeeping, export, archive, change path, transfer, and delete.') .settings-content diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index b2338fa6c55..ce6d021ce2f 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -3,8 +3,10 @@ - escaped_default_branch_name = default_branch_name.shellescape - @skip_current_level_breadcrumb = true -= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project += render_if_exists 'projects/free_user_cap_alert', project: @project + = render partial: 'flash_messages', locals: { project: @project } += render 'clusters_deprecation_alert' = render "home_panel" = render "archived_notice", project: @project @@ -74,6 +76,3 @@ %span>< git push -u origin --all git push -u origin --tags - -- if @project.upload_anchor_data.present? - = render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, default_branch_name), ref: default_branch_name, method: :post diff --git a/app/views/projects/environments/terminal.html.haml b/app/views/projects/environments/terminal.html.haml index ee31985eaf0..7c837d4ded0 100644 --- a/app/views/projects/environments/terminal.html.haml +++ b/app/views/projects/environments/terminal.html.haml @@ -6,7 +6,7 @@ .top-area .row .col-sm-6 - %h3.page-title + %h1.page-title.gl-font-size-h-display = _("Terminal for environment") = @environment.name diff --git a/app/views/projects/forks/error.html.haml b/app/views/projects/forks/error.html.haml index 13fd4cee0cc..022a96b15a7 100644 --- a/app/views/projects/forks/error.html.haml +++ b/app/views/projects/forks/error.html.haml @@ -2,7 +2,7 @@ - if @forked_project && !@forked_project.saved? = render Pajamas::AlertComponent.new(title: _('Fork Error!'), variant: :danger, - alert_class: 'gl-mt-5', + alert_options: { class: 'gl-mt-5' }, dismissible: false) do |c| = c.body do %p diff --git a/app/views/projects/graphs/show.html.haml b/app/views/projects/graphs/show.html.haml index 1973b23a062..c7639eec75d 100644 --- a/app/views/projects/graphs/show.html.haml +++ b/app/views/projects/graphs/show.html.haml @@ -1,7 +1,7 @@ - page_title _('Contributors') -.sub-header-block.bg-gray-light.gl-p-5 - .tree-ref-holder.inline.vertical-align-middle +.sub-header-block.gl-bg-gray-10.gl-p-5 + .tree-ref-holder.gl-display-inline-block.gl-vertical-align-middle.gl-mr-3> = render 'shared/ref_switcher', destination: 'graphs' = link_to s_('Commits|History'), project_commits_path(@project, current_ref), class: 'btn gl-button btn-default' diff --git a/app/views/projects/hook_logs/show.html.haml b/app/views/projects/hook_logs/show.html.haml index f6861e4119e..d610ef21400 100644 --- a/app/views/projects/hook_logs/show.html.haml +++ b/app/views/projects/hook_logs/show.html.haml @@ -2,11 +2,14 @@ - add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path - page_title _('Webhook Logs') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Request details") %hr -= link_to _("Resend Request"), @hook_log.present.retry_path, 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"), @hook_log.present.retry_path, 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/projects/import/jira/show.html.haml b/app/views/projects/import/jira/show.html.haml index 1feae7baa02..2605ebc544f 100644 --- a/app/views/projects/import/jira/show.html.haml +++ b/app/views/projects/import/jira/show.html.haml @@ -1,6 +1,6 @@ .js-jira-import-root{ data: { project_path: @project.full_path, issues_path: project_issues_path(@project), - jira_integration_path: edit_project_integration_path(@project, :jira), + jira_integration_path: edit_project_settings_integration_path(@project, :jira), is_jira_configured: @project.jira_integration&.configured?.to_s, in_progress_illustration: image_path('illustrations/export-import.svg'), project_id: @project.id, diff --git a/app/views/projects/imports/new.html.haml b/app/views/projects/imports/new.html.haml index dc2bcfa33bb..bcfa32566fb 100644 --- a/app/views/projects/imports/new.html.haml +++ b/app/views/projects/imports/new.html.haml @@ -1,5 +1,5 @@ - page_title _("Import repository") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Import repository') %hr diff --git a/app/views/projects/issuable/_show.html.haml b/app/views/projects/issuable/_show.html.haml index f311ed2d8ae..0898e0ae52d 100644 --- a/app/views/projects/issuable/_show.html.haml +++ b/app/views/projects/issuable/_show.html.haml @@ -4,7 +4,7 @@ - if issuable.relocation_target - page_canonical_link issuable.relocation_target.present(current_user: current_user).web_url -= render "projects/issues/alert_moved_from_service_desk", issue: issuable += render "projects/issues/service_desk/alert_moved_from_service_desk", issue: issuable = render 'shared/issue_type/details_header', issuable: issuable = render 'shared/issue_type/details_content', issuable: issuable, api_awards_path: api_awards_path diff --git a/app/views/projects/issues/_by_email_description.html.haml b/app/views/projects/issues/_by_email_description.html.haml deleted file mode 100644 index aeed5fb69c9..00000000000 --- a/app/views/projects/issues/_by_email_description.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -The subject will be used as the title of the new issue, and the message will be the description. - -= link_to 'Quick actions', help_page_path('user/project/quick_actions'), target: '_blank', rel: 'noopener noreferrer' -and styling with -= link_to 'Markdown', help_page_path('user/markdown'), target: '_blank', rel: 'noopener noreferrer' -are supported. diff --git a/app/views/projects/issues/_work_item_links.html.haml b/app/views/projects/issues/_work_item_links.html.haml new file mode 100644 index 00000000000..55a8eb720b6 --- /dev/null +++ b/app/views/projects/issues/_work_item_links.html.haml @@ -0,0 +1,2 @@ +- if Feature.enabled?(:work_items_hierarchy, @project) + .js-work-item-links-root{ data: { issuable_id: @issue.id } } diff --git a/app/views/projects/issues/edit.html.haml b/app/views/projects/issues/edit.html.haml index 353ff9c1cc2..c2b620280d8 100644 --- a/app/views/projects/issues/edit.html.haml +++ b/app/views/projects/issues/edit.html.haml @@ -1,6 +1,6 @@ - page_title _("Edit"), "#{@issue.title} (#{@issue.to_reference})", _("Issues") -%h3.page-title +%h1.page-title.gl-font-size-h-display Edit Issue ##{@issue.iid} %hr diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index fe2be0f73c9..b730eb5072e 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -1,10 +1,5 @@ -- @can_bulk_update = can?(current_user, :admin_issue, @project) - -- page_title _("Issues") -- new_issue_email = @project.new_issuable_address(current_user, 'issue') +- page_title _('Issues') - add_page_specific_style 'page_bundles/issues_list' -- issuable_type = 'issue' - = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues") @@ -13,24 +8,6 @@ issues_path: project_issues_path(@project), project_path: @project.full_path } } -- if Feature.enabled?(:vue_issues_list, @project&.group) - .js-issues-list{ data: project_issues_list_data(@project, current_user) } - - if @can_bulk_update - = render 'shared/issuable/bulk_update_sidebar', type: :issues -- elsif project_issues(@project).exists? - .top-area - = render 'shared/issuable/nav', type: :issues - = render "projects/issues/nav_btns" - = render 'shared/issuable/search_bar', type: :issues - - - if @can_bulk_update - = render 'shared/issuable/bulk_update_sidebar', type: :issues - - .issues-holder - = render 'issues' - - if new_issue_email - .gl-text-center.gl-pt-5.gl-pb-7 - .js-issuable-by-email{ data: { initial_email: new_issue_email, issuable_type: issuable_type, emails_help_page_path: help_page_path('development/emails', anchor: 'email-namespace'), quick_actions_help_path: help_page_path('user/project/quick_actions'), markdown_help_path: help_page_path('user/markdown'), reset_path: new_issuable_address_project_path(@project, issuable_type: issuable_type) } } -- else - - new_project_issue_button_path = @project.archived? ? false : new_project_issue_path(@project) - = render 'shared/empty_states/issues', new_project_issue_button_path: new_project_issue_button_path, show_import_button: true +.js-issues-list{ data: project_issues_list_data(@project, current_user) } +- if can?(current_user, :admin_issue, @project) + = render 'shared/issuable/bulk_update_sidebar', type: :issues diff --git a/app/views/projects/issues/new.html.haml b/app/views/projects/issues/new.html.haml index b18027f0f25..617579cdd6f 100644 --- a/app/views/projects/issues/new.html.haml +++ b/app/views/projects/issues/new.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _("New") - page_title _("New Issue") -.top-area.flex-lg-row - %h3.page-title= _("New Issue") +.top-area.gl-lg-flex-direction-row.gl-border-bottom-0 + %h1.page-title.gl-font-size-h-display= _("New Issue") = render "form" diff --git a/app/views/projects/issues/service_desk.html.haml b/app/views/projects/issues/service_desk.html.haml index fb5880f633a..93cb5ddd7e2 100644 --- a/app/views/projects/issues/service_desk.html.haml +++ b/app/views/projects/issues/service_desk.html.haml @@ -3,7 +3,7 @@ - page_title _("Service Desk") - add_page_specific_style 'page_bundles/issues_list' - content_for :breadcrumbs_extra do - = render "projects/issues/nav_btns", show_export_button: false, show_rss_button: false + = render "projects/issues/service_desk/nav_btns", show_export_button: false, show_rss_button: false - support_bot_attrs = { service_desk_enabled: @project.service_desk_enabled?, **UserSerializer.new.represent(User.support_bot) }.to_json @@ -11,12 +11,12 @@ .top-area = render 'shared/issuable/nav', type: :issues .nav-controls.d-block.d-sm-none - = render "projects/issues/nav_btns", show_feed_buttons: false, show_import_button: false, show_export_button: false + = render "projects/issues/service_desk/nav_btns", show_feed_buttons: false, show_import_button: false, show_export_button: false - if @issues.present? = render 'shared/issuable/search_bar', type: :issues - if Gitlab::ServiceDesk.supported? - = render 'service_desk_info_content' + = render 'projects/issues/service_desk/service_desk_info_content' .issues-holder - = render 'projects/issues/issues', empty_state_path: 'service_desk_empty_state' + = render 'projects/issues/issues', empty_state_path: 'projects/issues/service_desk/service_desk_empty_state' diff --git a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml b/app/views/projects/issues/service_desk/_alert_moved_from_service_desk.html.haml index 291edf014c3..cc8d5bdaeec 100644 --- a/app/views/projects/issues/_alert_moved_from_service_desk.html.haml +++ b/app/views/projects/issues/service_desk/_alert_moved_from_service_desk.html.haml @@ -3,6 +3,6 @@ - service_desk_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: service_desk_link_url } = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'hide js-alert-moved-from-service-desk-warning gl-mt-5') do |c| + alert_options: { class: 'hide js-alert-moved-from-service-desk-warning gl-mt-5' }) do |c| = c.body do = s_('This project does not have %{service_desk_link_start}Service Desk%{service_desk_link_end} enabled, so the user who created the issue will no longer receive email notifications about new activity.').html_safe % { service_desk_link_start: service_desk_link_start, service_desk_link_end: '</a>'.html_safe } diff --git a/app/views/projects/issues/_nav_btns.html.haml b/app/views/projects/issues/service_desk/_nav_btns.html.haml index 8d16c3d978f..8d16c3d978f 100644 --- a/app/views/projects/issues/_nav_btns.html.haml +++ b/app/views/projects/issues/service_desk/_nav_btns.html.haml diff --git a/app/views/projects/issues/_service_desk_empty_state.html.haml b/app/views/projects/issues/service_desk/_service_desk_empty_state.html.haml index efc319ed8df..1c9143c633d 100644 --- a/app/views/projects/issues/_service_desk_empty_state.html.haml +++ b/app/views/projects/issues/service_desk/_service_desk_empty_state.html.haml @@ -21,7 +21,7 @@ - if can_edit_project_settings && !service_desk_enabled .text-center - = link_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-success' + = link_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-confirm' - else .empty-state .svg-content diff --git a/app/views/projects/issues/_service_desk_info_content.html.haml b/app/views/projects/issues/service_desk/_service_desk_info_content.html.haml index f0ec68ba54b..bad75ac2cd9 100644 --- a/app/views/projects/issues/_service_desk_info_content.html.haml +++ b/app/views/projects/issues/service_desk/_service_desk_info_content.html.haml @@ -21,4 +21,4 @@ - if can_edit_project_settings && !service_desk_enabled .gl-mt-3 - = link_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-success' + = link_to s_("ServiceDesk|Enable Service Desk"), edit_project_path(@project), class: 'gl-button btn btn-confirm' diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml index e725e8e6889..dfea4db4d07 100644 --- a/app/views/projects/jobs/index.html.haml +++ b/app/views/projects/jobs/index.html.haml @@ -1,5 +1,3 @@ -= render_if_exists 'shared/minute_limit_banner', namespace: @project - - page_title _("Jobs") - add_page_specific_style 'page_bundles/ci_status' - admin = local_assigns.fetch(:admin, false) diff --git a/app/views/projects/labels/edit.html.haml b/app/views/projects/labels/edit.html.haml index 8023fb93c64..4f4609e6016 100644 --- a/app/views/projects/labels/edit.html.haml +++ b/app/views/projects/labels/edit.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _("Edit") - 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: project_label_path(@project, @label), back_path: project_labels_path(@project) diff --git a/app/views/projects/labels/index.html.haml b/app/views/projects/labels/index.html.haml index e034e9c71ab..dd63e854a36 100644 --- a/app/views/projects/labels/index.html.haml +++ b/app/views/projects/labels/index.html.haml @@ -4,11 +4,12 @@ - subscribed = params[:subscribed] - labels_or_filters = @labels.exists? || @prioritized_labels.exists? || search.present? || subscribed.present? += render_if_exists 'shared/minute_limit_banner', namespace: @project - if labels_or_filters #js-promote-label-modal = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label - .labels-container.gl-mt-3.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100 + .labels-container.gl-mt-5 - if can_admin_label && search.blank? %p.text-muted = _('Labels can be applied to issues and merge requests.') @@ -18,8 +19,8 @@ -# Only show it in the first page - hide = @available_labels.empty? || (params[:page].present? && params[:page] != '1') .prioritized-labels.gl-mb-7{ class: [('hide' if hide), ('is-not-draggable' unless can_admin_label)] } - %h5.gl-mt-3= _('Prioritized Labels') - .content-list.manage-labels-list.js-prioritized-labels{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } + %h4.gl-mt-3= _('Prioritized Labels') + .manage-labels-list.js-prioritized-labels{ data: { url: set_priorities_project_labels_path(@project), sortable: can_admin_label } } #js-priority-labels-empty-state.priority-labels-empty-state{ class: "#{'hidden' unless @prioritized_labels.empty? && search.blank?}" } = render 'shared/empty_states/priority_labels' - if @prioritized_labels.any? @@ -30,14 +31,14 @@ - if @labels.any? .other-labels - %h5{ class: ('hide' if hide) }= _('Other Labels') - .content-list.manage-labels-list.js-other-labels + %h4{ class: ('hide' if hide) }= _('Other Labels') + .manage-labels-list.js-other-labels = render partial: 'shared/label', collection: @labels, as: :label, locals: { subject: @project } = paginate @labels, theme: 'gitlab' - elsif search.present? .other-labels - if @available_labels.any? - %h5 + %h4 = _('Other Labels') .nothing-here-block = _('No other labels with such name or description') diff --git a/app/views/projects/labels/new.html.haml b/app/views/projects/labels/new.html.haml index 1ae87bf93d1..7002da0b76a 100644 --- a/app/views/projects/labels/new.html.haml +++ b/app/views/projects/labels/new.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _("New") - page_title _("New Label") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New Label') -%hr + = render 'shared/labels/form', url: project_labels_path(@project), back_path: project_labels_path(@project) diff --git a/app/views/projects/mattermosts/_no_teams.html.haml b/app/views/projects/mattermosts/_no_teams.html.haml index 1f008496a34..5886c0565b1 100644 --- a/app/views/projects/mattermosts/_no_teams.html.haml +++ b/app/views/projects/mattermosts/_no_teams.html.haml @@ -9,4 +9,4 @@ and try again. %hr .clearfix - = link_to 'Go back', edit_project_integration_path(@project, @integration), class: 'gl-button btn btn-lg float-right' + = link_to 'Go back', edit_project_settings_integration_path(@project, @integration), class: 'gl-button btn btn-lg float-right' diff --git a/app/views/projects/mattermosts/_team_selection.html.haml b/app/views/projects/mattermosts/_team_selection.html.haml index d52d980c364..98221125443 100644 --- a/app/views/projects/mattermosts/_team_selection.html.haml +++ b/app/views/projects/mattermosts/_team_selection.html.haml @@ -42,5 +42,5 @@ %hr .clearfix .float-right - = link_to _('Cancel'), edit_project_integration_path(@project, @integration), class: 'gl-button btn btn-lg' - = f.submit 'Install', class: 'gl-button btn btn-success btn-lg' + = link_to _('Cancel'), edit_project_settings_integration_path(@project, @integration), class: 'gl-button btn btn-lg' + = f.submit 'Install', class: 'gl-button btn btn-confirm btn-lg' diff --git a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml index 282faf7714e..a0810cfe37d 100644 --- a/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml +++ b/app/views/projects/merge_requests/_close_reopen_draft_report_toggle.html.haml @@ -20,7 +20,7 @@ %li.gl-new-dropdown-item = link_to toggle_draft_merge_request_path(@merge_request), method: :put, class: 'dropdown-item js-draft-toggle-button' do .gl-new-dropdown-item-text-wrapper - = @merge_request.work_in_progress? ? _('Mark as ready') : _('Mark as draft') + = @merge_request.draft? ? _('Mark as ready') : _('Mark as draft') %li.gl-new-dropdown-item.js-close-item = link_to close_issuable_path(@merge_request), method: :put, class: 'dropdown-item' do .gl-new-dropdown-item-text-wrapper @@ -33,14 +33,15 @@ = _('Reopen') = display_issuable_type - - if current_user && moved_mr_sidebar_enabled? - %li.gl-new-dropdown-divider - %hr.dropdown-divider - %li.gl-new-dropdown-item.js-sidebar-subscriptions-entry-point - - unless issuable_author_is_current_user(@merge_request) - %li.gl-new-dropdown-item - = link_to new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'dropdown-item' do - .gl-new-dropdown-item-text-wrapper - = _('Report abuse') - - if moved_mr_sidebar_enabled? - %li.gl-new-dropdown-item#js-lock-entry-point + - unless current_controller?('conflicts') + - if current_user && moved_mr_sidebar_enabled? + %li.gl-new-dropdown-divider + %hr.dropdown-divider + %li.gl-new-dropdown-item.js-sidebar-subscriptions-entry-point + - unless issuable_author_is_current_user(@merge_request) + %li.gl-new-dropdown-item + = link_to new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)), class: 'dropdown-item' do + .gl-new-dropdown-item-text-wrapper + = _('Report abuse') + - if moved_mr_sidebar_enabled? + %li.gl-new-dropdown-item#js-lock-entry-point diff --git a/app/views/projects/merge_requests/_code_dropdown.html.haml b/app/views/projects/merge_requests/_code_dropdown.html.haml index 0bd28e315d9..bb42c3067d9 100644 --- a/app/views/projects/merge_requests/_code_dropdown.html.haml +++ b/app/views/projects/merge_requests/_code_dropdown.html.haml @@ -34,6 +34,6 @@ .gl-new-dropdown-item-text-wrapper = _('Email patches') %li.gl-new-dropdown-item - = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', data: { qa_selector: 'download_plain_diff_menu_item' } do + = link_to merge_request_path(@merge_request, format: :diff), class: 'dropdown-item', download: '', data: { qa_selector: 'download_plain_diff_menu_item' } do .gl-new-dropdown-item-text-wrapper = _('Plain diff') diff --git a/app/views/projects/merge_requests/_mr_box.html.haml b/app/views/projects/merge_requests/_mr_box.html.haml index e16631b4943..4fc405c63ff 100644 --- a/app/views/projects/merge_requests/_mr_box.html.haml +++ b/app/views/projects/merge_requests/_mr_box.html.haml @@ -1,7 +1,3 @@ -.detail-page-description.py-2 - - if Feature.enabled?(:updated_mr_header, @project) - = render 'shared/issuable/status_box', issuable: @merge_request - = merge_request_header(@project, @merge_request) - - else - %h2.title.mb-0{ data: { qa_selector: 'title_content' } } - = markdown_field(@merge_request, :title) +.detail-page-description.py-2{ class: "#{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } + = render 'shared/issuable/status_box', issuable: @merge_request + = merge_request_header(@project, @merge_request) diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 638c520e210..4f4acb6103f 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -2,35 +2,30 @@ - can_update_merge_request = can?(current_user, :update_merge_request, @merge_request) - can_reopen_merge_request = can?(current_user, :reopen_merge_request, @merge_request) - are_close_and_open_buttons_hidden = merge_request_button_hidden?(@merge_request, true) && merge_request_button_hidden?(@merge_request, false) -- updated_mr_header_enabled = Feature.enabled?(:updated_mr_header, @project) -- cache_key = [@project, @merge_request, can_update_merge_request, can_reopen_merge_request, are_close_and_open_buttons_hidden, current_user&.preferred_language, updated_mr_header_enabled] +- hide_gutter_toggle = local_assigns.fetch(:hide_gutter_toggle, false) +- cache_key = [@project, @merge_request, can_update_merge_request, can_reopen_merge_request, are_close_and_open_buttons_hidden, current_user&.preferred_language, "1.1-updated_header", moved_mr_sidebar_enabled?, hide_gutter_toggle] = cache(cache_key, expires_in: 1.day) do - if @merge_request.closed_or_merged_without_fork? - = render Pajamas::AlertComponent.new(alert_class: 'gl-mb-5', + = render Pajamas::AlertComponent.new(alert_options: { class: 'gl-mb-5' }, variant: :danger, dismissible: false) do |c| = c.body do = _('The source project of this merge request has been removed.') - .detail-page-header.border-bottom-0.pt-0.pb-0{ class: "#{'gl-display-block gl-md-display-flex!' if updated_mr_header_enabled}" } + .detail-page-header.border-bottom-0.pt-0.pb-0.gl-display-block{ class: "gl-md-display-flex! #{'is-merge-request' if moved_mr_sidebar_enabled? && !fluid_layout}" } .detail-page-header-body - - unless updated_mr_header_enabled - = render "shared/issuable/status_box", issuable: @merge_request - .issuable-meta{ class: "#{'gl-display-flex' if updated_mr_header_enabled}" } - - if updated_mr_header_enabled - #js-issuable-header-warnings - %h2.title.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } } - = markdown_field(@merge_request, :title) - - else - #js-issuable-header-warnings - = issuable_meta(@merge_request, @project) + .issuable-meta.gl-display-flex + #js-issuable-header-warnings + %h1.title.page-title.gl-font-size-h-display.gl-my-0.gl-display-inline-block{ data: { qa_selector: 'title_content' } } + = markdown_field(@merge_request, :title) - %div - %button.gl-button.btn.btn-default.btn-icon.float-right.gl-display-block.gutter-toggle.issuable-gutter-toggle.js-sidebar-toggle{ type: 'button', class: "#{'gl-md-display-none!' if moved_mr_sidebar_enabled? } #{'gl-sm-display-none!' unless moved_mr_sidebar_enabled?}" } - = sprite_icon('chevron-double-lg-left') + - unless hide_gutter_toggle + %div + - display_class = moved_mr_sidebar_enabled? ? 'gl-md-display-none!' : 'gl-sm-display-none!' + = render Pajamas::ButtonComponent.new(icon: "chevron-double-lg-left", button_options: { class: "btn-icon float-right gl-display-block gutter-toggle issuable-gutter-toggle js-sidebar-toggle #{display_class}" }) - .detail-page-header-actions.js-issuable-actions{ class: "#{'gl-align-self-start is-merge-request' if updated_mr_header_enabled}" } + .detail-page-header-actions.gl-align-self-start.is-merge-request.js-issuable-actions - if can_update_merge_request = link_to _('Edit'), edit_project_merge_request_path(@project, @merge_request), class: "gl-display-none gl-md-display-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" } diff --git a/app/views/projects/merge_requests/conflicts/show.html.haml b/app/views/projects/merge_requests/conflicts/show.html.haml index 5ba42ca7610..a882196ffa2 100644 --- a/app/views/projects/merge_requests/conflicts/show.html.haml +++ b/app/views/projects/merge_requests/conflicts/show.html.haml @@ -1,13 +1,11 @@ - page_title _("Merge Conflicts"), "#{@merge_request.title} (#{@merge_request.to_reference}", _("Merge requests") - add_page_specific_style 'page_bundles/merge_conflicts' -= render "projects/merge_requests/mr_title" += render "projects/merge_requests/mr_title", hide_gutter_toggle: true .merge-request-details.issuable-details = render "projects/merge_requests/mr_box" -= render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, reviewers: @merge_request.reviewers, source_branch: @merge_request.source_branch - #conflicts{ data: { conflicts_path: conflicts_project_merge_request_path(@merge_request.project, @merge_request, format: :json), resolve_conflicts_path: resolve_conflicts_project_merge_request_path(@merge_request.project, @merge_request), source_branch_path: project_tree_path(@merge_request.project, @merge_request.source_branch), diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 811b45ef8af..8cd0d2f9e32 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -1,4 +1,4 @@ -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New merge request') = form_for [@project, @merge_request], url: project_new_merge_request_path(@project), method: :get, html: { class: "merge-request-form js-requires-input" } do |f| @@ -6,60 +6,66 @@ = hidden_field_tag(:nav_source, params[:nav_source]) .js-merge-request-new-compare.row{ 'data-source-branch-url': project_new_merge_request_branch_from_path(@source_project), 'data-target-branch-url': project_new_merge_request_branch_to_path(@source_project) } .col-lg-6 - .card.card-new-merge-request - .card-header + .card-new-merge-request + %h2.gl-font-size-h2 Source branch - .card-body.clearfix + .clearfix .merge-request-select.dropdown = f.hidden_field :source_project_id - = dropdown_toggle @merge_request.source_project_path, { toggle: "dropdown", 'field-name': "#{f.object_name}[source_project_id]", disabled: @merge_request.persisted? }, { toggle_class: "js-compare-dropdown js-source-project" } + = dropdown_toggle @merge_request.source_project_path, { toggle: "dropdown", 'field-name': "#{f.object_name}[source_project_id]", disabled: @merge_request.persisted?, default_text: _("Select source project") }, { toggle_class: "js-compare-dropdown js-source-project" } .dropdown-menu.dropdown-menu-selectable.dropdown-source-project - = dropdown_title("Select source project") - = dropdown_filter("Search projects") + = dropdown_title(_("Select source project")) + = dropdown_filter(_("Search projects")) = dropdown_content do = render 'projects/merge_requests/dropdowns/project', projects: [@merge_request.source_project], selected: f.object.source_project_id .merge-request-select.dropdown = f.hidden_field :source_branch - = dropdown_toggle f.object.source_branch.presence || _("Select source branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[source_branch]", 'refs-url': refs_project_path(@source_project), selected: f.object.source_branch, qa_selector: "source_branch_dropdown" }, { toggle_class: "js-compare-dropdown js-source-branch monospace" } + = dropdown_toggle f.object.source_branch.presence || _("Select source branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[source_branch]", 'refs-url': refs_project_path(@source_project), selected: f.object.source_branch, default_text: _("Select target branch"), qa_selector: "source_branch_dropdown" }, { toggle_class: "js-compare-dropdown js-source-branch monospace" } .dropdown-menu.dropdown-menu-selectable.js-source-branch-dropdown.git-revision-dropdown = dropdown_title(_("Select source branch")) = dropdown_filter(_("Search branches")) = dropdown_content = dropdown_loading - .card-footer - = gl_loading_icon(css_class: 'js-source-loading gl-my-3') + .gl-bg-gray-50.gl-rounded-base.gl-mx-2.gl-my-4 + .compare-commit-empty.js-source-commit-empty.gl-display-flex.gl-align-items-center.gl-p-5{ style: 'display: none;' } + = sprite_icon('branch', size: 16, css_class: 'gl-mr-3') + = _('Select a branch to compare') + = gl_loading_icon(css_class: 'js-source-loading gl-py-3') %ul.list-unstyled.mr_source_commit .col-lg-6 - .card.card-new-merge-request - .card-header + .card-new-merge-request + %h2.gl-font-size-h2 Target branch - .card-body.clearfix + .clearfix - projects = target_projects(@project) .merge-request-select.dropdown = f.hidden_field :target_project_id - = dropdown_toggle f.object.target_project.full_path, { toggle: "dropdown", 'field-name': "#{f.object_name}[target_project_id]", disabled: @merge_request.persisted? }, { toggle_class: "js-compare-dropdown js-target-project" } + = dropdown_toggle f.object.target_project.full_path, { toggle: "dropdown", 'field-name': "#{f.object_name}[target_project_id]", disabled: @merge_request.persisted?, default_text: _("Select target project") }, { toggle_class: "js-compare-dropdown js-target-project" } .dropdown-menu.dropdown-menu-selectable.dropdown-target-project - = dropdown_title("Select target project") - = dropdown_filter("Search projects") + = dropdown_title(_("Select target project")) + = dropdown_filter(_("Search projects")) = dropdown_content do = render 'projects/merge_requests/dropdowns/project', projects: projects, selected: f.object.target_project_id .merge-request-select.dropdown = f.hidden_field :target_branch - = dropdown_toggle f.object.target_branch.presence || _("Select target branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[target_branch]", 'refs-url': refs_project_path(f.object.target_project), selected: f.object.target_branch }, { toggle_class: "js-compare-dropdown js-target-branch monospace" } + = dropdown_toggle f.object.target_branch.presence || _("Select target branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[target_branch]", 'refs-url': refs_project_path(f.object.target_project), selected: f.object.target_branch, default_text: _("Select target branch") }, { toggle_class: "js-compare-dropdown js-target-branch monospace" } .dropdown-menu.dropdown-menu-selectable.js-target-branch-dropdown.git-revision-dropdown = dropdown_title(_("Select target branch")) = dropdown_filter(_("Search branches")) = dropdown_content = dropdown_loading - .card-footer - = gl_loading_icon(css_class: 'js-target-loading gl-my-3') + .gl-bg-gray-50.gl-rounded-base.gl-mx-2.gl-my-4 + .compare-commit-empty.js-target-commit-empty.gl-display-flex.gl-align-items-center.gl-p-5{ style: 'display: none;' } + = sprite_icon('branch', size: 16, css_class: 'gl-mr-3') + = _('Select a branch to compare') + = gl_loading_icon(css_class: 'js-target-loading gl-py-3') %ul.list-unstyled.mr_target_commit - if @merge_request.errors.any? = form_errors(@merge_request) - = f.submit 'Compare branches and continue', class: "gl-button btn btn-confirm mr-compare-btn", data: { qa_selector: "compare_branches_button" } + = f.submit 'Compare branches and continue', class: "gl-button btn btn-confirm mr-compare-btn gl-mt-4", data: { qa_selector: "compare_branches_button" } diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index ef6e930bf23..ef3174efcc7 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -1,4 +1,4 @@ -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New merge request') = gitlab_ui_form_for [@project, @merge_request], html: { class: 'merge-request-form common-note-form js-requires-input js-quick-submit' } do |f| = render 'shared/issuable/form', f: f, issuable: @merge_request, commits: @commits, presenter: @mr_presenter @@ -18,11 +18,11 @@ = custom_icon ('illustration_no_commits') - else .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } - .merge-request-tabs-container + .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller .fade-left= sprite_icon('chevron-lg-left', size: 12) .fade-right= sprite_icon('chevron-lg-right', size: 12) - %ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom.js-tabs-affix + %ul.merge-request-tabs.nav.nav-tabs.nav-links.no-top.no-bottom.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0.js-tabs-affix %li.commits-tab.new-tab = link_to url_for(safe_params), data: {target: 'div#commits', action: 'new', toggle: 'tabvue'} do Commits diff --git a/app/views/projects/merge_requests/edit.html.haml b/app/views/projects/merge_requests/edit.html.haml index 5fcb5d3f876..77cc69f32ab 100644 --- a/app/views/projects/merge_requests/edit.html.haml +++ b/app/views/projects/merge_requests/edit.html.haml @@ -2,6 +2,6 @@ - breadcrumb_title @merge_request.to_reference - page_title _("Edit"), "#{@merge_request.title} (#{@merge_request.to_reference}", _("Merge requests") -%h3.page-title +%h1.page-title.gl-font-size-h-display Edit merge request #{@merge_request.to_reference} = render 'form' diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 13e5451df98..99b84339058 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -21,8 +21,8 @@ .merge-request-details.issuable-details{ data: { id: @merge_request.project.id } } = render "projects/merge_requests/mr_box" .merge-request-tabs-holder{ class: ("js-tabs-affix" unless ENV['RAILS_ENV'] == 'test') } - .merge-request-tabs-container - %ul.merge-request-tabs.nav-tabs.nav.nav-links + .merge-request-tabs-container.gl-display-flex.gl-justify-content-space-between{ class: "#{'is-merge-request' if Feature.enabled?(:moved_mr_sidebar, @project) && !fluid_layout}" } + %ul.merge-request-tabs.nav-tabs.nav.nav-links.gl-display-flex.gl-flex-nowrap.gl-m-0.gl-p-0{ class: "#{'gl-w-full gl-lg-w-auto!' if Feature.enabled?(:moved_mr_sidebar, @project)}" } = render "projects/merge_requests/tabs/tab", class: "notes-tab", qa_selector: "notes_tab" do = tab_link_for @merge_request, :show, force_link: @commit.present? do = _("Overview") @@ -41,6 +41,12 @@ = tab_link_for @merge_request, :diffs do = _("Changes") = gl_badge_tag @diffs_count, { size: :sm } + - if Feature.enabled?(:moved_mr_sidebar, @project) + .gl-ml-auto.gl-align-items-center.gl-display-none.gl-md-display-flex.js-expand-sidebar{ class: "gl-lg-display-none!" } + = render Pajamas::ButtonComponent.new(size: 'small', + icon: 'angle-double-left', + button_options: { class: 'js-sidebar-toggle' }) do + = _('Expand') .d-flex.flex-wrap.align-items-center.justify-content-lg-end #js-vue-discussion-counter{ data: { blocks_merge: @project.only_allow_merge_if_all_discussions_are_resolved?.to_s } } @@ -57,13 +63,10 @@ = render "projects/merge_requests/widget" = render "projects/merge_requests/awards_block" - if mr_action === "show" - - if Feature.enabled?(:paginated_notes, @project) - - add_page_startup_api_call notes_url - - else - - add_page_startup_api_call discussions_path(@merge_request) + - add_page_startup_api_call Feature.enabled?(:paginated_mr_discussions, @project) ? discussions_path(@merge_request, per_page: 20) : discussions_path(@merge_request) - add_page_startup_api_call widget_project_json_merge_request_path(@project, @merge_request, format: :json) - add_page_startup_api_call cached_widget_project_json_merge_request_path(@project, @merge_request, format: :json) - #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request, Feature.enabled?(:paginated_notes, @project)).to_json, + #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json, endpoint_metadata: @endpoint_metadata_url, noteable_data: serialize_issuable(@merge_request, serializer: 'noteable'), noteable_type: 'MergeRequest', diff --git a/app/views/projects/milestones/edit.html.haml b/app/views/projects/milestones/edit.html.haml index 0d040a5cdb3..8d4ea2c3c21 100644 --- a/app/views/projects/milestones/edit.html.haml +++ b/app/views/projects/milestones/edit.html.haml @@ -2,7 +2,7 @@ - add_to_breadcrumbs _('Milestones'), project_milestones_path(@project) - page_title _('Edit'), @milestone.title, _('Milestones') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Edit Milestone') %hr diff --git a/app/views/projects/milestones/new.html.haml b/app/views/projects/milestones/new.html.haml index 721506a2201..70ec1b0008a 100644 --- a/app/views/projects/milestones/new.html.haml +++ b/app/views/projects/milestones/new.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _('New') - page_title _('New Milestone') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('New Milestone') %hr diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 4ec72176202..8ff7fe6da71 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -13,8 +13,8 @@ - if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0 = render Pajamas::AlertComponent.new(dismissible: false, - alert_data: { testid: 'no-issues-alert' }, - alert_class: 'gl-mt-3 gl-mb-5') do |c| + alert_options: { class: 'gl-mt-3 gl-mb-5', + data: { testid: 'no-issues-alert' }}) do |c| = c.body do = _('Assign some issues to this milestone.') - else diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index d689b54678e..339042eb703 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -6,7 +6,7 @@ %section.settings.project-mirror-settings.no-animate#js-push-remote-settings{ class: mirror_settings_class, data: { qa_selector: 'mirroring_repositories_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Mirroring repositories') - %button.btn.gl-button.btn-default.js-settings-toggle + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = expanded ? _('Collapse') : _('Expand') %p = _('Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically.') @@ -71,8 +71,10 @@ = gl_badge_tag _('Error'), { variant: :danger }, { data: { toggle: 'tooltip', html: 'true', qa_selector: 'mirror_error_badge' }, title: html_escape(mirror.last_error.try(:strip)) } %td.gl-display-flex - if mirror_settings_enabled - %button.js-delete-mirror.qa-delete-mirror.rspec-delete-mirror.btn.btn-icon.gl-button.btn-danger.gl-mr-3{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= sprite_icon('remove') .btn-group.mirror-actions-group{ role: 'group' } - if mirror.ssh_key_auth? - = clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button') + = clipboard_button(text: mirror.ssh_public_key, class: 'gl-button btn btn-default btn-icon', title: _('Copy SSH public key'), qa_selector: 'copy_public_key_button') = render 'shared/remote_mirror_update_button', remote_mirror: mirror + = render Pajamas::ButtonComponent.new(variant: :danger, + icon: 'remove', + button_options: { class: 'js-delete-mirror qa-delete-mirror rspec-delete-mirror', title: _('Remove'), data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' } }) diff --git a/app/views/projects/mirrors/_ssh_host_keys.html.haml b/app/views/projects/mirrors/_ssh_host_keys.html.haml index 3abab0281a0..e3fe098c807 100644 --- a/app/views/projects/mirrors/_ssh_host_keys.html.haml +++ b/app/views/projects/mirrors/_ssh_host_keys.html.haml @@ -3,7 +3,7 @@ - verified_at = mirror.ssh_known_hosts_verified_at .form-group.js-ssh-host-keys-section{ class: ('collapse' unless mirror.ssh_mirror_url?) } - %button.btn.gl-button.btn-inverted.btn-secondary.inline.js-detect-host-keys.gl-mr-3{ type: 'button', data: { qa_selector: 'detect_host_keys' } } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-detect-host-keys gl-mr-3', data: { qa_selector: 'detect_host_keys' } }) do = gl_loading_icon(inline: true, css_class: 'js-spinner gl-display-none gl-mr-2') = _('Detect host keys') .fingerprint-ssh-info.js-fingerprint-ssh-info.gl-mt-3.gl-mb-3{ class: ('collapse' unless mirror.ssh_mirror_url?) } @@ -23,7 +23,7 @@ #{time_ago_in_words(verified_at)} ago .js-ssh-hosts-advanced.inline - %button.btn.gl-button.btn-default.btn-show-advanced.show-advanced{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'btn-show-advanced show-advanced' }) do %span.label-show = _('Input host keys manually') %span.label-hide diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 4e4738ebd25..511adf37b39 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -16,8 +16,8 @@ = render 'new_project_fields', f: f, project_name_id: "blank-project-name" #create-from-template-pane.tab-pane - .gl-card.gl-my-5 - .gl-card-body + = render Pajamas::CardComponent.new(card_options: { class: 'gl-my-5' }) do |c| + = c.body do %div - contributing_templates_url = 'https://gitlab.com/gitlab-org/project-templates/contributing' - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: contributing_templates_url } @@ -30,7 +30,7 @@ #import-project-pane.tab-pane.js-toggle-container - if import_sources_enabled? - = render 'import_project_pane' + = render 'import_project_pane', destination_namespace_id: @namespace&.id - else .nothing-here-block %h4= s_('ProjectsNew|No import options available') diff --git a/app/views/projects/no_repo.html.haml b/app/views/projects/no_repo.html.haml index 1331ed24307..a8a30d73000 100644 --- a/app/views/projects/no_repo.html.haml +++ b/app/views/projects/no_repo.html.haml @@ -1,7 +1,7 @@ - page_title _('No repository') - @skip_current_level_breadcrumb = true -= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project += render_if_exists 'projects/free_user_cap_alert', project: @project %h2.gl-display-flex .gl-display-flex.gl-align-items-center.gl-justify-content-center diff --git a/app/views/projects/notes/_actions.html.haml b/app/views/projects/notes/_actions.html.haml index 31c14aaad50..9a8b83649de 100644 --- a/app/views/projects/notes/_actions.html.haml +++ b/app/views/projects/notes/_actions.html.haml @@ -9,15 +9,14 @@ - if can?(current_user, :award_emoji, note) - if note.emoji_awardable? .note-actions-item - = button_tag title: 'Add reaction', class: "note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip btn gl-button btn-icon btn-default-tertiary btn-transparent", data: { position: 'right', container: 'body' } do - = sprite_icon('slight-smile', css_class: 'link-highlight award-control-icon-neutral gl-button-icon gl-icon gl-text-gray-400') - = sprite_icon('smiley', css_class: 'link-highlight award-control-icon-positive gl-button-icon gl-icon gl-left-3!') - = sprite_icon('smile', css_class: 'link-highlight award-control-icon-super-positive gl-button-icon gl-icon gl-left-3! ') + = button_tag title: 'Add reaction', class: "note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip btn gl-button btn-icon btn-default-tertiary", data: { position: 'right', container: 'body' } do + = sprite_icon('slight-smile', css_class: 'award-control-icon-neutral gl-button-icon gl-icon') + = sprite_icon('smiley', css_class: 'award-control-icon-positive gl-button-icon gl-icon gl-left-3!') + = sprite_icon('smile', css_class: 'award-control-icon-super-positive gl-button-icon gl-icon gl-left-3! ') - if note_editable .note-actions-item.gl-ml-0 - = button_tag title: 'Edit comment', class: 'note-action-button js-note-edit has-tooltip btn gl-button btn-default-tertiary btn-transparent gl-px-2!', data: { container: 'body', qa_selector: 'edit_comment_button' } do - %span.link-highlight - = sprite_icon('pencil', css_class: 'gl-button-icon gl-icon gl-text-gray-400 s16') + = button_tag title: 'Edit comment', class: 'note-action-button js-note-edit has-tooltip btn gl-button btn-default-tertiary btn-icon', data: { container: 'body', qa_selector: 'edit_comment_button' } do + = sprite_icon('pencil', css_class: 'gl-button-icon gl-icon') = render 'projects/notes/more_actions_dropdown', note: note, note_editable: note_editable diff --git a/app/views/projects/notes/_more_actions_dropdown.html.haml b/app/views/projects/notes/_more_actions_dropdown.html.haml index 5385c6a4cc6..5f70e25f802 100644 --- a/app/views/projects/notes/_more_actions_dropdown.html.haml +++ b/app/views/projects/notes/_more_actions_dropdown.html.haml @@ -2,8 +2,8 @@ - if note_editable || !is_current_user %div{ class: "dropdown more-actions note-actions-item gl-ml-0!" } - = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn gl-button btn-default-tertiary btn-transparent gl-pl-2! gl-pr-0!', data: { toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' } do - = sprite_icon('ellipsis_v', css_class: 'gl-button-icon gl-icon gl-text-gray-400') + = button_tag title: 'More actions', class: 'note-action-button more-actions-toggle has-tooltip btn gl-button btn-default-tertiary btn-icon', data: { toggle: 'dropdown', container: 'body', qa_selector: 'more_actions_dropdown' } do + = sprite_icon('ellipsis_v', css_class: 'gl-button-icon gl-icon') %ul.dropdown-menu.more-actions-dropdown.dropdown-open-left %li = clipboard_button(text: noteable_note_url(note), title: _('Copy reference'), button_text: _('Copy link'), class: 'btn-clipboard', hide_tooltip: true, hide_button_icon: true) diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 04178804de4..0ddf105ef60 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -4,20 +4,21 @@ .card .card-header Domains (#{@domains.size}) - %ul.list-group.list-group-flush.pages-domain-list{ class: ("has-verification-status" if verification_enabled) } + %ul.list-group.list-group-flush - @domains.each do |domain| - %li.pages-domain-list-item.list-group-item.d-flex.justify-content-between - - if verification_enabled - - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] - .domain-status.ci-status-icon.has-tooltip{ class: "ci-status-icon-#{status}", title: tooltip } - = sprite_icon("status_#{status}" ) - .domain-name - = external_link(domain.url, domain.url) - - if domain.certificate - %div - = gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject }) - - if domain.expired? - = gl_badge_tag s_('GitLabPages|Expired'), variant: :danger + %li.list-group-item.gl-display-flex.gl-justify-content-space-between.gl-align-items-center + .gl-display-flex.gl-align-items-center + - if verification_enabled + - tooltip, status = domain.unverified? ? [s_('GitLabPages|Unverified'), 'failed'] : [s_('GitLabPages|Verified'), 'success'] + .domain-status.ci-status-icon.has-tooltip{ class: "gl-mr-5 ci-status-icon-#{status}", title: tooltip } + = sprite_icon("status_#{status}" ) + .domain-name + = external_link(domain.url, domain.url) + - if domain.certificate + %div + = gl_badge_tag(s_('GitLabPages|Certificate: %{subject}') % { subject: domain.pages_domain.subject }) + - if domain.expired? + = gl_badge_tag s_('GitLabPages|Expired'), variant: :danger %div = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-confirm btn-inverted" = link_to s_('GitLabPages|Remove'), project_pages_domain_path(@project, domain), data: { confirm: s_('GitLabPages|Are you sure?'), 'confirm-btn-variant': 'danger'}, "aria-label": s_("GitLabPages|Remove domain"), method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml index 64760d8972f..3fea9f9ff1b 100644 --- a/app/views/projects/pages/show.html.haml +++ b/app/views/projects/pages/show.html.haml @@ -1,7 +1,7 @@ - page_title _('Pages') - if @project.pages_enabled? - %h3.page-title.with-button + %h1.page-title.gl-font-size-h-display.with-button = s_('GitLabPages|Pages') - if can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https) diff --git a/app/views/projects/pages_domains/_dns.html.haml b/app/views/projects/pages_domains/_dns.html.haml index 6943469aaac..2c6b808eb1c 100644 --- a/app/views/projects/pages_domains/_dns.html.haml +++ b/app/views/projects/pages_domains/_dns.html.haml @@ -19,10 +19,10 @@ .col-sm-2 = _("Verification status") .col-sm-10 - .status-badge + .gl-mb-3 - text, status = domain_presenter.unverified? ? [_('Unverified'), :danger] : [_('Verified'), :success] = gl_badge_tag text, variant: status - = link_to sprite_icon("redo"), verify_project_pages_domain_path(@project, domain_presenter), method: :post, class: "gl-ml-2 gl-button btn btn-default has-tooltip", title: _("Retry verification") + = link_to sprite_icon("redo"), verify_project_pages_domain_path(@project, domain_presenter), method: :post, class: "gl-ml-2 gl-button btn btn-sm btn-default has-tooltip", title: _("Retry verification") .input-group = text_field_tag :domain_verification, verification_record, class: "monospace js-select-on-focus form-control", readonly: true .input-group-append diff --git a/app/views/projects/pages_domains/new.html.haml b/app/views/projects/pages_domains/new.html.haml index 0b794226c7f..6de8117df6b 100644 --- a/app/views/projects/pages_domains/new.html.haml +++ b/app/views/projects/pages_domains/new.html.haml @@ -1,6 +1,6 @@ - add_to_breadcrumbs _("Pages"), project_pages_path(@project) - page_title _('New Pages Domain') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("New Pages Domain") = render 'projects/pages_domains/helper_text' %div diff --git a/app/views/projects/pages_domains/show.html.haml b/app/views/projects/pages_domains/show.html.haml index d16821c3940..0edf75c9abc 100644 --- a/app/views/projects/pages_domains/show.html.haml +++ b/app/views/projects/pages_domains/show.html.haml @@ -6,11 +6,12 @@ - if verification_enabled && domain_presenter.unverified? = content_for :flash_message do - .gl-alert.gl-alert-warning - .container-fluid.container-limited - = _("This domain is not verified. You will need to verify ownership before access is enabled.") + = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false) do |c| + = c.body do + .container-fluid.container-limited + = _("This domain is not verified. You will need to verify ownership before access is enabled.") -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Pages Domain') = render 'projects/pages_domains/helper_text' %div diff --git a/app/views/projects/pipeline_schedules/_form.html.haml b/app/views/projects/pipeline_schedules/_form.html.haml index 5ff0e2ccac3..d29030f992f 100644 --- a/app/views/projects/pipeline_schedules/_form.html.haml +++ b/app/views/projects/pipeline_schedules/_form.html.haml @@ -1,5 +1,5 @@ = gitlab_ui_form_for [@project, @schedule], as: :schedule, html: { id: "new-pipeline-schedule-form", class: "js-pipeline-schedule-form pipeline-schedule-form" } do |f| - = form_errors(@schedule) + = form_errors(@schedule, pajamas_alert: true) .form-group.row .col-md-9 = f.label :description, _('Description'), class: 'label-bold' @@ -28,7 +28,7 @@ = render 'ci/variables/variable_row', form_field: 'schedule', variable: variable = render 'ci/variables/variable_row', form_field: 'schedule' - if @schedule.variables.size > 0 - %button.gl-button.btn.btn-confirm-secondary.gl-mt-3.js-secret-value-reveal-button{ type: 'button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" } } + = render Pajamas::ButtonComponent.new(category: :secondary, variant: :confirm, button_options: { class: 'gl-mt-3 js-secret-value-reveal-button', data: { secret_reveal_status: "#{@schedule.variables.size == 0}" }}) do - if @schedule.variables.size == 0 = n_('Hide value', 'Hide values', @schedule.variables.size) - else @@ -38,6 +38,6 @@ = f.label :active, s_('PipelineSchedules|Activated'), class: 'label-bold' %div = f.gitlab_ui_checkbox_component :active, _('Active'), checkbox_options: { value: @schedule.active, required: false } - .footer-block.row-content-block + .footer-block = f.submit _('Save pipeline schedule'), class: 'btn gl-button btn-confirm' = link_to _('Cancel'), pipeline_schedules_path(@project), class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/projects/pipeline_schedules/edit.html.haml b/app/views/projects/pipeline_schedules/edit.html.haml index 51f0c58330d..642b458eea6 100644 --- a/app/views/projects/pipeline_schedules/edit.html.haml +++ b/app/views/projects/pipeline_schedules/edit.html.haml @@ -3,7 +3,7 @@ - page_title _("Edit"), @schedule.description, _("Pipeline Schedule") - add_page_specific_style 'page_bundles/pipeline_schedules' -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Edit Pipeline Schedule") %hr diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index 10a49fbd779..a56e8f7f5c7 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -1,5 +1,3 @@ -= render_if_exists 'shared/minute_limit_banner', namespace: @project - - breadcrumb_title _("Schedules") - page_title _("Pipeline Schedules") - add_page_specific_style 'page_bundles/pipeline_schedules' diff --git a/app/views/projects/pipeline_schedules/new.html.haml b/app/views/projects/pipeline_schedules/new.html.haml index 1b50090e445..3b4acf5b8c5 100644 --- a/app/views/projects/pipeline_schedules/new.html.haml +++ b/app/views/projects/pipeline_schedules/new.html.haml @@ -5,8 +5,7 @@ - add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Schedule a new pipeline") -%hr = render "form" diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 6b26c9f3f00..a8ad53db8c2 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -33,44 +33,7 @@ - if @pipeline.failed_builds.present? #js-tab-failures.tab-pane - - if Feature.enabled?(:failed_jobs_tab_vue, @project) - #js-pipeline-failed-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid, failed_jobs_summary_data: prepare_failed_jobs_summary_data(@pipeline.failed_builds) } } - - else - .build-failures.build-page - %table.table.gl-table.responsive-table.ci-table.responsive-table-sm-rounded - %thead - %th - %th= _('Name') - %th= _('Stage') - %th= _('Failure') - %th - - %tbody - - @pipeline.failed_builds.each_with_index do |build, index| - - job = build.present(current_user: current_user) - %tr.build-state.responsive-table-border-start - %td.responsive-table-cell.ci-status-icon-failed{ data: { column: _('Status')} } - .d-none.d-md-block.build-icon - = sprite_icon("status_#{build.status}") - .d-md-none.build-badge - = render "ci/status/badge", link: false, status: job.detailed_status(current_user) - %td.responsive-table-cell.build-name{ data: { column: _('Name')} } - = link_to build.name, pipeline_job_url(pipeline, build) - %td.responsive-table-cell.build-stage{ data: { column: _('Stage')} } - = build.stage.titleize - %td.responsive-table-cell.build-failure{ data: { column: _('Failure')} } - = build.present.callout_failure_message - %td.responsive-table-cell.build-actions - - if can?(current_user, :update_build, job) && job.retryable? - = link_to retry_project_job_path(build.project, build, return_to: request.original_url), method: :post, title: _('Retry'), class: 'gl-button btn btn-default btn-icon' do - = sprite_icon('repeat', css_class: 'gl-icon') - - if can?(current_user, :read_build, job) - %tr.build-log-row.responsive-table-border-end - %td - %td.responsive-table-cell.build-log-container{ colspan: 4 } - %pre.build-log.build-log-rounded - %code.bash.js-build-output - = build_summary(build) + #js-pipeline-failed-jobs-vue{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid, failed_jobs_summary_data: prepare_failed_jobs_summary_data(@pipeline.failed_builds) } } #js-tab-dag.tab-pane #js-pipeline-dag-vue{ data: { pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid, empty_svg_path: image_path('illustrations/empty-state/empty-dag-md.svg'), about_dag_doc_path: help_page_path('ci/directed_acyclic_graph/index.md'), dag_doc_path: help_page_path('ci/yaml/index.md', anchor: 'needs')} } @@ -80,5 +43,6 @@ suite_endpoint: project_pipeline_test_path(@project, @pipeline, suite_name: 'suite', format: :json), blob_path: project_blob_path(@project, @pipeline.sha), has_test_report: @pipeline.has_reports?(Ci::JobArtifact.test_reports).to_s, - empty_state_image_path: image_path('illustrations/empty-state/empty-test-cases-lg.svg') } } + empty_state_image_path: image_path('illustrations/empty-state/empty-test-cases-lg.svg'), + artifacts_expired_image_path: image_path('illustrations/pipeline.svg') } } = render_if_exists "projects/pipelines/tabs_content", pipeline: @pipeline, project: @project diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 817cc6d6e6c..f4b242ffc40 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -1,5 +1,3 @@ -= render_if_exists 'shared/minute_limit_banner', namespace: @project - - page_title _('Pipelines') - add_page_specific_style 'page_bundles/pipelines' - add_page_specific_style 'page_bundles/ci_status' diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index e92f14fcc63..a4144f8ab0d 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -1,7 +1,7 @@ - breadcrumb_title _('Pipelines') - page_title s_('Pipeline|Run pipeline') -%h3.page-title +%h1.page-title.gl-font-size-h-display = s_('Pipeline|Run pipeline') %hr diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 30b224a60da..10ff9c31c3e 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -26,7 +26,6 @@ - lint_link_start = '<a href="%{url}" class="gl-text-blue-500!">'.html_safe % { url: lint_link_url } = s_('You can also test your %{gitlab_ci_yml} in %{lint_link_start}CI Lint%{lint_link_end}').html_safe % { gitlab_ci_yml: '.gitlab-ci.yml', lint_link_start: lint_link_start, lint_link_end: '</a>'.html_safe } - #js-pipeline-notification{ data: { deprecated_keywords_doc_path: help_page_path('ci/yaml/index.md', anchor: 'deprecated-keywords'), full_path: @project.full_path, pipeline_iid: @pipeline.iid } } - if Feature.enabled?(:pipeline_tabs_vue, @project) #js-pipeline-tabs{ data: js_pipeline_tabs_data(@project, @pipeline) } - else diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index 298c2074062..8c616b89658 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,7 +1,8 @@ - add_page_specific_style 'page_bundles/members' - page_title _("Members") -= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project += render_if_exists 'projects/free_user_cap_alert', project: @project += render_if_exists 'shared/minute_limit_banner', namespace: @project .row.gl-mt-3 .col-lg-12 @@ -12,11 +13,8 @@ %h4 = _("Project members") .gl-justify-content-bottom.gl-display-flex.align-items-center - - if can?(current_user, :admin_project_member, @project) - %p= share_project_description(@project) - - else - %p - = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } + %p + = project_member_header_subtext(@project) .col-md-12.col-lg-6 .gl-display-flex.gl-flex-wrap.gl-justify-content-end - if can_admin_project_member?(@project) @@ -36,7 +34,8 @@ %h4 = _("Project members") - if can?(current_user, :admin_project_member, @project) - %p= share_project_description(@project) + %p + = project_member_header_subtext(@project) - else %p = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } diff --git a/app/views/projects/prometheus/metrics/edit.html.haml b/app/views/projects/prometheus/metrics/edit.html.haml index 146bf6b6853..212d625d292 100644 --- a/app/views/projects/prometheus/metrics/edit.html.haml +++ b/app/views/projects/prometheus/metrics/edit.html.haml @@ -1,6 +1,6 @@ - add_to_breadcrumbs _("Settings"), edit_project_path(@project) - add_to_breadcrumbs _("Integrations"), project_settings_integrations_path(@project) -- add_to_breadcrumbs "Prometheus", edit_project_integration_path(@project, ::Integrations::Prometheus) +- add_to_breadcrumbs "Prometheus", edit_project_settings_integration_path(@project, ::Integrations::Prometheus) - breadcrumb_title s_('Metrics|Edit metric') - page_title @metric.title, s_('Metrics|Edit metric') = render 'form', project: @project, metric: @metric diff --git a/app/views/projects/prometheus/metrics/new.html.haml b/app/views/projects/prometheus/metrics/new.html.haml index ad8463d1804..c04e5f385d9 100644 --- a/app/views/projects/prometheus/metrics/new.html.haml +++ b/app/views/projects/prometheus/metrics/new.html.haml @@ -1,6 +1,6 @@ - add_to_breadcrumbs _("Settings"), edit_project_path(@project) - add_to_breadcrumbs _("Integrations"), project_settings_integrations_path(@project) -- add_to_breadcrumbs "Prometheus", edit_project_integration_path(@project, ::Integrations::Prometheus) +- add_to_breadcrumbs "Prometheus", edit_project_settings_integration_path(@project, ::Integrations::Prometheus) - breadcrumb_title s_('Metrics|New metric') - page_title s_('Metrics|New metric') = render 'form', project: @project, metric: @metric diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml index 2e9a9357fb0..1d60791eae2 100644 --- a/app/views/projects/protected_branches/shared/_index.html.haml +++ b/app/views/projects/protected_branches/shared/_index.html.haml @@ -4,8 +4,8 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = s_("ProtectedBranch|Protected branches") - %button.btn.gl-button.btn-default.js-settings-toggle.qa-expand-protected-branches{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle qa-expand-protected-branches' }) do + = expanded ? _('Collapse') : _('Expand') %p = s_("ProtectedBranch|Keep stable branches secure and force developers to use merge requests.") = link_to s_("ProtectedBranch|What are protected branches?"), help_page_path("user/project/protected_branches") diff --git a/app/views/projects/protected_tags/shared/_index.html.haml b/app/views/projects/protected_tags/shared/_index.html.haml index 8f5ce798dc7..11e09d843e0 100644 --- a/app/views/projects/protected_tags/shared/_index.html.haml +++ b/app/views/projects/protected_tags/shared/_index.html.haml @@ -4,8 +4,8 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = s_("ProtectedTag|Protected tags") - %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_("ProtectedTag|Limit access to creating and updating tags.") = link_to s_("ProtectedTag|What are protected tags?"), help_page_path("user/project/protected_tags") diff --git a/app/views/projects/readme_templates/default.md.tt b/app/views/projects/readme_templates/default.md.tt index d5fef29b290..cd0b2db1d31 100644 --- a/app/views/projects/readme_templates/default.md.tt +++ b/app/views/projects/readme_templates/default.md.tt @@ -47,7 +47,7 @@ Use the built-in continuous integration in GitLab. # Editing this README -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. +When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. ## Suggestions for a good README Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. diff --git a/app/views/projects/releases/edit.html.haml b/app/views/projects/releases/edit.html.haml index 88ca64f2af0..1d53726e25c 100644 --- a/app/views/projects/releases/edit.html.haml +++ b/app/views/projects/releases/edit.html.haml @@ -1,3 +1,5 @@ - page_title _('Edit Release') +- add_to_breadcrumbs _('Releases'), project_releases_path(@project) +- add_to_breadcrumbs @release.name, project_release_path(@project, @release) #js-edit-release-page{ data: data_for_edit_release_page } diff --git a/app/views/projects/runners/edit.html.haml b/app/views/projects/runners/edit.html.haml index e87c52ff1a8..ce56b160187 100644 --- a/app/views/projects/runners/edit.html.haml +++ b/app/views/projects/runners/edit.html.haml @@ -3,7 +3,7 @@ - add_to_breadcrumbs _('CI/CD Settings'), project_settings_ci_cd_path(@project) - add_to_breadcrumbs "#{@runner.short_sha}", project_runner_path(@project, @runner) -%h2.page-title +%h1.page-title.gl-font-size-h-display = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id }) = render 'shared/runners/runner_type_badge', runner: @runner diff --git a/app/views/projects/settings/_archive.html.haml b/app/views/projects/settings/_archive.html.haml index 1b0294bc967..8a080241513 100644 --- a/app/views/projects/settings/_archive.html.haml +++ b/app/views/projects/settings/_archive.html.haml @@ -8,14 +8,14 @@ = _('Archive project') - if @project.archived? - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'unarchiving-a-project') } - %p= _("Unarchiving the project will restore its members' ability to make changes to it. The repository can be committed to, and issues, comments, and other entities can be created. %{strong_start}Once active, this project shows up in the search and on the dashboard.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe } + %p= _("Unarchiving the project restores its members' ability to make commits, and create issues, comments, and other entities. %{strong_start}After you unarchive the project, it displays in the search and on the dashboard.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe } = link_to _('Unarchive project'), unarchive_project_path(@project), aria: { label: _('Unarchive project') }, data: { confirm: _("Are you sure that you want to unarchive this project?"), qa_selector: 'unarchive_project_link' }, method: :post, class: "gl-button btn btn-confirm" - else - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/settings/index', anchor: 'archiving-a-project') } - %p= _("Archiving the project will make it entirely read-only. It is hidden from the dashboard and doesn't show up in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe } + %p= _("Archiving the project makes it entirely read-only. It is hidden from the dashboard and doesn't display in searches. %{strong_start}The repository cannot be committed to, and no issues, comments, or other entities can be created.%{strong_end} %{link_start}Learn more.%{link_end}").html_safe % { strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe, link_start: link_start, link_end: '</a>'.html_safe } = link_to _('Archive project'), archive_project_path(@project), aria: { label: _('Archive project') }, data: { confirm: _("Are you sure that you want to archive this project?"), qa_selector: 'archive_project_link', 'confirm-btn-variant': 'confirm' }, diff --git a/app/views/projects/settings/access_tokens/index.html.haml b/app/views/projects/settings/access_tokens/index.html.haml index e4b027fcc44..359e34d8918 100644 --- a/app/views/projects/settings/access_tokens/index.html.haml +++ b/app/views/projects/settings/access_tokens/index.html.haml @@ -36,7 +36,7 @@ resource: @project, token: @resource_access_token, scopes: @scopes, - access_levels: ProjectMember.access_level_roles, + access_levels: ProjectMember.permissible_access_level_roles(current_user, @project), default_access_level: Gitlab::Access::MAINTAINER, prefix: :resource_access_token, help_path: help_page_path('user/project/settings/project_access_tokens', anchor: 'scopes-for-a-project-access-token') diff --git a/app/views/projects/settings/branch_rules/index.html.haml b/app/views/projects/settings/branch_rules/index.html.haml new file mode 100644 index 00000000000..384d504e51f --- /dev/null +++ b/app/views/projects/settings/branch_rules/index.html.haml @@ -0,0 +1,6 @@ +- add_to_breadcrumbs _('Repository Settings'), project_settings_repository_path(@project) +- page_title _('Branch rules') + +%h3= _('Branch rules') + +#js-branch-rules{ data: { project_path: @project.full_path } } diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index 7783e83b88f..96564e44cf2 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -9,6 +9,10 @@ - base_domain_path = help_page_path('user/project/clusters/gitlab_managed_clusters', anchor: 'base-domain') - base_domain_link_start = link_start % { url: base_domain_path } +- help_link_continouos = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-deploy'), target: '_blank', rel: 'noopener noreferrer' +- help_link_timed = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'timed-incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' +- help_link_incremental = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' + .row .col-lg-12 = gitlab_ui_form_for @project, url: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings') do |f| @@ -33,22 +37,8 @@ = s_('CICD|Add a %{base_domain_link_start}base domain%{link_end} to your %{kubernetes_cluster_link_start}Kubernetes cluster%{link_end} for your deployment strategy to work.').html_safe % { base_domain_link_start: base_domain_link_start, kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } %label.gl-mt-3 %strong= s_('CICD|Deployment strategy') - .form-check - = form.radio_button :deploy_strategy, 'continuous', class: 'form-check-input' - = form.label :deploy_strategy_continuous, class: 'form-check-label' do - = s_('CICD|Continuous deployment to production') - = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/stages.md', anchor: 'auto-deploy'), target: '_blank', rel: 'noopener noreferrer' - - .form-check - = form.radio_button :deploy_strategy, 'timed_incremental', class: 'form-check-input' - = form.label :deploy_strategy_timed_incremental, class: 'form-check-label' do - = s_('CICD|Continuous deployment to production using timed incremental rollout') - = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'timed-incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' - - .form-check - = form.radio_button :deploy_strategy, 'manual', class: 'form-check-input' - = form.label :deploy_strategy_manual, class: 'form-check-label' do - = s_('CICD|Automatic deployment to staging, manual deployment to production') - = link_to sprite_icon('question-o'), help_page_path('topics/autodevops/customize.md', anchor: 'incremental-rollout-to-production'), target: '_blank', rel: 'noopener noreferrer' + = form.gitlab_ui_radio_component :deploy_strategy, 'continuous', (s_('CICD|Continuous deployment to production') + ' ' + help_link_continouos).html_safe + = form.gitlab_ui_radio_component :deploy_strategy, 'timed_incremental', (s_('CICD|Continuous deployment to production using timed incremental rollout') + ' ' + help_link_timed).html_safe + = form.gitlab_ui_radio_component :deploy_strategy, 'manual', (s_('CICD|Automatic deployment to staging, manual deployment to production') + ' ' + help_link_incremental).html_safe = f.submit _('Save changes'), class: "btn gl-button btn-confirm gl-mt-5", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index 508e63f77d8..9419dacc16f 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -39,25 +39,19 @@ %hr .form-group - %h5.gl-mt-0 + %h5.gl-mt-0.gl-mb-3 = _("Git strategy") - %p + .gl-mb-3 = _("Choose which Git strategy to use when fetching the project.") = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'choose-the-default-git-strategy'), target: '_blank', rel: 'noopener noreferrer' - .form-check - = f.radio_button :build_allow_git_fetch, 'false', { class: 'form-check-input' } - = f.label :build_allow_git_fetch_false, class: 'form-check-label' do - %strong git clone - %br - %span - = _("For each job, clone the repository.") - .form-check - = f.radio_button :build_allow_git_fetch, 'true', { class: 'form-check-input' } - = f.label :build_allow_git_fetch_true, class: 'form-check-label' do - %strong git fetch - %br - %span - = html_escape(_("For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + = f.gitlab_ui_radio_component :build_allow_git_fetch, + false, + "git clone", + help_text: _("For each job, clone the repository.") + = f.gitlab_ui_radio_component :build_allow_git_fetch, + true, + "git fetch", + help_text: html_escape(_("For each job, re-use the project workspace. If the workspace doesn't exist, use %{code_open}git clone%{code_close}.")) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } .form-group = f.fields_for :ci_cd_settings_attributes, @project.ci_cd_settings do |form| diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 87ca13a7bd6..5da3d2b891c 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,5 +1,3 @@ -= render_if_exists 'shared/minute_limit_banner', namespace: @project - - @content_class = "limit-container-width" unless fluid_layout - page_title _("CI/CD Settings") - page_title _("CI/CD") @@ -11,7 +9,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("General pipelines") - %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 = _("Customize your pipeline configuration.") @@ -22,7 +20,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = s_('CICD|Auto DevOps') - %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 - auto_devops_url = help_page_path('topics/autodevops/index') @@ -39,7 +37,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Runners") - %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 = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") @@ -52,7 +50,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Artifacts") - %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 = _("A job artifact is an archive of files and directories saved by a job when it finishes.") @@ -69,7 +67,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Pipeline triggers") - %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 = _("Trigger a pipeline for a branch or tag by generating a trigger token and using it with an API call. The token impersonates a user's project access and permissions.") @@ -84,7 +82,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Deploy freezes") - %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 - freeze_period_docs = help_page_path('user/project/releases/index', anchor: 'prevent-unintentional-releases-by-setting-a-deploy-freeze') @@ -102,7 +100,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Token Access") - %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 which projects can be accessed by API requests authenticated with this project's CI_JOB_TOKEN CI/CD variable. It is a security risk to disable this feature, because unauthorized projects might attempt to retrieve an active token and access the API.") diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/settings/integrations/_form.html.haml index 9d74f99bb19..9d74f99bb19 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/settings/integrations/_form.html.haml diff --git a/app/views/projects/services/edit.html.haml b/app/views/projects/settings/integrations/edit.html.haml index a250daafdbb..a250daafdbb 100644 --- a/app/views/projects/services/edit.html.haml +++ b/app/views/projects/settings/integrations/edit.html.haml diff --git a/app/views/projects/settings/integrations/show.html.haml b/app/views/projects/settings/integrations/index.html.haml index 84635941436..84635941436 100644 --- a/app/views/projects/settings/integrations/show.html.haml +++ b/app/views/projects/settings/integrations/index.html.haml diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml index 34255af9cc6..d80f1e4597c 100644 --- a/app/views/projects/settings/operations/_alert_management.html.haml +++ b/app/views/projects/settings/operations/_alert_management.html.haml @@ -7,7 +7,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Alerts') - %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Expand') %p = _('Display alerts from all configured monitoring tools.') diff --git a/app/views/projects/settings/operations/_error_tracking.html.haml b/app/views/projects/settings/operations/_error_tracking.html.haml index 23b1ec4dea3..5d89790ef9f 100644 --- a/app/views/projects/settings/operations/_error_tracking.html.haml +++ b/app/views/projects/settings/operations/_error_tracking.html.haml @@ -6,7 +6,7 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Error tracking') - %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Expand') %p = _('Link Sentry to GitLab to discover and view the errors your application generates.') diff --git a/app/views/projects/settings/operations/_tracing.html.haml b/app/views/projects/settings/operations/_tracing.html.haml index 343fd22c051..3c8ebe3fb20 100644 --- a/app/views/projects/settings/operations/_tracing.html.haml +++ b/app/views/projects/settings/operations/_tracing.html.haml @@ -4,7 +4,7 @@ .settings-header{ :class => 'border-top' } %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Tracing') - %button.btn.btn-default.gl-button.js-settings-toggle{ type: 'button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do = _('Expand') %p = _('Embed an image of your existing Jaeger server in GitLab.') diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index 24fc137fd29..500cfdcb62b 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -4,6 +4,8 @@ - deploy_token_description = s_('DeployTokens|Deploy tokens allow access to packages, your repository, and registry images.') = render "projects/default_branch/show" +- if Feature.enabled?(:branch_rules, @project) + = render "projects/branch_rules/show" = render_if_exists "projects/push_rules/index" = render "projects/mirrors/mirror_repos" diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 1934f293b0f..290ef79f261 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -6,9 +6,10 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") -= render_if_exists 'shared/user_over_limit_free_plan_alert', source: @project += render_if_exists 'projects/free_user_cap_alert', project: @project = render_if_exists 'shared/minute_limit_banner', namespace: @project = render partial: 'flash_messages', locals: { project: @project } += render 'clusters_deprecation_alert' = render "projects/last_push" diff --git a/app/views/projects/snippets/edit.html.haml b/app/views/projects/snippets/edit.html.haml index 9f5af1cfe1e..d9bf064ad24 100644 --- a/app/views/projects/snippets/edit.html.haml +++ b/app/views/projects/snippets/edit.html.haml @@ -3,7 +3,7 @@ - page_title _("Edit"), "#{@snippet.title} (#{@snippet.to_reference})", _("Snippets") - @content_class = "limit-container-width" unless fluid_layout -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Edit Snippet") %hr = render "shared/snippets/form", url: project_snippet_path(@project, @snippet) diff --git a/app/views/projects/snippets/new.html.haml b/app/views/projects/snippets/new.html.haml index d55a1160d48..5086b5eaa3d 100644 --- a/app/views/projects/snippets/new.html.haml +++ b/app/views/projects/snippets/new.html.haml @@ -3,7 +3,7 @@ - page_title _("New Snippet") - @content_class = "limit-container-width" unless fluid_layout -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("New Snippet") %hr = render "shared/snippets/form", url: project_snippets_path(@project, @snippet) diff --git a/app/views/projects/static_site_editor/show.html.haml b/app/views/projects/static_site_editor/show.html.haml deleted file mode 100644 index cbe27cefba3..00000000000 --- a/app/views/projects/static_site_editor/show.html.haml +++ /dev/null @@ -1 +0,0 @@ -#static-site-editor{ data: @data } diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index 0ee3b89b629..7654150509e 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -21,7 +21,7 @@ .text-secondary = sprite_icon("rocket", size: 12) = _("Release") - = link_to release.name, project_releases_path(@project, anchor: release.tag), class: 'gl-text-blue-600!' + = link_to release.name, project_release_path(@project, release), class: 'gl-text-blue-600!' - if tag.message.present? %pre.wrap diff --git a/app/views/projects/tags/index.html.haml b/app/views/projects/tags/index.html.haml index a654d0a8863..2721f94134c 100644 --- a/app/views/projects/tags/index.html.haml +++ b/app/views/projects/tags/index.html.haml @@ -38,3 +38,6 @@ = s_('TagsPage|Use git tag command to add a new one:') %br %span.monospace git tag -a v1.4 -m 'version 1.4' + +- if can?(current_user, :admin_tag, @project) + .js-delete-tag-modal diff --git a/app/views/projects/tags/new.html.haml b/app/views/projects/tags/new.html.haml index 4281152225a..3b546888375 100644 --- a/app/views/projects/tags/new.html.haml +++ b/app/views/projects/tags/new.html.haml @@ -2,13 +2,11 @@ - default_ref = params[:ref] || @project.default_branch - if @error - .gl-alert.gl-alert-danger - = sprite_icon('error', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', css_class: 'gl-icon') - = @error + = render Pajamas::AlertComponent.new(variant: :danger, dismissible: true, close_button_options: { class: 'gl-alert-dismiss' }) do |c| + = c.body do + = @error -%h3.page-title +%h1.page-title.gl-font-size-h-display = s_('TagsPage|New Tag') %hr @@ -52,7 +50,9 @@ = render 'shared/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files here…'), current_text: @release_description, qa_selector: 'release_notes_field' = render 'shared/notes/hints' .form-actions.gl-display-flex - = button_tag s_('TagsPage|Create tag'), class: 'gl-button btn btn-confirm gl-mr-3', data: { qa_selector: "create_tag_button" } - = link_to s_('TagsPage|Cancel'), project_tags_path(@project), class: 'gl-button btn btn-default btn-cancel' + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { class: 'gl-mr-3', data: { qa_selector: "create_tag_button" }, type: 'submit' }) do + = s_('TagsPage|Create tag') + = render Pajamas::ButtonComponent.new(href: project_tags_path(@project)) do + = s_('TagsPage|Cancel') -# haml-lint:disable InlineJavaScript %script#availableRefs{ type: "application/json" }= @project.repository.ref_names.to_json.html_safe diff --git a/app/views/projects/tags/show.html.haml b/app/views/projects/tags/show.html.haml index c1b78d3258d..2a68ad37c1e 100644 --- a/app/views/projects/tags/show.html.haml +++ b/app/views/projects/tags/show.html.haml @@ -63,3 +63,6 @@ = markdown_field(@release, :description) - else = s_('TagsPage|This tag has no release notes.') + +- if can?(current_user, :admin_tag, @project) + .js-delete-tag-modal diff --git a/app/views/projects/tracings/show.html.haml b/app/views/projects/tracings/show.html.haml index c9aac68b19d..61f2cd8ac7f 100644 --- a/app/views/projects/tracings/show.html.haml +++ b/app/views/projects/tracings/show.html.haml @@ -17,7 +17,7 @@ = html_escape(s_('Deprecations|The logs and tracing features were deprecated in GitLab 14.7, and are %{removal_link_start} scheduled for removal %{link_end} in GitLab 15.0. For information on a possible replacement, %{opstrace_link_start} learn more about Opstrace %{link_end}.')) % {removal_link_start: removal_epic_link_start, opstrace_link_start: opstrace_link_start, link_end: link_end } - if @project.tracing_external_url.present? - %h3.page-title= _('Tracing') + %h1.page-title.gl-font-size-h-display= _('Tracing') .gl-alert.gl-alert-info.gl-mb-5 .gl-alert-container = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') diff --git a/app/views/projects/usage_quotas/index.html.haml b/app/views/projects/usage_quotas/index.html.haml index 5b4edc92d1d..3de9bce14d4 100644 --- a/app/views/projects/usage_quotas/index.html.haml +++ b/app/views/projects/usage_quotas/index.html.haml @@ -1,6 +1,14 @@ - page_title s_("UsageQuota|Usage") -%h3.page-title += render_if_exists 'namespaces/free_user_cap/projects/usage_quota_limitations_banner' + += render Pajamas::AlertComponent.new(title: _('Repository usage recalculation started'), + variant: :info, + alert_options: { class: 'js-recalculation-started-alert gl-mt-4 gl-mb-5 gl-display-none' }) do |c| + = c.body do + = _('To view usage, refresh this page in a few minutes.') + +%h1.page-title.gl-font-size-h-display = s_('UsageQuota|Usage Quotas') .row diff --git a/app/views/projects/work_items/index.html.haml b/app/views/projects/work_items/index.html.haml index 356f93c6ed5..1f36afc48aa 100644 --- a/app/views/projects/work_items/index.html.haml +++ b/app/views/projects/work_items/index.html.haml @@ -1,3 +1,3 @@ - page_title s_('WorkItem|Work Items') -#js-work-items{ data: { full_path: @project.full_path, issues_list_path: project_issues_path(@project) } } +#js-work-items{ data: work_items_index_data(@project) } diff --git a/app/views/pwa/manifest.json.erb b/app/views/pwa/manifest.json.erb new file mode 100644 index 00000000000..557a39ee157 --- /dev/null +++ b/app/views/pwa/manifest.json.erb @@ -0,0 +1,27 @@ +{ + "name": "GitLab", + "short_name": "GitLab", + "description": "<%= _("The complete DevOps platform. One application with endless possibilities. Organizations rely on GitLab’s source code management, CI/CD, security, and more to deliver software rapidly.") %>", + "start_url": "<%= explore_projects_path %>", + "scope": "<%= root_path %>", + "display": "browser", + "orientation": "any", + "background_color": "#fff", + "theme_color": "<%= user_theme_primary_color %>", + "icons": [{ + "src": "<%= Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, '/-/pwa-icons/logo-192.png') %>", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "<%= Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, '/-/pwa-icons/logo-512.png') %>", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "<%= Gitlab::Utils.append_path(Gitlab.config.gitlab.relative_url_root, '/-/pwa-icons/maskable-logo.png') %>", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + }] +} diff --git a/app/views/registrations/welcome/show.html.haml b/app/views/registrations/welcome/show.html.haml index 62499f1a6b6..911ba5e8042 100644 --- a/app/views/registrations/welcome/show.html.haml +++ b/app/views/registrations/welcome/show.html.haml @@ -24,11 +24,6 @@ .form-group.col-sm-12 = f.label :role, _('Role'), class: 'label-bold' = f.select :role, ::User.roles.keys.map { |role| [role.titleize, role] }, { include_blank: _('Select a role') }, class: 'form-control js-user-role-dropdown', autofocus: true, required: true, data: { qa_selector: 'role_dropdown' } - - if Feature.enabled?(:user_other_role_details) - .row - .form-group.col-sm-12.js-other-role-group.hidden - = f.label :other_role, _('What is your job title? (optional)') - = f.text_field :other_role, class: 'form-control' = render_if_exists "registrations/welcome/jobs_to_be_done", f: f = render_if_exists "registrations/welcome/setup_for_company", f: f = render_if_exists "registrations/welcome/joining_project" diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index ab5ca0cd90f..5a45e512579 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -15,8 +15,8 @@ - page_description(_("%{count} %{scope} for term '%{term}'") % { count: @search_results.formatted_count(@scope), scope: @scope, term: @search_term }) - page_card_attributes("Namespace" => @group&.full_path, "Project" => @project&.full_path) -.page-title-holder.d-flex.flex-wrap.justify-content-between - %h1.page-title.mr-3= _('Search') +.page-title-holder.gl-display-flex.gl-flex-wrap.gl-justify-content-space-between + %h1.page-title.gl-font-size-h-display.gl-mr-5= _('Search') = render_if_exists 'search/form_elasticsearch', attrs: { class: 'mb-2 mb-sm-0 align-self-center' } .gl-mt-3 diff --git a/app/views/sent_notifications/unsubscribe.html.haml b/app/views/sent_notifications/unsubscribe.html.haml index cacfd601d4d..03b030eb257 100644 --- a/app/views/sent_notifications/unsubscribe.html.haml +++ b/app/views/sent_notifications/unsubscribe.html.haml @@ -6,7 +6,7 @@ - noteable_url = show_project_path ? url_for([@sent_notification.project, noteable]) : breadcrumb_title_link - page_title _('Unsubscribe'), noteable_text, noteable_type.pluralize, project_path -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Unsubscribe from %{type}") % { type: noteable_type } %p diff --git a/app/views/shared/_alert_info.html.haml b/app/views/shared/_alert_info.html.haml index e47c100909a..30dfc87b9bf 100644 --- a/app/views/shared/_alert_info.html.haml +++ b/app/views/shared/_alert_info.html.haml @@ -1,6 +1,3 @@ -.gl-alert.gl-alert-info - = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', css_class: 'gl-icon') - .gl-alert-body += render Pajamas::AlertComponent.new(variant: :info, dismissible: true) do |c| + = c.body do = body diff --git a/app/views/shared/_auto_devops_callout.html.haml b/app/views/shared/_auto_devops_callout.html.haml index d6d84b2181f..c2b941c6106 100644 --- a/app/views/shared/_auto_devops_callout.html.haml +++ b/app/views/shared/_auto_devops_callout.html.haml @@ -1,15 +1,13 @@ -%section.js-autodevops-banner.gl-banner{ data: { uid: 'auto_devops_settings_dismissed', project_path: project_path(@project) } } - .gl-banner-illustration - = image_tag('illustrations/autodevops.svg') += render Pajamas::BannerComponent.new(button_text: s_('AutoDevOps|Enable in settings'), + button_link: project_settings_ci_cd_path(@project, anchor: 'autodevops-settings'), + svg_path: 'illustrations/autodevops.svg', + banner_options: { class: 'js-autodevops-banner', data: { uid: 'auto_devops_settings_dismissed', project_path: project_path(@project) } }, + close_options: { 'aria-label' => s_('AutoDevOps|Dismiss Auto DevOps box'), class: 'js-close-callout' }) do |c| + - c.title do + = s_('AutoDevOps|Auto DevOps') - .gl-banner-content - %h1.gl-banner-title= s_('AutoDevOps|Auto DevOps') - %p= s_('AutoDevOps|It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.') - %p - - link = link_to(s_('AutoDevOps|Auto DevOps documentation'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer') - = s_('AutoDevOps|Learn more in the %{link_to_documentation}').html_safe % { link_to_documentation: link } - = link_to s_('AutoDevOps|Enable in settings'), project_settings_ci_cd_path(@project, anchor: 'autodevops-settings'), class: 'btn btn-md btn-default gl-button js-close-callout' + %p= s_('AutoDevOps|It will automatically build, test, and deploy your application based on a predefined CI/CD configuration.') - %button.gl-banner-close.close.js-close-callout{ type: 'button', - 'aria-label' => s_('AutoDevOps|Dismiss Auto DevOps box') } - = sprite_icon('close', size: 16, css_class: 'dismiss-icon') + %p + - link = link_to(s_('AutoDevOps|Auto DevOps documentation'), help_page_path('topics/autodevops/index.md'), target: '_blank', rel: 'noopener noreferrer') + = s_('AutoDevOps|Learn more in the %{link_to_documentation}').html_safe % { link_to_documentation: link } diff --git a/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml b/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml index d69f54608e9..1f37e33a037 100644 --- a/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml +++ b/app/views/shared/_auto_devops_implicitly_enabled_banner.html.haml @@ -1,7 +1,7 @@ - if show_auto_devops_implicitly_enabled_banner?(project, current_user) - = render Pajamas::AlertComponent.new(alert_class: 'qa-auto-devops-banner auto-devops-implicitly-enabled-banner', - close_button_class: 'hide-auto-devops-implicitly-enabled-banner', - close_button_data: { project_id: project.id }) do |c| + = render Pajamas::AlertComponent.new(alert_options: { class: 'qa-auto-devops-banner auto-devops-implicitly-enabled-banner' }, + close_button_options: { class: 'hide-auto-devops-implicitly-enabled-banner', + data: { project_id: project.id }}) do |c| = c.body do = s_("AutoDevOps|The Auto DevOps pipeline has been enabled and will be used if no alternative CI configuration file is found.") - unless Gitlab.config.registry.enabled diff --git a/app/views/shared/_broadcast_message.html.haml b/app/views/shared/_broadcast_message.html.haml index ab6423e9ade..f7794677dc1 100644 --- a/app/views/shared/_broadcast_message.html.haml +++ b/app/views/shared/_broadcast_message.html.haml @@ -13,8 +13,11 @@ - else = yield - if dismissable && !preview - %button.btn.gl-close-btn-color-inherit.gl-broadcast-message-dismiss.btn-default.btn-sm.gl-button.btn-default-tertiary.btn-icon.js-dismiss-current-broadcast-notification{ 'aria-label' => _('Close'), :type => 'button', data: { id: message.id, expire_date: message.ends_at.iso8601 } } - = sprite_icon('close', size: 16, css_class: "gl-icon gl-mx-3! gl-text-white") + = render Pajamas::ButtonComponent.new(category: :tertiary, + icon: 'close', + size: :small, + button_options: { class: 'gl-close-btn-color-inherit gl-broadcast-message-dismiss js-dismiss-current-broadcast-notification', 'aria-label': _('Close'), data: { id: message.id, expire_date: message.ends_at.iso8601 } }, + icon_classes: 'gl-mx-3! gl-text-white') - else - notification_class = "js-broadcast-notification-#{message.id}" - notification_class << ' preview' if preview @@ -25,5 +28,8 @@ - else = yield - if !preview - %button.js-dismiss-current-broadcast-notification.btn.btn-link.gl-button{ 'aria-label' => _('Close'), :type => 'button', data: { id: message.id, expire_date: message.ends_at.iso8601 } } - = sprite_icon('close', size: 16, css_class: "gl-icon gl-mx-3! gl-text-gray-700") + = render Pajamas::ButtonComponent.new(variant: :link, + icon: 'close', + size: :small, + button_options: { class: 'js-dismiss-current-broadcast-notification', 'aria-label': _('Close'), data: { id: message.id, expire_date: message.ends_at.iso8601 } }, + icon_classes: 'gl-mx-3! gl-text-gray-700') diff --git a/app/views/shared/_captcha_check.html.haml b/app/views/shared/_captcha_check.html.haml index 3d611c22491..a10ae655ea6 100644 --- a/app/views/shared/_captcha_check.html.haml +++ b/app/views/shared/_captcha_check.html.haml @@ -3,7 +3,7 @@ - script = local_assigns.fetch(:script, true) - method = params[:action] == 'create' ? :post : :put -%h3.page-title +%h1.page-title.gl-font-size-h-display = _('Anti-spam verification') %hr diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index ee8cfe3abb6..5ae99474c70 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -2,38 +2,42 @@ - group_path = root_url - group_path << parent.full_path + '/' if parent -.row - .form-group.group-name-holder.col-sm-12 - = f.label :name, class: 'label-bold' do - = s_('Groups|Group name') - = f.text_field :name, placeholder: _('My awesome group'), class: 'js-autofill-group-name form-control input-lg', data: { qa_selector: 'group_name_field' }, - required: true, - title: s_('Groups|Enter a descriptive name for your group.'), - autofocus: true - .text-muted - = s_('Groups|Must start with letter, digit, emoji, or underscore. Can also contain periods, dashes, spaces, and parentheses.') -.row - .form-group.col-xs-12.col-sm-8 - = f.label :path, class: 'label-bold' do - = s_('Groups|Group URL') - .input-group.gl-field-error-anchor - .group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' } - .input-group-text - %span>= root_url - - if parent - %strong= parent.full_path + '/' - = f.hidden_field :parent_id - = f.text_field :path, placeholder: _('my-awesome-group'), class: 'form-control js-validate-group-path js-autofill-group-path', data: { qa_selector: 'group_path_field' }, - autofocus: local_assigns[:autofocus] || false, required: true, - pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, - title: group_url_error_message, - maxlength: ::Namespace::URL_MAX_LENGTH, - "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" - %p.validation-error.gl-field-error.field-validation.hide - = s_('Groups|Group path is unavailable. Path has been replaced with a suggested available path.') - %p.validation-success.gl-field-success.field-validation.hide= s_('Groups|Group path is available.') - %p.validation-pending.gl-field-error-ignore.field-validation.hide= s_('Groups|Checking group URL availability...') +- if Feature::enabled?(:group_name_path_vue, current_user) + = render 'shared/groups/group_name_and_path_fields', f: f +- else + .row + .form-group.group-name-holder.col-sm-12 + = f.label :name, class: 'label-bold' do + = s_('Groups|Group name') + = f.text_field :name, placeholder: _('My awesome group'), class: 'js-autofill-group-name form-control input-lg', data: { qa_selector: 'group_name_field' }, + required: true, + title: s_('Groups|Enter a descriptive name for your group.'), + autofocus: true + .text-muted + = s_('Groups|Must start with letter, digit, emoji, or underscore. Can also contain periods, dashes, spaces, and parentheses.') + + .row + .form-group.col-xs-12.col-sm-8 + = f.label :path, class: 'label-bold' do + = s_('Groups|Group URL') + .input-group.gl-field-error-anchor + .group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' } + .input-group-text + %span>= root_url + - if parent + %strong= parent.full_path + '/' + = f.hidden_field :parent_id + = f.text_field :path, placeholder: _('my-awesome-group'), class: 'form-control js-validate-group-path js-autofill-group-path', data: { qa_selector: 'group_path_field' }, + autofocus: local_assigns[:autofocus] || false, required: true, + pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, + title: group_url_error_message, + maxlength: ::Namespace::URL_MAX_LENGTH, + "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" + %p.validation-error.gl-field-error.field-validation.hide + = s_('Groups|Group path is unavailable. Path has been replaced with a suggested available path.') + %p.validation-success.gl-field-success.field-validation.hide= s_('Groups|Group path is available.') + %p.validation-pending.gl-field-error-ignore.field-validation.hide= s_('Groups|Checking group URL availability...') - if @group.persisted? .gl-alert.gl-alert-warning.gl-mt-3.gl-mb-3 @@ -43,9 +47,9 @@ = succeed '.' do = link_to s_('Groups|Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link' -- if @group.persisted? - .row - .form-group.group-name-holder.col-sm-8 - = f.label :id, class: 'label-bold' do - = s_('Groups|Group ID') - = f.text_field :id, class: 'form-control', readonly: true + - if @group.persisted? + .row + .form-group.group-name-holder.col-sm-8 + = f.label :id, class: 'label-bold' do + = s_('Groups|Group ID') + = f.text_field :id, class: 'form-control', readonly: true diff --git a/app/views/shared/_import_form.html.haml b/app/views/shared/_import_form.html.haml index 7248403d6c9..d10f514dc58 100644 --- a/app/views/shared/_import_form.html.haml +++ b/app/views/shared/_import_form.html.haml @@ -22,9 +22,9 @@ = f.text_field :import_url, value: import_url.sanitized_url, autocomplete: 'off', class: 'form-control gl-form-input', placeholder: 'https://gitlab.company.com/group/project.git', required: true = render Pajamas::AlertComponent.new(variant: :danger, - alert_class: 'gl-mt-3 js-import-url-error hide', + alert_options: { class: 'gl-mt-3 js-import-url-error hide' }, dismissible: false, - close_button_class: 'js-close-2fa-enabled-success-alert') do |c| + close_button_options: { class: 'js-close-2fa-enabled-success-alert' }) do |c| = c.body do = s_('Import|There is not a valid Git repository at this URL. If your HTTP repository is not publicly accessible, verify your credentials.') = render_if_exists 'shared/ee/import_form', f: f, ci_cd_only: ci_cd_only diff --git a/app/views/shared/_label.html.haml b/app/views/shared/_label.html.haml index 9428813f6b0..af5657e0e14 100644 --- a/app/views/shared/_label.html.haml +++ b/app/views/shared/_label.html.haml @@ -6,25 +6,27 @@ - toggle_subscription_path = toggle_subscription_label_path(label, @project) if current_user - tooltip_title = label_status_tooltip(label, status) if status -%li.label-list-item{ id: label_css_id, data: { id: label.id } } +%li.label-list-item{ id: label_css_id, class: "gl-p-5 gl-border-b", data: { id: label.id } } = render "shared/label_row", label: label, force_priority: force_priority %ul.label-actions-list - if can?(current_user, :admin_label, @project) %li.gl-display-inline-block.js-toggle-priority.gl-ml-3{ data: { url: remove_priority_project_label_path(@project, label), dom_id: dom_id(label), type: label.type } } - %button.add-priority.btn.gl-button.btn-default-tertiary.btn-sm.has-tooltip{ title: _('Prioritize'), type: 'button', data: { placement: 'bottom' }, aria_label: _('Prioritize label') } - = sprite_icon('star-o') - %button.remove-priority.btn.gl-button.btn-default-tertiary.btn-sm.has-tooltip{ title: _('Remove priority'), type: 'button', data: { placement: 'bottom' }, aria_label: _('Deprioritize label') } - = sprite_icon('star') + = render Pajamas::ButtonComponent.new(category: :tertiary, + icon: 'star', + button_options: { class: 'remove-priority has-tooltip', 'title': _('Remove priority'), 'aria_label': _('Deprioritize label'), data: { placement: 'bottom' } }) + = render Pajamas::ButtonComponent.new(category: :tertiary, + icon: 'star-o', + button_options: { class: 'add-priority has-tooltip', title: _('Prioritize'), aria_label: _('Prioritize label'), data: { placement: 'bottom' } }) - if can?(current_user, :admin_label, label) %li.gl-display-inline-block - = link_to label.edit_path, class: 'btn gl-button btn-default-tertiary btn-sm edit has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do - = sprite_icon('pencil') + = render Pajamas::ButtonComponent.new(href: label.edit_path, category: :tertiary, icon: 'pencil', button_options: { class: 'edit has-tooltip', 'title': _('Edit'), 'aria_label': _('Edit'), data: { placement: 'bottom' } }) - if can?(current_user, :admin_label, label) %li.gl-display-inline-block .dropdown - %button{ type: 'button', class: 'btn gl-button btn-default-tertiary btn-sm js-label-options-dropdown', data: { toggle: 'dropdown' }, aria_label: _('Label actions dropdown') } - = sprite_icon('ellipsis_v') + = render Pajamas::ButtonComponent.new(category: :tertiary, + icon: 'ellipsis_v', + button_options: { class: 'js-label-options-dropdown', 'aria_label': _('Label actions dropdown'), data: { toggle: 'dropdown' } }) .dropdown-menu.dropdown-open-left %ul - if label.project_label? && label.project.group && can?(current_user, :admin_label, label.project.group) @@ -46,10 +48,9 @@ %button.js-unsubscribe-button.gl-button.btn.btn-default.gl-w-full{ class: ('hidden' if status.unsubscribed?), data: { url: toggle_subscription_path, toggle: 'tooltip' }, title: tooltip_title } %span.gl-button-text= _('Unsubscribe') .dropdown.dropdown-group-label{ class: ('hidden' unless status.unsubscribed?) } - %button.gl-button.btn.btn-default.gl-w-full{ data: { toggle: 'dropdown' } } - %span.gl-button-text - = _('Subscribe') - = sprite_icon('chevron-down') + = render Pajamas::ButtonComponent.new(button_options: { class: 'gl-w-full', data: { toggle: 'dropdown' } }) do + = _('Subscribe') + = sprite_icon('chevron-down') .dropdown-menu.dropdown-open-left %ul %li diff --git a/app/views/shared/_no_password.html.haml b/app/views/shared/_no_password.html.haml index 91cd91ec38b..76830230cf6 100644 --- a/app/views/shared/_no_password.html.haml +++ b/app/views/shared/_no_password.html.haml @@ -1,7 +1,7 @@ - if show_no_password_message? = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'js-no-password-message', - close_button_class: 'js-hide-no-password-message') do |c| + alert_options: { class: 'js-no-password-message' }, + close_button_options: { class: 'js-hide-no-password-message' }) do |c| = c.body do = no_password_message = c.actions do diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index c4d8cb092dc..be1df54a432 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -1,7 +1,7 @@ - if show_no_ssh_key_message? = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'js-no-ssh-message', - close_button_class: 'js-hide-no-ssh-message') do |c| + alert_options: { class: 'js-no-ssh-message' }, + close_button_options: { class: 'js-hide-no-ssh-message'}) do |c| = c.body do = s_("MissingSSHKeyWarningLink|You can't push or pull repositories using SSH until you add an SSH key to your profile.") = c.actions do diff --git a/app/views/shared/_project_limit.html.haml b/app/views/shared/_project_limit.html.haml index b630c829c76..60be03c6631 100644 --- a/app/views/shared/_project_limit.html.haml +++ b/app/views/shared/_project_limit.html.haml @@ -1,7 +1,7 @@ - if cookies[:hide_project_limit_message].blank? && !current_user.hide_project_limit && !current_user.can_create_project? && current_user.projects_limit > 0 = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, - alert_class: 'project-limit-message') do |c| + alert_options: { class: 'project-limit-message' }) do |c| = c.body do = _("You won't be able to create new projects because you have reached your project limit.") = c.actions do diff --git a/app/views/shared/_remote_mirror_update_button.html.haml b/app/views/shared/_remote_mirror_update_button.html.haml index 70b72f74ab3..f3942aa5dc2 100644 --- a/app/views/shared/_remote_mirror_update_button.html.haml +++ b/app/views/shared/_remote_mirror_update_button.html.haml @@ -1,6 +1,7 @@ - if remote_mirror.update_in_progress? - %button.btn.btn-icon.gl-button.disabled{ type: 'button', data: { toggle: 'tooltip', container: 'body', qa_selector: 'updating_button' }, title: _('Updating') } - = sprite_icon("retry", css_class: "spin") + = render Pajamas::ButtonComponent.new(icon: 'retry', + button_options: { class: 'disabled', title: _('Updating'), data: { toggle: 'tooltip', container: 'body', qa_selector: 'updating_button' } }, + icon_classes: 'spin') - elsif remote_mirror.enabled? = link_to update_now_project_mirror_path(@project, sync_remote: true), method: :post, class: "btn btn-icon gl-button qa-update-now-button rspec-update-now-button", data: { toggle: 'tooltip', container: 'body' }, title: _('Update now') do = sprite_icon("retry") diff --git a/app/views/shared/_service_ping_consent.html.haml b/app/views/shared/_service_ping_consent.html.haml index 8de7552c39a..700ffa7aa12 100644 --- a/app/views/shared/_service_ping_consent.html.haml +++ b/app/views/shared/_service_ping_consent.html.haml @@ -1,5 +1,5 @@ - if session[:ask_for_usage_stats_consent] - = render Pajamas::AlertComponent.new(alert_class: 'service-ping-consent-message') do |c| + = render Pajamas::AlertComponent.new(alert_options: { class: 'service-ping-consent-message' }) do |c| = c.body do - docs_link = link_to _('collect usage information'), help_page_path('user/admin_area/settings/usage_statistics.md'), class: 'gl-link' - settings_link = link_to _('your settings'), metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), class: 'gl-link' @@ -7,5 +7,5 @@ = c.actions do - send_service_data_path = admin_application_settings_path(application_setting: { version_check_enabled: 1, usage_ping_enabled: 1 }) - not_now_path = admin_application_settings_path(application_setting: { version_check_enabled: 0, usage_ping_enabled: 0 }) - = link_to _("Send service data"), send_service_data_path, 'data-url' => admin_application_settings_path, method: :put, 'data-check-enabled': true, 'data-service-ping-enabled': true, class: 'js-service-ping-consent-action alert-link btn gl-button btn-info' + = link_to _("Send service data"), send_service_data_path, 'data-url' => admin_application_settings_path, method: :put, 'data-check-enabled': true, 'data-service-ping-enabled': true, class: 'js-service-ping-consent-action alert-link btn gl-button btn-confirm' = link_to _("Don't send service data"), not_now_path, 'data-url' => admin_application_settings_path, method: :put, 'data-check-enabled': false, 'data-service-ping-enabled': false, class: 'js-service-ping-consent-action alert-link btn gl-button btn-default gl-ml-3' diff --git a/app/views/shared/_sidebar_toggle_button.html.haml b/app/views/shared/_sidebar_toggle_button.html.haml index b3d6c4c327b..0a74e47fa4c 100644 --- a/app/views/shared/_sidebar_toggle_button.html.haml +++ b/app/views/shared/_sidebar_toggle_button.html.haml @@ -1,5 +1,5 @@ %a.toggle-sidebar-button.js-toggle-sidebar.qa-toggle-sidebar.rspec-toggle-sidebar{ role: "button", type: "button", title: "Toggle sidebar" } - = sprite_icon('chevron-double-lg-left', css_class: 'icon-chevron-double-lg-left') + = sprite_icon('chevron-double-lg-left', size: 12, css_class: 'icon-chevron-double-lg-left') %span.collapse-text.gl-ml-3= _("Collapse sidebar") = button_tag class: 'close-nav-button', type: 'button' do diff --git a/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml b/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml index 0899756d088..ff4b2de2286 100644 --- a/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml +++ b/app/views/shared/_two_factor_auth_recovery_settings_check.html.haml @@ -1,9 +1,9 @@ = render Pajamas::AlertComponent.new(variant: :warning, - alert_class: 'js-recovery-settings-callout gl-mt-5', - alert_data: { feature_id: Users::CalloutsHelper::TWO_FACTOR_AUTH_RECOVERY_SETTINGS_CHECK, - dismiss_endpoint: callouts_path, - defer_links: 'true' }, - close_button_data: { testid: 'close-account-recovery-regular-check-callout' }) do |c| + alert_options: { class: 'js-recovery-settings-callout gl-mt-5', + data: { feature_id: Users::CalloutsHelper::TWO_FACTOR_AUTH_RECOVERY_SETTINGS_CHECK, + dismiss_endpoint: callouts_path, + defer_links: 'true' }}, + close_button_options: { data: { testid: 'close-account-recovery-regular-check-callout' }}) do |c| = c.body do = s_('Profiles|Ensure you have two-factor authentication recovery codes stored in a safe place.') = link_to _('Learn more.'), help_page_path('user/profile/account/two_factor_authentication', anchor: 'recovery-codes'), target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/shared/access_tokens/_form.html.haml b/app/views/shared/access_tokens/_form.html.haml index d4106ba4e5d..0f6fc860883 100644 --- a/app/views/shared/access_tokens/_form.html.haml +++ b/app/views/shared/access_tokens/_form.html.haml @@ -1,3 +1,4 @@ +- ajax = local_assigns.fetch(:ajax, false) - title = local_assigns.fetch(:title, _('Add a %{type}') % { type: type }) - prefix = local_assigns.fetch(:prefix, :personal_access_token) - help_path = local_assigns.fetch(:help_path) @@ -10,9 +11,9 @@ %p.profile-settings-content = _("Enter the name of your application, and we'll return a unique %{type}.") % { type: type } -= gitlab_ui_form_for token, as: prefix, url: path, method: :post, html: { class: 'js-requires-input' } do |f| += gitlab_ui_form_for token, as: prefix, url: path, method: :post, html: { id: 'js-new-access-token-form', class: 'js-requires-input' }, remote: ajax do |f| - = form_errors(token) + = form_errors(token, pajamas_alert: true) .row .form-group.col diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml index 3bbd7a32bda..8e4b8d6d428 100644 --- a/app/views/shared/builds/_tabs.html.haml +++ b/app/views/shared/builds/_tabs.html.haml @@ -1,6 +1,6 @@ - count_badge_classes = 'gl-display-none gl-sm-display-inline-flex' -= gl_tabs_nav( {class: 'gl-border-b-0 gl-flex-grow-1', data: { testid: 'jobs-tabs' } } ) do += gl_tabs_nav( {class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-w-full nav gl-border-b-0', data: { testid: 'jobs-tabs' } } ) do = gl_tab_link_to build_path_proc.call(nil), { item_active: scope.nil? } do = _('All') = gl_tab_counter_badge(limited_counter_with_delimiter(all_builds), { class: count_badge_classes }) diff --git a/app/views/shared/deploy_keys/_form.html.haml b/app/views/shared/deploy_keys/_form.html.haml index b60d433bafa..4ab93030638 100644 --- a/app/views/shared/deploy_keys/_form.html.haml +++ b/app/views/shared/deploy_keys/_form.html.haml @@ -2,7 +2,7 @@ - deploy_key = local_assigns.fetch(:deploy_key) - deploy_keys_project = deploy_key.deploy_keys_project_for(@project) -= form_errors(deploy_key) += form_errors(deploy_key, pajamas_alert: true) .form-group = form.label :title, class: 'col-form-label col-sm-2' diff --git a/app/views/shared/deploy_keys/_index.html.haml b/app/views/shared/deploy_keys/_index.html.haml index 388fe75e833..1cd2a590653 100644 --- a/app/views/shared/deploy_keys/_index.html.haml +++ b/app/views/shared/deploy_keys/_index.html.haml @@ -2,8 +2,8 @@ %section.rspec-deploy-keys-settings.settings.no-animate#js-deploy-keys-settings{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_keys_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Deploy keys') - %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 - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/deploy_keys/index') } = _("Add deploy keys to grant read/write access to this repository. %{link_start}What are deploy keys?%{link_end}").html_safe % { link_start: link_start, link_end: '</a>'.html_safe } diff --git a/app/views/shared/deploy_tokens/_index.html.haml b/app/views/shared/deploy_tokens/_index.html.haml index 860fb5614af..aa4a3deaac4 100644 --- a/app/views/shared/deploy_tokens/_index.html.haml +++ b/app/views/shared/deploy_tokens/_index.html.haml @@ -3,8 +3,8 @@ %section.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_tokens_settings_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= s_('DeployTokens|Deploy tokens') - %button.btn.gl-button.btn-default.js-settings-toggle - = expanded ? 'Collapse' : 'Expand' + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded ? _('Collapse') : _('Expand') %p = description .settings-content diff --git a/app/views/shared/empty_states/_wikis.html.haml b/app/views/shared/empty_states/_wikis.html.haml index c3120774826..552b100d5dd 100644 --- a/app/views/shared/empty_states/_wikis.html.haml +++ b/app/views/shared/empty_states/_wikis.html.haml @@ -13,7 +13,7 @@ = create_link - if show_enable_confluence_integration?(@wiki.container) = link_to s_('WikiEmpty|Enable the Confluence Wiki integration'), - edit_project_integration_path(@project, :confluence), + edit_project_settings_integration_path(@project, :confluence), class: 'btn gl-button', title: s_('WikiEmpty|Enable the Confluence Wiki integration') - elsif @project && can?(current_user, :read_issue, @project) diff --git a/app/views/shared/errors/_gitaly_unavailable.html.haml b/app/views/shared/errors/_gitaly_unavailable.html.haml index c9d7920b9c2..ba3293a3f75 100644 --- a/app/views/shared/errors/_gitaly_unavailable.html.haml +++ b/app/views/shared/errors/_gitaly_unavailable.html.haml @@ -1,4 +1,4 @@ -= render Pajamas::AlertComponent.new(alert_class: 'gl-my-5', += render Pajamas::AlertComponent.new(alert_options: { class: 'gl-my-5' }, variant: :danger, dismissible: false, title: reason) do |c| diff --git a/app/views/shared/form_elements/_description.html.haml b/app/views/shared/form_elements/_description.html.haml index 94818c13f76..a87aa8de679 100644 --- a/app/views/shared/form_elements/_description.html.haml +++ b/app/views/shared/form_elements/_description.html.haml @@ -6,23 +6,22 @@ - supports_quick_actions = true - preview_url = preview_markdown_path(project, target_type: model.class.name) -.form-group.row.detail-page-description - = form.label :description, _('Description'), class: 'col-form-label col-sm-2' - .col-sm-10 - - if model.is_a?(MergeRequest) - = hidden_field_tag :merge_request_diff_head_sha, model.diff_head_sha +.form-group + = form.label :description, _('Description'), class: 'gl-display-block' + - if model.is_a?(MergeRequest) + = hidden_field_tag :merge_request_diff_head_sha, model.diff_head_sha - - if model.is_a?(Issuable) - = render 'shared/issuable/form/template_selector', issuable: model + - if model.is_a?(Issuable) + = render 'shared/issuable/form/template_selector', issuable: model - = render 'shared/form_elements/apply_template_warning', issuable: model + = render 'shared/form_elements/apply_template_warning', issuable: model - = render layout: 'shared/md_preview', locals: { url: preview_url, referenced_users: true } do - = render 'shared/zen', f: form, attr: :description, - classes: 'note-textarea rspec-issuable-form-description', - placeholder: placeholder, - supports_quick_actions: supports_quick_actions, - qa_selector: 'issuable_form_description' - = render 'shared/notes/hints', supports_quick_actions: supports_quick_actions - .clearfix - .error-alert + = render layout: 'shared/md_preview', locals: { url: preview_url, referenced_users: true } do + = render 'shared/zen', f: form, attr: :description, + classes: 'note-textarea rspec-issuable-form-description', + placeholder: placeholder, + supports_quick_actions: supports_quick_actions, + qa_selector: 'issuable_form_description' + = render 'shared/notes/hints', supports_quick_actions: supports_quick_actions + .clearfix + .error-alert diff --git a/app/views/shared/groups/_group_name_and_path_fields.html.haml b/app/views/shared/groups/_group_name_and_path_fields.html.haml new file mode 100644 index 00000000000..709130a47d3 --- /dev/null +++ b/app/views/shared/groups/_group_name_and_path_fields.html.haml @@ -0,0 +1,5 @@ +.js-group-name-and-path{ data: group_name_and_path_app_data(@group) } + = f.hidden_field :name, data: { js_name: 'name' } + = f.hidden_field :path, maxlength: ::Namespace::URL_MAX_LENGTH, pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, data: { js_name: 'path' } + = f.hidden_field :parent_id, data: { js_name: 'parentId' } + = f.hidden_field :id, data: { js_name: 'groupId' } diff --git a/app/views/shared/hook_logs/_content.html.haml b/app/views/shared/hook_logs/_content.html.haml index 932971402a2..8b5b4b6e5fa 100644 --- a/app/views/shared/hook_logs/_content.html.haml +++ b/app/views/shared/hook_logs/_content.html.haml @@ -30,8 +30,11 @@ %h4.gl-mt-6= _('Request') %pre - :escaped - #{Gitlab::Json.pretty_generate(hook_log.request_data)} + - if hook_log.oversize? + = _('Request data is too large') + - else + :escaped + #{Gitlab::Json.pretty_generate(hook_log.request_data)} %h5= _('Headers') %pre diff --git a/app/views/shared/integrations/overrides.html.haml b/app/views/shared/integrations/overrides.html.haml index 4619675cfef..a63053bde0a 100644 --- a/app/views/shared/integrations/overrides.html.haml +++ b/app/views/shared/integrations/overrides.html.haml @@ -3,7 +3,7 @@ - page_title @integration.title, _('Integrations') - @content_class = 'limit-container-width' unless fluid_layout -%h3.page-title +%h1.page-title.gl-font-size-h-display = @integration.title .js-vue-integration-overrides{ data: integration_overrides_data(@integration, project: @project, group: @group) } diff --git a/app/views/shared/issuable/_bulk_update_sidebar.html.haml b/app/views/shared/issuable/_bulk_update_sidebar.html.haml index 3a526a9f306..8409f224158 100644 --- a/app/views/shared/issuable/_bulk_update_sidebar.html.haml +++ b/app/views/shared/issuable/_bulk_update_sidebar.html.haml @@ -6,8 +6,10 @@ = form_tag [:bulk_update, @project, type], method: :post, class: "bulk-update" do .block.issuable-sidebar-header .filter-item.inline.update-issues-btn.float-left - = button_tag _('Update all'), class: "gl-button btn js-update-selected-issues btn-confirm", disabled: true - = button_tag _('Cancel'), class: "gl-button btn btn-default js-bulk-update-menu-hide float-right" + = render Pajamas::ButtonComponent.new(variant: :confirm, button_options: { type: 'submit', disabled: true, class: 'js-update-selected-issues' }) do + = _('Update all') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-bulk-update-menu-hide float-right' }) do + = _('Cancel') - if params[:state] != 'merged' .block .title diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 62e1a930ee6..da49a301087 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -8,7 +8,7 @@ - if @conflict = render Pajamas::AlertComponent.new(variant: :danger, dismissible: false, - alert_class: 'gl-mb-5') do |c| + alert_options: { class: 'gl-mb-5' }) do |c| = c.body do Someone edited the #{issuable.class.model_name.human.downcase} the same time you did. Please check out @@ -17,12 +17,11 @@ = render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form -.form-group.row - = form.label :title, class: 'col-form-label col-sm-2' do - = _('Title') - %i{ aria: { hidden: true } }= '*' +.form-group + = form.label :title do + = _('Title (required)') - = render 'shared/issuable/form/title', issuable: issuable, form: form, has_wip_commits: commits && commits.detect(&:work_in_progress?) + = render 'shared/issuable/form/title', issuable: issuable, form: form, has_wip_commits: commits && commits.detect(&:draft?) #js-suggestions{ data: { project_path: @project.full_path } } = render 'shared/issuable/form/type_selector', issuable: issuable, form: form @@ -36,27 +35,26 @@ = render 'shared/issuable/form/contribution', issuable: issuable, form: form - if @merge_request_to_resolve_discussions_of - .form-group.row - .col-sm-10.offset-sm-2 - = sprite_icon('information-o') - - if @merge_request_to_resolve_discussions_of.discussions_can_be_resolved_by?(current_user) - = hidden_field_tag 'merge_request_to_resolve_discussions_of', @merge_request_to_resolve_discussions_of.iid - - if @discussion_to_resolve - = hidden_field_tag 'discussion_to_resolve', @discussion_to_resolve.id - Creating this issue will resolve the thread in - - else - Creating this issue will resolve all threads in - = link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve) + .form-group + = sprite_icon('information-o') + - if @merge_request_to_resolve_discussions_of.discussions_can_be_resolved_by?(current_user) + = hidden_field_tag 'merge_request_to_resolve_discussions_of', @merge_request_to_resolve_discussions_of.iid + - if @discussion_to_resolve + = hidden_field_tag 'discussion_to_resolve', @discussion_to_resolve.id + Creating this issue will resolve the thread in - else - The - = @discussion_to_resolve ? 'thread' : 'threads' - at - = link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve) - will stay unresolved. Ask someone with permission to resolve - = @discussion_to_resolve ? 'it.' : 'them.' + Creating this issue will resolve all threads in + = link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve) + - else + The + = @discussion_to_resolve ? 'thread' : 'threads' + at + = link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve) + will stay unresolved. Ask someone with permission to resolve + = @discussion_to_resolve ? 'it.' : 'them.' - is_footer = !(issuable.is_a?(MergeRequest) && issuable.new_record?) -.row-content-block{ class: (is_footer ? "footer-block" : "middle-block") } +.gl-mt-5{ class: (is_footer ? "footer-block" : "middle-block") } - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path) .gl-mb-5 Please review the diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml index 7ab82362e85..ec78b3f7ce3 100644 --- a/app/views/shared/issuable/_label_page_create.html.haml +++ b/app/views/shared/issuable/_label_page_create.html.haml @@ -6,7 +6,7 @@ .dropdown-page-two.dropdown-new-label = dropdown_title(create_label_title(subject), options: { back: true, close: show_close }) = dropdown_content do - = render Pajamas::AlertComponent.new(variant: :danger, alert_class: 'js-label-error gl-mb-3', dismissible: false) + = render Pajamas::AlertComponent.new(variant: :danger, alert_options: { class: 'js-label-error gl-mb-3' }, dismissible: false) %input#new_label_name.default-dropdown-input{ type: "text", placeholder: _('Name new label') } .suggest-colors.suggest-colors-dropdown = render_suggested_colors diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index feffc7eb011..55f5dce8b37 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -13,7 +13,7 @@ %aside.right-sidebar.js-right-sidebar.js-issuable-sidebar{ data: { signed: { in: signed_in }, issuable_type: issuable_type }, class: "#{sidebar_gutter_collapsed_class} #{'right-sidebar-merge-requests' if moved_sidebar_enabled}", 'aria-live' => 'polite', 'aria-label': issuable_type } .issuable-sidebar{ class: "#{'is-merge-request' if moved_sidebar_enabled}" } - .issuable-sidebar-header{ class: "#{'gl-pb-2! gl-md-display-flex gl-justify-content-end gl-md-display-none!' if moved_sidebar_enabled}" } + .issuable-sidebar-header{ class: "#{'gl-pb-2! gl-md-display-flex gl-justify-content-end gl-lg-display-none!' if moved_sidebar_enabled}" } %a.gutter-toggle.float-right.js-sidebar-toggle.has-tooltip{ role: "button", class: "#{'gl-display-block' if moved_sidebar_enabled}", href: "#", "aria-label" => _('Toggle sidebar'), title: sidebar_gutter_tooltip_text, data: { container: 'body', placement: 'left', boundary: 'viewport' } } = sidebar_gutter_toggle_icon - if signed_in && !moved_sidebar_enabled @@ -48,7 +48,7 @@ .js-milestone-select{ data: { can_edit: can_edit_issuable.to_s, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid] } } - if in_group_context_with_iterations - .block{ class: 'gl-pt-0! gl-collapse-empty', data: { qa_selector: 'iteration_container', testid: 'iteration_container' } }< + .block.gl-collapse-empty{ data: { qa_selector: 'iteration_container', testid: 'iteration_container' } }< = render_if_exists 'shared/issuable/iteration_select', can_edit: can_edit_issuable.to_s, group_path: @project.group.full_path, project_path: issuable_sidebar[:project_full_path], issue_iid: issuable_sidebar[:iid], issuable_type: issuable_type - if issuable_sidebar[:show_crm_contacts] @@ -106,8 +106,7 @@ .sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body', boundary: 'viewport' }, title: _('Move issue') } = sprite_icon('long-arrow') .dropdown.sidebar-move-issue-dropdown.hide-collapsed - %button.gl-button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button', - data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_action: "click_button", track_value: "" } } + = render Pajamas::ButtonComponent.new(block: true, button_options: { class: 'js-sidebar-dropdown-toggle js-move-issue', data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_action: "click_button", track_value: "" } } ) do = _('Move issue') .dropdown-menu.dropdown-menu-selectable.dropdown-extended-height = dropdown_title(_('Move issue')) diff --git a/app/views/shared/issuable/_status_box.html.haml b/app/views/shared/issuable/_status_box.html.haml index 4fda1f11545..125ef921cfa 100644 --- a/app/views/shared/issuable/_status_box.html.haml +++ b/app/views/shared/issuable/_status_box.html.haml @@ -2,8 +2,7 @@ - badge_icon = state_name_with_icon(issuable)[1] - badge_variant = issuable.open? ? :success : issuable.merged? ? :info : :danger - badge_status_class = issuable.open? ? 'issuable-status-badge-open' : issuable.merged? ? 'issuable-status-badge-merged' : 'issuable-status-badge-closed' -- updated_mr_header_enabled = Feature.enabled?(:updated_mr_header, @project) && issuable.is_a?(MergeRequest) -- badge_classes = "js-mr-status-box issuable-status-badge gl-mr-3 #{badge_status_class} #{'gl-vertical-align-bottom' if updated_mr_header_enabled}" +- badge_classes = "js-mr-status-box issuable-status-badge gl-mr-3 #{badge_status_class} #{'gl-vertical-align-bottom' if issuable.is_a?(MergeRequest)}" = gl_badge_tag({ variant: badge_variant, icon: badge_icon, icon_classes: 'gl-mr-0!' }, { class: badge_classes, data: { project_path: issuable.project.path_with_namespace, iid: issuable.iid, issuable_type: 'merge_request', state: issuable.state } }) do %span.gl-display-none.gl-sm-display-block.gl-ml-2 diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 46df9b4ef9a..8ab002f755f 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -37,12 +37,8 @@ data: { placeholder: _('Select branch'), endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) - if source_level < target_level - .gl-alert.gl-alert-warning.gl-alert-not-dismissible.gl-max-content.gl-mt-4 - .gl-alert-container - .gl-alert-content{ role: 'alert' } - = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-body - = visibilityMismatchString - %br - = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } -%hr + = render Pajamas::AlertComponent.new(variant: :warning, dismissible: false, alert_options: { class: 'gl-mb-4' }) do |c| + = c.body do + = visibilityMismatchString + %br + = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } diff --git a/app/views/shared/issuable/form/_merge_params.html.haml b/app/views/shared/issuable/form/_merge_params.html.haml index 76feb4d1613..5831460d59a 100644 --- a/app/views/shared/issuable/form/_merge_params.html.haml +++ b/app/views/shared/issuable/form/_merge_params.html.haml @@ -4,11 +4,10 @@ - return unless issuable.is_a?(MergeRequest) - return if issuable.closed_or_merged_without_fork? -.form-group.row - .col-sm-2.col-form-label.pt-sm-0 +.form-group.row.gl-mb-7 + .col-12 %label = _('Merge options') - .col-sm-10 - if issuable.can_remove_source_branch?(current_user) .form-check.gl-mb-3 = hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml index e941eaadbc9..61cc408f6b3 100644 --- a/app/views/shared/issuable/form/_metadata.html.haml +++ b/app/views/shared/issuable/form/_metadata.html.haml @@ -5,24 +5,21 @@ - form = local_assigns.fetch(:form) - if @add_related_issue - .form-group.row - .offset-sm-2.col-sm-10 - .form-check - = check_box_tag :add_related_issue, @add_related_issue.iid, true, class: 'form-check-input' - = label_tag :add_related_issue, class: 'form-check-label' do - - add_related_issue_link = link_to "\##{@add_related_issue.iid}", issue_path(@add_related_issue), class: ['has-tooltip'], title: @add_related_issue.title - #{_('Relate to %{issuable_type} %{add_related_issue_link}').html_safe % { issuable_type: @add_related_issue.issue_type, add_related_issue_link: add_related_issue_link }} - %p.text-muted= _('Adds this %{issuable_type} as related to the %{issuable_type} it was created from') % { issuable_type: @add_related_issue.issue_type } + .form-group + .form-check + = check_box_tag :add_related_issue, @add_related_issue.iid, true, class: 'form-check-input' + = label_tag :add_related_issue, class: 'form-check-label' do + - add_related_issue_link = link_to "\##{@add_related_issue.iid}", issue_path(@add_related_issue), class: ['has-tooltip'], title: @add_related_issue.title + #{_('Relate to %{issuable_type} %{add_related_issue_link}').html_safe % { issuable_type: @add_related_issue.issue_type, add_related_issue_link: add_related_issue_link }} + %p.text-muted= _('Adds this %{issuable_type} as related to the %{issuable_type} it was created from') % { issuable_type: @add_related_issue.issue_type } - if issuable.respond_to?(:confidential) && can?(current_user, :set_confidentiality, issuable) - .form-group.row - .offset-sm-2.col-sm-10 - = form.gitlab_ui_checkbox_component :confidential, - _('This issue is confidential and should only be visible to team members with at least Reporter access.') + .form-group + = form.gitlab_ui_checkbox_component :confidential, + _('This issue is confidential and should only be visible to team members with at least Reporter access.') - if can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable) - %hr - .row + .row.gl-pt-4 %div{ class: (has_due_date ? "col-lg-6" : "col-12") } .form-group.row.merge-request-assignee = render "shared/issuable/form/metadata_issuable_assignee", issuable: issuable, form: form, has_due_date: has_due_date @@ -35,15 +32,15 @@ - if issuable.supports_milestone? .form-group.row.issue-milestone - = form.label :milestone_id, _('Milestone'), class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}" - .col-sm-10{ class: ("col-md-8" if has_due_date) } + = form.label :milestone_id, _('Milestone'), class: "col-12" + .col-12 .issuable-form-select-holder = render "shared/issuable/milestone_dropdown", selected: issuable.milestone, name: "#{issuable.class.model_name.param_key}[milestone_id]", show_any: false, show_upcoming: false, show_started: false, extra_class: "qa-issuable-milestone-dropdown js-issuable-form-dropdown js-dropdown-keep-input", dropdown_title: _('Select milestone') .form-group.row - = form.label :label_ids, _('Labels'), class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}" + = form.label :label_ids, _('Labels'), class: "col-12" = form.hidden_field :label_ids, multiple: true, value: '' - .col-sm-10{ class: "#{"col-md-8" if has_due_date}" } + .col-12 .issuable-form-select-holder = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false }, dropdown_title: "Select label" @@ -53,7 +50,7 @@ .col-lg-6 = render_if_exists "shared/issuable/form/weight", issuable: issuable, form: form .form-group.row - = form.label :due_date, _('Due date'), class: "col-form-label col-md-2 col-lg-4" - .col-8 + = form.label :due_date, _('Due date'), class: "col-12" + .col-12 .issuable-form-select-holder = form.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: _('Select due date'), autocomplete: 'off' diff --git a/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml b/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml index 781ee8b5f80..f9c3c11eed8 100644 --- a/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml +++ b/app/views/shared/issuable/form/_metadata_issuable_assignee.html.haml @@ -1,5 +1,5 @@ -= form.label :assignee_id, issuable.allows_multiple_assignees? ? _('Assignees') : _('Assignee'), class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}" -.col-sm-10{ class: ("col-md-8" if has_due_date) } += form.label :assignee_id, issuable.allows_multiple_assignees? ? _('Assignees') : _('Assignee'), class: "col-12" +.col-12 .issuable-form-select-holder.selectbox - issuable.assignees.each do |assignee| = hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", assignee.id, id: nil, data: { meta: assignee.name, avatar_url: assignee.avatar_url, name: assignee.name, username: assignee.username } @@ -8,4 +8,4 @@ = hidden_field_tag "#{issuable.to_ability_name}[assignee_ids][]", 0, id: nil, data: { meta: '' } = dropdown_tag(users_dropdown_label(issuable.assignees), options: assignees_dropdown_options(issuable.to_ability_name)) - = link_to _('Assign to me'), '#', class: "assign-to-me-link qa-assign-to-me-link #{'hide' if issuable.assignees.include?(current_user)}" + = link_to _('Assign to me'), '#', class: "assign-to-me-link gl-white-space-nowrap gl-pl-4 qa-assign-to-me-link #{'hide' if issuable.assignees.include?(current_user)}" diff --git a/app/views/shared/issuable/form/_metadata_issuable_reviewer.html.haml b/app/views/shared/issuable/form/_metadata_issuable_reviewer.html.haml index fad13c78e26..0e3383acfce 100644 --- a/app/views/shared/issuable/form/_metadata_issuable_reviewer.html.haml +++ b/app/views/shared/issuable/form/_metadata_issuable_reviewer.html.haml @@ -1,5 +1,5 @@ -= form.label :reviewer_id, issuable.allows_multiple_reviewers? ? _('Reviewers') : _('Reviewer'), class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}" -.col-sm-10.gl-mb-2{ class: ("col-md-8" if has_due_date) } += form.label :reviewer_id, issuable.allows_multiple_reviewers? ? _('Reviewers') : _('Reviewer'), class: "col-12" +.col-12 .issuable-form-select-holder.selectbox - issuable.reviewers.each do |reviewer| = hidden_field_tag "#{issuable.to_ability_name}[reviewer_ids][]", reviewer.id, id: nil, data: { meta: reviewer.name, avatar_url: reviewer.avatar_url, name: reviewer.name, username: reviewer.username } diff --git a/app/views/shared/issuable/form/_title.html.haml b/app/views/shared/issuable/form/_title.html.haml index 6b00cdc5e24..e7c0833de0f 100644 --- a/app/views/shared/issuable/form/_title.html.haml +++ b/app/views/shared/issuable/form/_title.html.haml @@ -2,17 +2,16 @@ - has_wip_commits = local_assigns.fetch(:has_wip_commits) - form = local_assigns.fetch(:form) - no_issuable_templates = issuable_templates(ref_project, issuable.to_ability_name).empty? -- div_class = no_issuable_templates ? 'col-sm-10' : 'col-sm-7 col-lg-8' - toggle_wip_link_start = '<a href="" class="js-toggle-wip">' - toggle_wip_link_end = '</a>' - add_wip_text = (_('%{link_start}Start the title with %{draft_snippet}%{link_end} to prevent a merge request draft from merging before it\'s ready.') % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: '<code>Draft:</code>'.html_safe } ).html_safe - remove_wip_text = (_('%{link_start}Remove the %{draft_snippet} prefix%{link_end} from the title to allow this merge request to be merged when it\'s ready.' ) % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: '<code>Draft</code>'.html_safe } ).html_safe -%div{ class: div_class, data: { testid: 'issue-title-input-field' } } +%div{ data: { testid: 'issue-title-input-field' } } = form.text_field :title, required: true, aria: { required: true }, maxlength: 255, autofocus: true, - autocomplete: 'off', class: 'form-control pad qa-issuable-form-title', placeholder: _('Title'), dir: 'auto' + autocomplete: 'off', class: 'form-control pad qa-issuable-form-title', dir: 'auto' - - if issuable.respond_to?(:work_in_progress?) + - if issuable.respond_to?(:draft?) .form-text.text-muted .js-wip-explanation{ style: "display: none;" } = remove_wip_text diff --git a/app/views/shared/issuable/form/_type_selector.html.haml b/app/views/shared/issuable/form/_type_selector.html.haml index 0d86aa8c8e7..d5c696b1698 100644 --- a/app/views/shared/issuable/form/_type_selector.html.haml +++ b/app/views/shared/issuable/form/_type_selector.html.haml @@ -1,33 +1,32 @@ - return unless issuable.supports_issue_type? && can?(current_user, :create_issue, @project) -.form-group.row.gl-mb-0 - = form.label :type, _('Type'), class: 'col-form-label col-sm-2' - .col-sm-10 - .gl-display-flex.gl-align-items-center - .issuable-form-select-holder.selectbox.form-group.gl-mb-0 - .dropdown.js-issuable-type-filter-dropdown-wrap - %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' } - %span.dropdown-toggle-text.is-default - = issuable.issue_type.capitalize || _("Select type") - = sprite_icon('chevron-down', css_class: "dropdown-menu-toggle-icon gl-top-3") - .dropdown-menu.dropdown-menu-selectable.dropdown-select - .dropdown-title.gl-display-flex - %span.gl-ml-auto - = _("Select type") - %button.dropdown-title-button.dropdown-menu-close.gl-ml-auto{ type: 'button', "aria-label" => _('Close') } - = sprite_icon('close', size: 16, css_class: 'dropdown-menu-close-icon') - .dropdown-content{ data: { testid: 'issue-type-select-dropdown' } } - %ul - - if create_issue_type_allowed?(@project, :issue) - %li.js-filter-issuable-type - = link_to new_project_issue_path(@project), class: ("is-active" if issuable.issue?) do - #{sprite_icon(work_item_type_icon(:issue), css_class: 'gl-icon')} #{_('Issue')} - - if create_issue_type_allowed?(@project, :incident) - %li.js-filter-issuable-type{ data: { track: { action: "select_issue_type_incident", label: "select_issue_type_incident_dropdown_option" } } } - = link_to new_project_issue_path(@project, { issuable_template: 'incident', issue: { issue_type: 'incident' } }), class: ("is-active" if issuable.incident?) do - #{sprite_icon(work_item_type_icon(:incident), css_class: 'gl-icon')} #{_('Incident')} +.form-group + = form.label :type, _('Type') + .gl-display-flex.gl-align-items-center + .issuable-form-select-holder.selectbox.form-group.gl-mb-0 + .dropdown.js-issuable-type-filter-dropdown-wrap + %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' } + %span.dropdown-toggle-text.is-default + = issuable.issue_type.capitalize || _("Select type") + = sprite_icon('chevron-down', css_class: "dropdown-menu-toggle-icon gl-top-3") + .dropdown-menu.dropdown-menu-selectable.dropdown-select + .dropdown-title.gl-display-flex + %span.gl-ml-auto + = _("Select type") + %button.dropdown-title-button.dropdown-menu-close.gl-ml-auto{ type: 'button', "aria-label" => _('Close') } + = sprite_icon('close', size: 16, css_class: 'dropdown-menu-close-icon') + .dropdown-content{ data: { testid: 'issue-type-select-dropdown' } } + %ul + - if create_issue_type_allowed?(@project, :issue) + %li.js-filter-issuable-type + = link_to new_project_issue_path(@project), class: ("is-active" if issuable.issue?) do + #{sprite_icon(work_item_type_icon(:issue), css_class: 'gl-icon')} #{_('Issue')} + - if create_issue_type_allowed?(@project, :incident) + %li.js-filter-issuable-type{ data: { track: { action: "select_issue_type_incident", label: "select_issue_type_incident_dropdown_option" } } } + = link_to new_project_issue_path(@project, { issuable_template: 'incident', issue: { issue_type: 'incident' } }), class: ("is-active" if issuable.incident?) do + #{sprite_icon(work_item_type_icon(:incident), css_class: 'gl-icon')} #{_('Incident')} - #js-type-popover + #js-type-popover - if issuable.incident? %p.form-text.text-muted diff --git a/app/views/shared/issue_type/_details_content.html.haml b/app/views/shared/issue_type/_details_content.html.haml index 7276175db59..7c5b3fd4b3c 100644 --- a/app/views/shared/issue_type/_details_content.html.haml +++ b/app/views/shared/issue_type/_details_content.html.haml @@ -3,9 +3,9 @@ .issue-details.issuable-details.js-issue-details .detail-page-description.content-block.js-detail-page-description - #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, full_path: @project.full_path } } + #js-issuable-app{ data: { initial: issuable_initial_data(issuable).to_json, issuable_id: issuable.id, full_path: @project.full_path } } .title-container - %h1.title= markdown_field(issuable, :title) + %h1.title.page-title.gl-font-size-h-display= markdown_field(issuable, :title) - if issuable.description.present? .description .md= markdown_field(issuable, :description) @@ -17,6 +17,7 @@ = render 'projects/issues/design_management' + = render_if_exists 'projects/issues/work_item_links' = render_if_exists 'projects/issues/related_issues' #js-related-merge-requests{ data: { endpoint: expose_path(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: issuable.iid)), project_namespace: @project.namespace.path, project_path: @project.path } } diff --git a/app/views/shared/labels/_form.html.haml b/app/views/shared/labels/_form.html.haml index 29f6dc02749..f768b63afff 100644 --- a/app/views/shared/labels/_form.html.haml +++ b/app/views/shared/labels/_form.html.haml @@ -2,21 +2,18 @@ = form_errors(@label) .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :title - .col-sm-10 = f.text_field :title, class: "gl-form-input form-control js-label-title qa-label-title", required: true, autofocus: true = render_if_exists 'shared/labels/create_label_help_text' .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :description - .col-sm-10 = f.text_field :description, class: "gl-form-input form-control js-quick-submit qa-label-description" .form-group.row - .col-sm-2.col-form-label + .col-12 = f.label :color, _("Background color") - .col-sm-10 .input-group .input-group-prepend .input-group-text.label-color-preview @@ -26,13 +23,13 @@ %br = _("Or you can choose one of the suggested colors below") = render_suggested_colors - .gl-display-flex.gl-justify-content-space-between.gl-p-5.gl-bg-gray-10.gl-border-t-solid.gl-border-t-gray-100.gl-border-t-1 + .gl-display-flex.gl-justify-content-space-between %div - if @label.persisted? - = f.submit _('Save changes'), class: 'btn gl-button btn-confirm js-save-button' + = f.submit _('Save changes'), class: 'btn gl-button btn-confirm js-save-button gl-mr-2' - else - = f.submit _('Create label'), class: 'btn gl-button btn-confirm js-save-button qa-label-create-button' - = link_to _('Cancel'), back_path, class: 'btn gl-button btn-default btn-cancel' + = f.submit _('Create label'), class: 'btn gl-button btn-confirm js-save-button qa-label-create-button gl-mr-2' + = link_to _('Cancel'), back_path, class: 'btn gl-button btn-default btn-cancel gl-mr-2' - if @label.persisted? - presented_label = @label.present %button.btn.btn-danger.gl-button.btn-danger-secondary.js-delete-label-modal-button{ type: 'button', data: { label_name: presented_label.name, subject_name: presented_label.subject_name, destroy_path: presented_label.destroy_path } } diff --git a/app/views/shared/labels/_nav.html.haml b/app/views/shared/labels/_nav.html.haml index 47e9d9b0e4a..622ad9db425 100644 --- a/app/views/shared/labels/_nav.html.haml +++ b/app/views/shared/labels/_nav.html.haml @@ -11,10 +11,11 @@ .input-group = search_field_tag :search, params[:search], { placeholder: _('Filter'), id: 'label-search', class: 'form-control search-text-input input-short', spellcheck: false, autofocus: true } %span.input-group-append - %button.btn.gl-button.btn-default{ type: "submit", "aria-label" => _('Submit search') } - = sprite_icon('search') + = render Pajamas::ButtonComponent.new(icon: 'search', button_options: { type: "submit", "aria-label" => _('Submit search') }) = render 'shared/labels/sort_dropdown' - if labels_or_filters && can_admin_label && @project - = link_to _('New label'), new_project_label_path(@project), class: "btn gl-button btn-confirm qa-label-create-new" + = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_project_label_path(@project), button_options: { class: 'qa-label-create-new' }) do + = _('New label') - if labels_or_filters && can_admin_label && @group - = link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-confirm qa-label-create-new" + = render Pajamas::ButtonComponent.new(variant: :confirm, href: new_group_label_path(@group), button_options: { class: 'qa-label-create-new' }) do + = _('New label') diff --git a/app/views/shared/members/_manage_access_button.html.haml b/app/views/shared/members/_manage_access_button.html.haml index 13509a7480a..c88198ec380 100644 --- a/app/views/shared/members/_manage_access_button.html.haml +++ b/app/views/shared/members/_manage_access_button.html.haml @@ -2,6 +2,6 @@ .gl-float-right = link_to path, class: 'btn btn-default btn-sm gl-button' do - = sprite_icon('pencil-square', css_class: 'gl-icon gl-button-icon') + = sprite_icon('pencil', css_class: 'gl-icon gl-button-icon') %span.gl-button-text = _('Manage access') diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 45699808b6b..3082c6bb4db 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -48,14 +48,7 @@ .milestone-actions.d-flex.justify-content-sm-start.justify-content-md-end - if @project # if in milestones list on project level - if can_admin_group_milestones? - %button.js-promote-project-milestone-button.btn.gl-button.btn-icon.btn-default-tertiary.btn-sm.has-tooltip{ title: s_('Milestones|Promote to Group Milestone'), - disabled: true, - type: 'button', - data: { url: promote_project_milestone_path(milestone.project, milestone), - milestone_title: milestone.title, - group_name: @project.group.name } } - = sprite_icon('level-up', size: 14, css_class: 'gl-button-icon gl-icon') - + = render Pajamas::ButtonComponent.new(icon: 'level-up', category: :tertiary, size: :small, button_options: { class: 'js-promote-project-milestone-button', title: s_('Milestones|Promote to Group Milestone'), disabled: true, data: { toggle: 'tooltip', container: 'body', url: promote_project_milestone_path(milestone.project, milestone), milestone_title: milestone.title, group_name: @project.group.name } }) - if can?(current_user, :admin_milestone, milestone) - if milestone.closed? = link_to s_('Milestones|Reopen Milestone'), milestone_path(milestone, milestone: { state_event: :activate }), method: :put, class: "btn gl-button btn-sm gl-ml-3" diff --git a/app/views/shared/milestones/_milestone_complete_alert.html.haml b/app/views/shared/milestones/_milestone_complete_alert.html.haml index 86f9193cc7a..bde8a0b91b0 100644 --- a/app/views/shared/milestones/_milestone_complete_alert.html.haml +++ b/app/views/shared/milestones/_milestone_complete_alert.html.haml @@ -2,7 +2,7 @@ - if milestone.complete? && milestone.active? = render Pajamas::AlertComponent.new(variant: :success, - alert_data: { testid: 'all-issues-closed-alert' }, + alert_options: { data: { testid: 'all-issues-closed-alert' }}, dismissible: false) do |c| = c.body do = yield diff --git a/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml b/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml index d167ffb5582..68a4d010872 100644 --- a/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml +++ b/app/views/shared/namespaces/cascading_settings/_enforcement_checkbox.html.haml @@ -3,6 +3,7 @@ - form = local_assigns.fetch(:form, nil) - setting_locked = local_assigns.fetch(:setting_locked, false) - help_text = local_assigns.fetch(:help_text, s_('CascadingSettings|Subgroups cannot change this setting.')) +- label = local_assigns.fetch(:label, s_('CascadingSettings|Enforce for all subgroups')) - return unless attribute && group && form - return if setting_locked @@ -10,6 +11,6 @@ - lock_attribute = "lock_#{attribute}" = form.gitlab_ui_checkbox_component lock_attribute, - s_('CascadingSettings|Enforce for all subgroups'), + label, help_text: help_text, checkbox_options: { checked: group.namespace_settings.public_send(lock_attribute), data: { testid: 'enforce-for-all-subgroups-checkbox' } } diff --git a/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml b/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml index 4e3b6b2afc4..ed835af6524 100644 --- a/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml +++ b/app/views/shared/namespaces/cascading_settings/_lock_icon.html.haml @@ -1,4 +1,3 @@ -%button.position-absolute.gl-top-3.gl-right-0.gl-translate-y-n50.gl-cursor-default.btn.btn-default.btn-sm.gl-button.btn-default-tertiary.js-cascading-settings-lock-popover-target{ class: 'gl-p-1! gl-text-gray-600! gl-bg-transparent!', - type: 'button', - data: cascading_namespace_settings_popover_data(attribute, group, settings_path_helper) } - = sprite_icon('lock', size: 16) +- class_list = local_assigns.fetch(:class_list, '') + += render Pajamas::ButtonComponent.new(category: 'tertiary', icon: 'lock', button_options: { class: "gl-absolute gl-top-3 gl-right-0 gl-translate-y-n50 gl-p-1! gl-bg-transparent! gl-cursor-default! js-cascading-settings-lock-popover-target #{class_list}", data: cascading_namespace_settings_popover_data(attribute, group, settings_path_helper) }) diff --git a/app/views/shared/notes/_edit_form.html.haml b/app/views/shared/notes/_edit_form.html.haml index 63c895a5a03..cbf0b6f1051 100644 --- a/app/views/shared/notes/_edit_form.html.haml +++ b/app/views/shared/notes/_edit_form.html.haml @@ -9,6 +9,6 @@ .note-form-actions.clearfix .settings-message.note-edit-warning.js-finish-edit-warning = _("Finish editing this message first!") - = submit_tag _('Save comment'), class: 'gl-button btn btn-success js-comment-save-button', data: { qa_selector: 'save_comment_button' } - %button.btn.gl-button.btn-cancel.note-edit-cancel{ type: 'button' } + = submit_tag _('Save comment'), class: 'gl-button btn btn-confirm js-comment-save-button', data: { qa_selector: 'save_comment_button' } + = render Pajamas::ButtonComponent.new(button_options: { class: 'note-edit-cancel' }) do = _("Cancel") diff --git a/app/views/shared/projects/_inactive_project_deletion_alert.html.haml b/app/views/shared/projects/_inactive_project_deletion_alert.html.haml new file mode 100644 index 00000000000..0030265f007 --- /dev/null +++ b/app/views/shared/projects/_inactive_project_deletion_alert.html.haml @@ -0,0 +1,7 @@ +- if show_inactive_project_deletion_banner?(@project) + - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('administration/inactive_project_deletion') } + - link_end = '</a>'.html_safe + - deletion_date = inactive_project_deletion_date(@project) + - title = _('Due to inactivity, this project is scheduled to be deleted on %{deletion_date}. %{link_start}Why is this scheduled?%{link_end}').html_safe % { deletion_date: deletion_date, link_start: link_start, link_end: link_end } + + = render Pajamas::AlertComponent.new(title: title, variant: :warning, alert_options: { class: 'gl-pb-3' }, dismissible: false) diff --git a/app/views/shared/projects/_search_bar.html.haml b/app/views/shared/projects/_search_bar.html.haml index 8ec11d9cfbb..5271a5fac09 100644 --- a/app/views/shared/projects/_search_bar.html.haml +++ b/app/views/shared/projects/_search_bar.html.haml @@ -13,8 +13,7 @@ .filtered-search-box.m-0 .filtered-search-box-input-container.pl-2 = render 'shared/projects/search_form', admin_view: false, search_form_placeholder: _("Search projects...") - %button.btn.gl-button.btn-icon.btn-secondary{ type: 'submit', form: 'project-filter-form' } - = sprite_icon('search', css_class: 'search-icon ') + = render Pajamas::ButtonComponent.new(icon: 'search', icon_classes: 'search-icon', button_options: { type: 'submit', form: 'project-filter-form' }) .filtered-search-dropdown.flex-row.align-items-center.mb-2.m-sm-0#filtered-search-visibility-dropdown{ class: flex_grow_and_shrink_xs } .filtered-search-dropdown-label.p-0.pl-sm-3.font-weight-bold %span diff --git a/app/views/shared/promotions/_promote_servicedesk.html.haml b/app/views/shared/promotions/_promote_servicedesk.html.haml index a2da23de2b9..57ac1370f8d 100644 --- a/app/views/shared/promotions/_promote_servicedesk.html.haml +++ b/app/views/shared/promotions/_promote_servicedesk.html.haml @@ -1,11 +1,8 @@ -.user-callout.promotion-callout.js-service-desk-callout#promote_service_desk{ data: { uid: 'promote_service_desk_dismissed' } } - .bordered-box.content-block - %button.gl-button.btn.btn-default.close.js-close-callout{ type: 'button', 'aria-label' => 'Dismiss Service Desk promotion' } - = sprite_icon('close', size: 16, css_class: 'dismiss-icon') - .svg-container - = custom_icon('icon_service_desk') - .user-callout-copy - %h4 - = _("Improve customer support with Service Desk") - %p - = _("Service Desk allows people to create issues in your GitLab instance without their own user account. It provides a unique email address for end users to create issues in a project. Replies can be sent either through the GitLab interface or by email. End users only see threads through email.") += render Pajamas::BannerComponent.new(banner_options: {class: 'js-service-desk-callout', data: {uid: 'promote_service_desk_dismissed'}, id: 'promote_service_desk'}, + close_options: {'aria-label' => s_('Promotions|Dismiss Service Desk promotion'), class: 'js-close-callout'}, + svg_path: 'illustrations/service_desk_callout.svg', + button_text: s_('Promotions|Configure Service Desk'), button_link: help_page_path('user/project/service_desk.html', anchor: 'configuring-service-desk')) do |c| + - c.title do + = _('Improve customer support with Service Desk') + %p + = _('Service Desk allows people to create issues in your GitLab instance without their own user account. It provides a unique email address for end users to create issues in a project. Replies can be sent either through the GitLab interface or by email. End users only see threads through email.') diff --git a/app/views/shared/runners/_runner_details.html.haml b/app/views/shared/runners/_runner_details.html.haml index 7a35b1cec0a..f6396168cb3 100644 --- a/app/views/shared/runners/_runner_details.html.haml +++ b/app/views/shared/runners/_runner_details.html.haml @@ -1,7 +1,7 @@ - breadcrumb_title runner.short_sha - page_title "##{runner.id} (#{runner.short_sha})" -%h2.page-title +%h1.page-title.gl-font-size-h-display = s_('Runners|Runner #%{runner_id}' % { runner_id: runner.id }) = render 'shared/runners/runner_type_badge', runner: runner diff --git a/app/views/shared/runners/_runner_type_alert.html.haml b/app/views/shared/runners/_runner_type_alert.html.haml index 4bf02b71109..9736780c436 100644 --- a/app/views/shared/runners/_runner_type_alert.html.haml +++ b/app/views/shared/runners/_runner_type_alert.html.haml @@ -1,14 +1,14 @@ -- alert_class = 'gl-mb-5' +- alert_options = { class: 'gl-mb-5' } - if runner.group_type? - = render Pajamas::AlertComponent.new(alert_class: alert_class, + = render Pajamas::AlertComponent.new(alert_options: alert_options, title: s_('Runners|This runner is available to all projects and subgroups in a group.'), dismissible: false) do |c| = c.body do = s_('Runners|Use Group runners when you want all projects in a group to have access to a set of runners.') = link_to _('Learn more.'), help_page_path('ci/runners/runners_scope', anchor: 'group-runners'), target: '_blank', rel: 'noopener noreferrer' - else - = render Pajamas::AlertComponent.new(alert_class: alert_class, + = render Pajamas::AlertComponent.new(alert_options: alert_options, title: s_('Runners|This runner is associated with specific projects.'), dismissible: false) do |c| = c.body do diff --git a/app/views/shared/snippets/_embed.html.haml b/app/views/shared/snippets/_embed.html.haml index 5744fc9fba6..05fe307318f 100644 --- a/app/views/shared/snippets/_embed.html.haml +++ b/app/views/shared/snippets/_embed.html.haml @@ -14,8 +14,8 @@ .file-actions.d-none.d-sm-block .btn-group{ role: "group" }< + = embedded_copy_snippet_button(blob) = embedded_raw_snippet_button(@snippet, blob) - = embedded_snippet_download_button(@snippet, blob) %figure.file-holder.snippet-file-content{ "aria-label" => _('Code snippet') } = render 'projects/blob/viewer', viewer: blob.simple_viewer, load_async: false, external_embed: true diff --git a/app/views/shared/snippets/show.js.haml b/app/views/shared/snippets/show.js.haml index 23cebc97f63..f61f162be10 100644 --- a/app/views/shared/snippets/show.js.haml +++ b/app/views/shared/snippets/show.js.haml @@ -1,2 +1,3 @@ +function copyToClipboard(queryEl) { const copyText = document.querySelector(queryEl).textContent; navigator.clipboard.writeText(copyText); } document.write('#{escape_javascript(stylesheet_link_tag("#{stylesheet_url 'snippets'}"))}'); document.write('#{escape_javascript(render(partial: 'shared/snippets/embed', collection: @blobs, as: :blob))}'); diff --git a/app/views/shared/topics/_topic.html.haml b/app/views/shared/topics/_topic.html.haml index ca1098511da..83d5ecdb833 100644 --- a/app/views/shared/topics/_topic.html.haml +++ b/app/views/shared/topics/_topic.html.haml @@ -2,8 +2,9 @@ - detail_page_link = topic_explore_projects_path(topic_name: topic.name) .col-lg-3.col-md-4.col-sm-12 - .gl-card.gl-mb-5 - .gl-card-body.gl-display-flex.gl-align-items-center + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }, + body_options: { class: 'gl-display-flex gl-align-items-center' }) do |c| + = c.body do .avatar-container.rect-avatar.s40.gl-flex-shrink-0 = link_to detail_page_link do = topic_icon(topic, class: "avatar s40") diff --git a/app/views/shared/users/_user.html.haml b/app/views/shared/users/_user.html.haml index 7f7cd31591e..93b3ce5f319 100644 --- a/app/views/shared/users/_user.html.haml +++ b/app/views/shared/users/_user.html.haml @@ -1,8 +1,8 @@ - user = local_assigns.fetch(:user) .col-lg-3.col-md-4.col-sm-12 - .gl-card.gl-mb-5 - .gl-card-body + = render Pajamas::CardComponent.new(card_options: { class: 'gl-mb-5' }) do |c| + = c.body do = image_tag avatar_icon_for_user(user, 40), class: "avatar s40", alt: '' .user-info diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml index 34bedbd928a..0d5e59919cb 100644 --- a/app/views/shared/wikis/_form.html.haml +++ b/app/views/shared/wikis/_form.html.haml @@ -1,6 +1,6 @@ - page_info = { last_commit_sha: @page.last_commit_sha, persisted: @page.persisted?, title: @page.title, content: @page.content || '', format: @page.format.to_s, uploads_path: uploads_path, path: wiki_page_path(@wiki, @page), wiki_path: wiki_path(@wiki), help_path: help_page_path('user/project/wiki/index'), markdown_help_path: help_page_path('user/markdown'), markdown_preview_path: wiki_page_path(@wiki, @page, action: :preview_markdown), create_path: wiki_path(@wiki, action: :create) } .gl-mt-3 - = form_errors(@page, truncate: :title) + = form_errors(@page, truncate: :title, pajamas_alert: true) #js-wiki-form{ data: { page_info: page_info.to_json, format_options: wiki_markup_hash_by_name_id.to_json } } diff --git a/app/views/shared/wikis/_sidebar.html.haml b/app/views/shared/wikis/_sidebar.html.haml index 5f181371663..cb6a67bd8d4 100644 --- a/app/views/shared/wikis/_sidebar.html.haml +++ b/app/views/shared/wikis/_sidebar.html.haml @@ -16,7 +16,7 @@ - edit_sidebar_url = wiki_page_path(@wiki, Wiki::SIDEBAR, action: :edit) - link_class = (editing && @page&.slug == Wiki::SIDEBAR) ? 'active' : '' = link_to edit_sidebar_url, class: link_class, data: { qa_selector: 'edit_sidebar_link' } do - = sprite_icon('pencil-square', css_class: 'gl-mr-2') + = sprite_icon('pencil', css_class: 'gl-mr-2') %span= _("Edit sidebar") - if @sidebar_error.present? diff --git a/app/views/shared/wikis/diff.html.haml b/app/views/shared/wikis/diff.html.haml index 0eeceac28c8..c39739ac422 100644 --- a/app/views/shared/wikis/diff.html.haml +++ b/app/views/shared/wikis/diff.html.haml @@ -5,7 +5,7 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - %h3.page-title.gl-flex-grow-1 + %h1.page-title.gl-font-size-h-display.gl-flex-grow-1 = link_to_wiki_page @page %span.light · diff --git a/app/views/shared/wikis/edit.html.haml b/app/views/shared/wikis/edit.html.haml index e0860bc473d..6bbce6b80d8 100644 --- a/app/views/shared/wikis/edit.html.haml +++ b/app/views/shared/wikis/edit.html.haml @@ -7,7 +7,7 @@ .js-wiki-edit-page.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - %h3.page-title.gl-flex-grow-1 + %h1.page-title.gl-font-size-h-display.gl-flex-grow-1 - if @page.persisted? = link_to_wiki_page @page %span.light diff --git a/app/views/shared/wikis/history.html.haml b/app/views/shared/wikis/history.html.haml index afbed3b0f42..052bbb3b410 100644 --- a/app/views/shared/wikis/history.html.haml +++ b/app/views/shared/wikis/history.html.haml @@ -4,7 +4,7 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - %h3.page-title + %h1.page-title.gl-font-size-h-display = link_to_wiki_page @page %span.light · diff --git a/app/views/shared/wikis/pages.html.haml b/app/views/shared/wikis/pages.html.haml index abe7753b9f1..21d63a6db3d 100644 --- a/app/views/shared/wikis/pages.html.haml +++ b/app/views/shared/wikis/pages.html.haml @@ -5,7 +5,7 @@ - wiki_sort_options = [{ text: s_("Wiki|Title"), value: 'title', href: wiki_path(@wiki, action: :pages, sort: Wiki::TITLE_ORDER)}, { text: s_("Wiki|Created date"), value: 'created_at', href: wiki_path(@wiki, action: :pages, sort: Wiki::CREATED_AT_ORDER) }] .wiki-page-header.top-area.flex-column.flex-lg-row - %h3.page-title.gl-flex-grow-1 + %h1.page-title.gl-font-size-h-display.gl-flex-grow-1 = s_("Wiki|Wiki Pages") .nav-controls.pb-md-3.pb-lg-0 diff --git a/app/views/snippets/edit.html.haml b/app/views/snippets/edit.html.haml index f737e347c39..5fa4a6775f9 100644 --- a/app/views/snippets/edit.html.haml +++ b/app/views/snippets/edit.html.haml @@ -3,7 +3,7 @@ - content_for :prefetch_asset_tags do - webpack_preload_asset_tag('monaco') -%h3.page-title +%h1.page-title.gl-font-size-h-display = _("Edit Snippet") %hr = render 'shared/snippets/form', url: gitlab_snippet_path(@snippet) diff --git a/app/views/snippets/new.html.haml b/app/views/snippets/new.html.haml index 2669754cc3a..418f96a1024 100644 --- a/app/views/snippets/new.html.haml +++ b/app/views/snippets/new.html.haml @@ -4,7 +4,7 @@ - @content_class = "limit-container-width" unless fluid_layout .page-title-holder.d-flex.align-items-center - %h1.page-title= _('New Snippet') + %h1.page-title.gl-font-size-h-display= _('New Snippet') .gl-mt-3 = render "shared/snippets/form", url: snippets_path(@snippet) diff --git a/app/views/snippets/notes/_actions.html.haml b/app/views/snippets/notes/_actions.html.haml index 2e94bbe4baf..e3a14b0454e 100644 --- a/app/views/snippets/notes/_actions.html.haml +++ b/app/views/snippets/notes/_actions.html.haml @@ -1,15 +1,13 @@ - if current_user - if note.emoji_awardable? .note-actions-item - = link_to '#', title: _('Add reaction'), class: "note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip", data: { position: 'right' } do - %span{ class: 'link-highlight award-control-icon-neutral' }= sprite_icon('slight-smile') - %span{ class: 'link-highlight award-control-icon-positive' }= sprite_icon('smiley') - %span{ class: 'link-highlight award-control-icon-super-positive' }= sprite_icon('smile') + = render Pajamas::ButtonComponent.new(category: :tertiary, button_options: { title: _('Add reaction'), class: 'btn-icon note-action-button note-emoji-button js-add-award js-note-emoji has-tooltip' }) do + = sprite_icon('slight-smile', css_class: 'award-control-icon-neutral gl-button-icon gl-icon') + = sprite_icon('smiley', css_class: 'award-control-icon-positive gl-button-icon gl-icon gl-left-3!') + = sprite_icon('smile', css_class: 'award-control-icon-super-positive gl-button-icon gl-icon gl-left-3! ') - if note_editable - .note-actions-item - = button_tag title: _('Edit comment'), class: 'note-action-button js-note-edit has-tooltip gl-button btn btn-transparent', data: { container: 'body', qa_selector: 'edit_comment_button' } do - %span.link-highlight - = custom_icon('icon_pencil') + .note-actions-item.gl-ml-0 + = render Pajamas::ButtonComponent.new(category: :tertiary, icon: 'pencil', button_options: { title: _('Edit comment'), class: 'note-action-button js-note-edit has-tooltip', data: { container: 'body', qa_selector: 'edit_comment_button' } }) = render 'projects/notes/more_actions_dropdown', note: note, note_editable: note_editable diff --git a/app/views/users/unsubscribes/show.html.haml b/app/views/users/unsubscribes/show.html.haml index 8b3dc69f3a7..df8989ad979 100644 --- a/app/views/users/unsubscribes/show.html.haml +++ b/app/views/users/unsubscribes/show.html.haml @@ -1,5 +1,5 @@ - page_title _("Unsubscribe"), _("Admin Notifications") -%h3.page-title Unsubscribe from Admin notifications +%h1.page-title.gl-font-size-h-display Unsubscribe from Admin notifications %hr = form_tag unsubscribe_path(Base64.urlsafe_encode64(@email)) do |