diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 21:18:33 +0300 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/views | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/views')
334 files changed, 977 insertions, 1385 deletions
diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml index 09b16c54700..78fa16c13a5 100644 --- a/app/views/abuse_reports/new.html.haml +++ b/app/views/abuse_reports/new.html.haml @@ -25,4 +25,4 @@ = _("Explain the problem. If appropriate, provide a link to the relevant issue or comment.") .form-actions - = f.submit _("Send report"), class: "gl-button btn btn-success" + = f.submit _("Send report"), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml index e6f12f4785a..1aaea1999e5 100644 --- a/app/views/admin/appearances/_form.html.haml +++ b/app/views/admin/appearances/_form.html.haml @@ -101,7 +101,7 @@ = parsed_with_gfm .gl-mt-3.gl-mb-3 - = f.submit 'Update appearance settings', class: 'btn gl-button btn-success' + = f.submit 'Update appearance settings', class: 'btn gl-button btn-confirm' - if @appearance.persisted? || @appearance.updated_at .mt-4 - if @appearance.persisted? diff --git a/app/views/admin/appearances/preview_sign_in.html.haml b/app/views/admin/appearances/preview_sign_in.html.haml index 6e5bb45c3cc..f972b3b5cbf 100644 --- a/app/views/admin/appearances/preview_sign_in.html.haml +++ b/app/views/admin/appearances/preview_sign_in.html.haml @@ -8,5 +8,5 @@ = label_tag :password = password_field_tag :password, nil, class: "form-control gl-form-input bottom", title: 'This field is required.' .form-group - = button_tag "Sign in", class: "btn gl-button btn-success" + = button_tag "Sign in", class: "btn gl-button btn-confirm" diff --git a/app/views/admin/application_settings/_abuse.html.haml b/app/views/admin/application_settings/_abuse.html.haml index ea9bdbed9ae..f050c0816b1 100644 --- a/app/views/admin/application_settings/_abuse.html.haml +++ b/app/views/admin/application_settings/_abuse.html.haml @@ -8,4 +8,4 @@ .form-text.text-muted Abuse reports will be sent to this address if it is set. Abuse reports are always available in the admin area. - = 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/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml index 009e0732911..2e5cf156a65 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -65,4 +65,4 @@ = render_if_exists 'admin/application_settings/updating_name_disabled_for_users', form: f = render_if_exists 'admin/application_settings/availability_on_namespace_setting', form: f - = f.submit _('Save changes'), class: 'gl-button btn btn-success qa-save-changes-button' + = f.submit _('Save changes'), class: 'gl-button btn btn-confirm qa-save-changes-button' diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index f11770b397e..0af244d54f3 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -68,4 +68,4 @@ = _("The default CI configuration path for new projects.").html_safe = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'custom-cicd-configuration-path'), target: '_blank' - = 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/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml index 494558a6c2d..c5ae5c579ad 100644 --- a/app/views/admin/application_settings/_diff_limits.html.haml +++ b/app/views/admin/application_settings/_diff_limits.html.haml @@ -12,4 +12,4 @@ = link_to sprite_icon('question-o'), help_page_path('user/admin_area/diff_limits', anchor: 'maximum-diff-patch-size') - = 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/application_settings/_eks.html.haml b/app/views/admin/application_settings/_eks.html.haml index 8897d0eb14b..1ddf927ed13 100644 --- a/app/views/admin/application_settings/_eks.html.haml +++ b/app/views/admin/application_settings/_eks.html.haml @@ -3,8 +3,8 @@ .settings-header %h4 = _('Amazon EKS') - %button.btn.gl-button.js-settings-toggle{ type: 'button' } - = expanded ? 'Collapse' : 'Expand' + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') %p = _('Amazon EKS integration allows you to provision EKS clusters from GitLab.') @@ -33,4 +33,4 @@ .form-text.text-muted = _('AWS Secret Access Key. Only required if not using role instance credentials') - = 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/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index 89946c63bb0..b22aaabe41a 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -25,4 +25,12 @@ = render_if_exists 'admin/application_settings/email_additional_text_setting', form: f - = f.submit _('Save changes'), class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + .form-group + .form-check + = f.check_box :in_product_marketing_emails_enabled, class: 'form-check-input' + = f.label :in_product_marketing_emails_enabled, class: 'form-check-label' do + = _('Enable in-product marketing emails') + .form-text.text-muted + = _('By default, GitLab sends emails to help guide users through the onboarding process.') + + = f.submit _('Save changes'), class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } 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 07256c9f4fe..97e09476e78 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 @@ -47,4 +47,4 @@ .form-group = f.label :external_authorization_service_default_label, _('Default classification label'), class: 'label-bold' = f.text_field :external_authorization_service_default_label, class: 'form-control gl-form-input' - = 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/application_settings/_gitaly.html.haml b/app/views/admin/application_settings/_gitaly.html.haml index 56ec35d9329..72e7cb0b437 100644 --- a/app/views/admin/application_settings/_gitaly.html.haml +++ b/app/views/admin/application_settings/_gitaly.html.haml @@ -24,4 +24,4 @@ .form-text.text-muted Medium operation timeout (in seconds). This should be a value between the Fast and the Default timeout. - = 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/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index cca81136bb9..48b0c6be0a8 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -7,7 +7,7 @@ %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - %integration-help-text{ "id" => "js-gitpod-settings-help-text", "message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } + #js-gitpod-settings-help-text{ data: {"message" => gitpod_enable_description, "message-url" => "https://gitpod.io/" } } = link_to sprite_icon('question-o'), help_page_path('integration/gitpod.md'), target: '_blank', class: 'has-tooltip', title: _('More information') @@ -25,4 +25,4 @@ = f.text_field :gitpod_url, class: 'form-control gl-form-input', placeholder: s_('Gitpod|e.g. https://gitpod.example.com') .form-text.text-muted = s_('Gitpod|Add the URL to your Gitpod instance configured to read your GitLab projects.') - = f.submit s_('Save changes'), class: 'gl-button btn btn-success' + = f.submit s_('Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_grafana.html.haml b/app/views/admin/application_settings/_grafana.html.haml index 368b4db4549..fd9e7ee50c4 100644 --- a/app/views/admin/application_settings/_grafana.html.haml +++ b/app/views/admin/application_settings/_grafana.html.haml @@ -14,4 +14,4 @@ = f.label :grafana_url, _('Grafana URL'), class: 'label-bold' = f.text_field :grafana_url, class: 'form-control gl-form-input', placeholder: '/-/grafana' - = 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/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml index 858df44bd98..e7816f5a1c0 100644 --- a/app/views/admin/application_settings/_help_page.html.haml +++ b/app/views/admin/application_settings/_help_page.html.haml @@ -23,4 +23,4 @@ = f.label :help_page_documentation_base_url, _('Documentation pages URL'), class: 'label-bold' = f.text_field :help_page_documentation_base_url, class: 'form-control gl-form-input', placeholder: 'https://docs.gitlab.com' - = 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/application_settings/_import_export_limits.html.haml b/app/views/admin/application_settings/_import_export_limits.html.haml index e1a58c888a5..820c11279d5 100644 --- a/app/views/admin/application_settings/_import_export_limits.html.haml +++ b/app/views/admin/application_settings/_import_export_limits.html.haml @@ -31,4 +31,4 @@ = f.label :group_download_export_limit, _('Max Group Export Download requests per minute per user'), class: 'label-bold' = f.number_field :group_download_export_limit, class: 'form-control gl-form-input' - = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_initial_branch_name.html.haml b/app/views/admin/application_settings/_initial_branch_name.html.haml index e7718f94b90..b5c178641df 100644 --- a/app/views/admin/application_settings/_initial_branch_name.html.haml +++ b/app/views/admin/application_settings/_initial_branch_name.html.haml @@ -10,4 +10,4 @@ %span.form-text.text-muted = (_("Changes affect new repositories only. If not specified, Git's default name %{branch_name_default} will be used.") % { branch_name_default: fallback_branch_name } ).html_safe - = f.submit _('Save changes'), class: 'gl-button btn-success' + = f.submit _('Save changes'), class: 'gl-button btn-confirm' diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml index a603eaec913..18d71a90e34 100644 --- a/app/views/admin/application_settings/_ip_limits.html.haml +++ b/app/views/admin/application_settings/_ip_limits.html.haml @@ -57,4 +57,4 @@ = _('A plain-text response to show to clients that hit the rate limit.') = f.text_area :rate_limiting_response_text, placeholder: ::Gitlab::Throttle::DEFAULT_RATE_LIMITING_RESPONSE_TEXT, class: 'form-control gl-form-input', rows: 5 - = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_issue_limits.html.haml b/app/views/admin/application_settings/_issue_limits.html.haml index e16561b4489..0e1ba8c9c88 100644 --- a/app/views/admin/application_settings/_issue_limits.html.haml +++ b/app/views/admin/application_settings/_issue_limits.html.haml @@ -6,4 +6,4 @@ = f.label :issues_create_limit, 'Max requests per minute per user', class: 'label-bold' = f.number_field :issues_create_limit, class: 'form-control gl-form-input' - = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_kroki.html.haml b/app/views/admin/application_settings/_kroki.html.haml index cd57d4cca65..fc51942ed1f 100644 --- a/app/views/admin/application_settings/_kroki.html.haml +++ b/app/views/admin/application_settings/_kroki.html.haml @@ -30,4 +30,4 @@ = f.check_box format[:name], class: 'form-check-input' = f.label format[:name], format[:label], class: 'form-check-label' - = f.submit _('Save changes'), class: "btn gl-button btn-success" + = f.submit _('Save changes'), class: "btn gl-button btn-confirm" diff --git a/app/views/admin/application_settings/_localization.html.haml b/app/views/admin/application_settings/_localization.html.haml index 5ad7080b22b..fdb91937ec3 100644 --- a/app/views/admin/application_settings/_localization.html.haml +++ b/app/views/admin/application_settings/_localization.html.haml @@ -15,4 +15,4 @@ = f.label :time_tracking_limit_to_hours, class: 'form-check-label' do = _('Limit display of time tracking units to hours.') - = 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/application_settings/_note_limits.html.haml b/app/views/admin/application_settings/_note_limits.html.haml index 9578da90170..d50b3395d8f 100644 --- a/app/views/admin/application_settings/_note_limits.html.haml +++ b/app/views/admin/application_settings/_note_limits.html.haml @@ -9,4 +9,4 @@ = f.label :notes_create_limit_allowlist, _('List of users to be excluded from the limit'), class: 'label-bold' = f.text_area :notes_create_limit_allowlist_raw, placeholder: 'username1, username2', class: 'form-control gl-form-input', rows: 5 - = f.submit _('Save changes'), class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit _('Save changes'), class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml index 694cc9deab6..d8d105293a1 100644 --- a/app/views/admin/application_settings/_outbound.html.haml +++ b/app/views/admin/application_settings/_outbound.html.haml @@ -27,4 +27,4 @@ %span.form-text.text-muted = _('Resolves IP addresses once and uses them to submit requests') - = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_package_registry.html.haml b/app/views/admin/application_settings/_package_registry.html.haml index 86df1aa6e02..0ca8493c596 100644 --- a/app/views/admin/application_settings/_package_registry.html.haml +++ b/app/views/admin/application_settings/_package_registry.html.haml @@ -36,7 +36,7 @@ = f.label :maven_max_file_size, _('Maximum Maven package file size in bytes'), class: 'label-bold' = f.number_field :maven_max_file_size, class: 'form-control gl-form-input' .form-group - = f.label :npm_max_file_size, _('Maximum NPM package file size in bytes'), class: 'label-bold' + = f.label :npm_max_file_size, _('Maximum npm package file size in bytes'), class: 'label-bold' = f.number_field :npm_max_file_size, class: 'form-control gl-form-input' .form-group = f.label :nuget_max_file_size, _('Maximum NuGet package file size in bytes'), class: 'label-bold' @@ -47,4 +47,4 @@ .form-group = f.label :generic_packages_max_file_size, _('Generic package file size in bytes'), class: 'label-bold' = f.number_field :generic_packages_max_file_size, class: 'form-control gl-form-input' - = f.submit _('Save %{name} size limits').html_safe % { name: plan.name.capitalize }, class: 'btn gl-button btn-success' + = f.submit _('Save %{name} size limits').html_safe % { name: plan.name.capitalize }, class: 'btn gl-button btn-confirm' diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 503aae861d0..8f52e8b8461 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -41,4 +41,4 @@ - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path } = _("I have read and agree to the Let's Encrypt %{link_start}Terms of Service%{link_end} (PDF)").html_safe % { link_start: terms_of_service_link_start, link_end: '</a>'.html_safe } - = 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/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index 3efe163de7b..5ee68e8fd16 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -31,4 +31,4 @@ .form-text.text-muted = _('Number of changes (branches or tags) in a single push to determine whether individual push events or bulk push event will be created. Bulk push event will be created if it surpasses that value.') - = 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/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml index 2db22552596..8f2bdd109cb 100644 --- a/app/views/admin/application_settings/_performance_bar.html.haml +++ b/app/views/admin/application_settings/_performance_bar.html.haml @@ -4,11 +4,11 @@ %fieldset .form-group .form-check - = f.check_box :performance_bar_enabled, class: 'form-check-input' - = f.label :performance_bar_enabled, class: 'form-check-label qa-enable-performance-bar-checkbox' do + = f.check_box :performance_bar_enabled, class: 'form-check-input', data: { qa_selector: 'enable_performance_bar_checkbox'} + = f.label :performance_bar_enabled, class: 'form-check-label' do Enable access to the Performance Bar .form-group = f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'label-bold' = f.text_field :performance_bar_allowed_group_path, class: 'form-control gl-form-input', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path - = f.submit 'Save changes', class: 'gl-button btn btn-success qa-save-changes-button' + = f.submit 'Save changes', class: 'gl-button btn btn-confirm qa-save-changes-button' diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml index 93fcc90f044..e6e9bbf3ee0 100644 --- a/app/views/admin/application_settings/_plantuml.html.haml +++ b/app/views/admin/application_settings/_plantuml.html.haml @@ -24,4 +24,4 @@ = link_to "PlantUML", "http://plantuml.com" diagrams in Asciidoc documents using an external PlantUML service. - = 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/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml index c394bc65046..468c1786d6f 100644 --- a/app/views/admin/application_settings/_prometheus.html.haml +++ b/app/views/admin/application_settings/_prometheus.html.haml @@ -30,4 +30,4 @@ A method call is only tracked when it takes longer to complete than the given amount of milliseconds. - = 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/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 57bba4f970a..faa675f211d 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -28,4 +28,4 @@ = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URL%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 - = 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/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml index 2b54a15d615..bee120d2f78 100644 --- a/app/views/admin/application_settings/_realtime.html.haml +++ b/app/views/admin/application_settings/_realtime.html.haml @@ -14,4 +14,4 @@ installations. Set to 0 to completely disable polling. = link_to sprite_icon('question-o'), help_page_path('administration/polling') - = 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/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index 5fb5effaa55..fc03a6dd10c 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -31,4 +31,4 @@ .form-text.text-muted = _("The maximum number of tags that a single worker accepts for cleanup. If the number of tags goes above this limit, the list of tags to delete is truncated to this number. To remove this limit, set it to 0.") - = 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/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml index 24e74dd0f1b..ee0281b6e33 100644 --- a/app/views/admin/application_settings/_repository_check.html.haml +++ b/app/views/admin/application_settings/_repository_check.html.haml @@ -55,4 +55,4 @@ .form-text.text-muted Number of Git pushes after which 'git gc' is run. - = 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/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml index 125fa48bbc3..a0076a2f75d 100644 --- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml +++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml @@ -14,4 +14,4 @@ = render_if_exists 'admin/application_settings/mirror_settings', form: f - = 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/application_settings/_repository_static_objects.html.haml b/app/views/admin/application_settings/_repository_static_objects.html.haml index 42fe2b24bb2..f8ec04003fa 100644 --- a/app/views/admin/application_settings/_repository_static_objects.html.haml +++ b/app/views/admin/application_settings/_repository_static_objects.html.haml @@ -15,4 +15,4 @@ %span.form-text.text-muted#static_objects_external_storage_auth_token_help_block = _('A secure token that identifies an external storage request.') - = 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/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index 0862d1bf0b6..ab1b2bab573 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -18,8 +18,9 @@ = _('Enter weights for storages for new repositories.') = link_to sprite_icon('question-o'), help_page_path('administration/repository_storage_paths') .form-check - - storage_weights.each do |attribute| - = f.text_field attribute[:name], class: 'form-text-input', value: attribute[:value] - = f.label attribute[:label], attribute[:label], class: 'label-bold form-check-label' - %br - = f.submit _('Save changes'), class: "gl-button btn btn-success qa-save-changes-button" + = f.fields_for :repository_storages_weighted, storage_weights do |storage_form| + - Gitlab.config.repositories.storages.keys.each do |storage| + = storage_form.text_field storage, class: 'form-text-input' + = storage_form.label storage, storage, class: 'label-bold form-check-label' + %br + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 23a7856e483..54bd5cf4072 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -20,12 +20,11 @@ or LDAP password must be used to authenticate. - if omniauth_enabled? && button_based_providers.any? - .form-group - = f.label :enabled_oauth_sign_in_sources, 'Enabled OAuth sign-in sources', class: 'label-bold' + %fieldset.form-group + %legend.gl-font-base.gl-mb-3.gl-border-none.gl-font-weight-bold= _('Enabled OAuth sign-in sources') = hidden_field_tag 'application_setting[enabled_oauth_sign_in_sources][]' - .btn-group{ data: { toggle: 'buttons' } } - - oauth_providers_checkboxes.each do |source| - = source + - oauth_providers_checkboxes.each do |source| + = source .form-group = f.label :two_factor_authentication, 'Two-factor authentication', class: 'label-bold' .form-check @@ -57,4 +56,4 @@ = f.label :sign_in_text, _('Sign-in text'), class: 'label-bold' = f.text_area :sign_in_text, class: 'form-control gl-form-input', rows: 4 .form-text.text-muted Markdown enabled - = 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/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml index 82824f1d436..272eba67b1b 100644 --- a/app/views/admin/application_settings/_signup.html.haml +++ b/app/views/admin/application_settings/_signup.html.haml @@ -77,4 +77,4 @@ = f.label :after_sign_up_text, class: 'label-bold' = f.text_area :after_sign_up_text, class: 'form-control gl-form-input', rows: 4 .form-text.text-muted Markdown enabled - = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 5f5a3a6992c..e6ac2a4db34 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -26,4 +26,4 @@ = f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light' = f.text_field :snowplow_cookie_domain, class: 'form-control gl-form-input' - = 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/application_settings/_sourcegraph.html.haml b/app/views/admin/application_settings/_sourcegraph.html.haml index e1af269c6fd..af25577f058 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.btn-default.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: 'https://sourcegraph.com/' } @@ -35,4 +35,4 @@ = f.text_field :sourcegraph_url, class: 'form-control gl-form-input', placeholder: s_('SourcegraphAdmin|e.g. https://sourcegraph.example.com') .form-text.text-muted = s_('SourcegraphAdmin|Configure the URL to a Sourcegraph instance which can read your GitLab projects.') - = f.submit s_('SourcegraphAdmin|Save changes'), class: 'gl-button btn btn-success' + = f.submit s_('SourcegraphAdmin|Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml index 6085cea4f5d..2086fbc9d32 100644 --- a/app/views/admin/application_settings/_spam.html.haml +++ b/app/views/admin/application_settings/_spam.html.haml @@ -79,4 +79,4 @@ = f.label :spam_check_endpoint_url, _('URL of the external Spam Check endpoint'), class: 'label-bold' = f.text_field :spam_check_endpoint_url, class: 'form-control gl-form-input' - = 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/application_settings/_terminal.html.haml b/app/views/admin/application_settings/_terminal.html.haml index 8f89cf27291..487ce25a4da 100644 --- a/app/views/admin/application_settings/_terminal.html.haml +++ b/app/views/admin/application_settings/_terminal.html.haml @@ -8,4 +8,4 @@ .form-text.text-muted Maximum time for web terminal websocket connection (in seconds). 0 for unlimited. - = 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/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml index 717b2220336..8cc4169b383 100644 --- a/app/views/admin/application_settings/_terms.html.haml +++ b/app/views/admin/application_settings/_terms.html.haml @@ -15,4 +15,4 @@ = f.text_area :terms, class: 'form-control gl-form-input', rows: 8 .form-text.text-muted = _("Markdown enabled") - = 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/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml index 32023b11993..970c9c6b003 100644 --- a/app/views/admin/application_settings/_third_party_offers.html.haml +++ b/app/views/admin/application_settings/_third_party_offers.html.haml @@ -17,4 +17,4 @@ = f.check_box :hide_third_party_offers, class: 'form-check-input' = f.label :hide_third_party_offers, _('Do not display offers from third parties within GitLab'), class: 'form-check-label' - = 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/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index fe83d4b807c..00306e1ba06 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -33,8 +33,8 @@ %pre.usage-data.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else = _('The usage ping is disabled, and cannot be configured through this form.') - - deactivating_usage_ping_path = help_page_path('development/usage_ping', anchor: 'disable-usage-ping') + - deactivating_usage_ping_path = help_page_path('development/usage_ping/index.md', anchor: 'disable-usage-ping') - deactivating_usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: deactivating_usage_ping_path } = s_('For more information, see the documentation on %{deactivating_usage_ping_link_start}deactivating the usage ping%{deactivating_usage_ping_link_end}.').html_safe % { deactivating_usage_ping_link_start: deactivating_usage_ping_link_start, deactivating_usage_ping_link_end: '</a>'.html_safe } - = 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/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index 0931ba50aa7..e51a41d5254 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -74,4 +74,4 @@ = f.label :disable_feed_token, class: 'form-check-label' do = s_('AdminSettings|Disable feed token') - = 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/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 794e02787f5..3a14b4fbc7b 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.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = 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.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = 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.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Diff content limits') @@ -39,7 +39,7 @@ .settings-header %h4 = _('Sign-up restrictions') - %button.btn.gl-button.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = 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.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set requirements for a user to sign-in. Enable mandatory two-factor authentication.') @@ -101,7 +101,7 @@ = s_('IDE|Live Preview') %span.form-text.text-muted = s_('IDE|Allow live previews of JavaScript projects in the Web IDE using CodeSandbox Live Preview.') - = f.submit _('Save changes'), class: "gl-button btn btn-success" + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" = render_if_exists 'admin/application_settings/maintenance_mode_settings_form' = render 'admin/application_settings/gitpod' diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index 14044d6eecb..e7e17502da2 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -40,5 +40,5 @@ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes .form-actions - = f.submit 'Submit', class: "gl-button btn btn-success wide" - = link_to "Cancel", admin_applications_path, class: "gl-button btn btn-cancel" + = f.submit 'Submit', class: "gl-button btn btn-confirm wide" + = link_to "Cancel", admin_applications_path, class: "gl-button btn btn-default btn-cancel" diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index 7ac55157f65..28a7bd1820a 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -4,7 +4,7 @@ %p.light = _('System OAuth applications don\'t belong to any user and can only be managed by admins') %hr -%p= link_to _('New application'), new_admin_application_path, class: 'gl-button btn btn-success' +%p= link_to _('New application'), new_admin_application_path, class: 'gl-button btn btn-confirm' .table-responsive %table.table %thead diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index 89fccff954d..21908c08690 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -77,6 +77,6 @@ = f.datetime_select :ends_at, {}, class: 'form-control form-control-inline' .form-actions - if @broadcast_message.persisted? - = f.submit "Update broadcast message", class: "btn gl-button btn-success" + = f.submit "Update broadcast message", class: "btn gl-button btn-confirm" - else - = f.submit "Add broadcast message", class: "btn gl-button btn-success" + = f.submit "Add broadcast message", class: "btn gl-button btn-confirm" diff --git a/app/views/admin/dashboard/_billable_users_text.html.haml b/app/views/admin/dashboard/_billable_users_text.html.haml deleted file mode 100644 index e9485d23228..00000000000 --- a/app/views/admin/dashboard/_billable_users_text.html.haml +++ /dev/null @@ -1 +0,0 @@ -= s_('AdminArea|Active users') diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index f6ebc4c465d..f16158d5656 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -60,7 +60,7 @@ .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|Projects') + .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 .d-flex.align-items-center diff --git a/app/views/admin/dashboard/stats.html.haml b/app/views/admin/dashboard/stats.html.haml index 9a89bf12365..b98d11b734b 100644 --- a/app/views/admin/dashboard/stats.html.haml +++ b/app/views/admin/dashboard/stats.html.haml @@ -50,10 +50,11 @@ = s_('AdminArea|Bots') %td.p-3.text-right = @users_statistics&.bots.to_i + = render_if_exists 'admin/dashboard/billable_users_row' %tr.bg-gray-light.gl-text-gray-900 %td.p-3 %strong - = render_if_exists 'admin/dashboard/billable_users_text' + = s_('AdminArea|Active users') %td.p-3.text-right %strong = @users_statistics&.active.to_i diff --git a/app/views/admin/deploy_keys/edit.html.haml b/app/views/admin/deploy_keys/edit.html.haml index 2a0177ab997..f85b37b3640 100644 --- a/app/views/admin/deploy_keys/edit.html.haml +++ b/app/views/admin/deploy_keys/edit.html.haml @@ -6,5 +6,5 @@ = form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f| = render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key } .form-actions - = f.submit _('Save changes'), class: 'btn gl-button btn-success' - = link_to _('Cancel'), admin_deploy_keys_path, class: 'btn gl-button btn-cancel' + = f.submit _('Save changes'), class: 'btn gl-button btn-confirm' + = link_to _('Cancel'), admin_deploy_keys_path, class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml index 9b6aa278906..eec8f816f04 100644 --- a/app/views/admin/deploy_keys/index.html.haml +++ b/app/views/admin/deploy_keys/index.html.haml @@ -2,7 +2,7 @@ - if @deploy_keys.any? %h3.page-title.deploy-keys-title = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size } - = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn gl-button btn-success btn-md gl-button' + = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn gl-button btn-confirm btn-md gl-button' .table-holder.deploy-keys-list %table.table %thead diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml index 5a3b880a596..dc49db6557b 100644 --- a/app/views/admin/deploy_keys/new.html.haml +++ b/app/views/admin/deploy_keys/new.html.haml @@ -6,5 +6,5 @@ = form_for [:admin, @deploy_key], html: { class: 'deploy-key-form' } do |f| = render partial: 'shared/deploy_keys/form', locals: { form: f, deploy_key: @deploy_key } .form-actions - = f.submit 'Create', class: 'btn gl-button btn-success' - = link_to 'Cancel', admin_deploy_keys_path, class: 'btn gl-button btn-cancel' + = f.submit 'Create', class: 'btn gl-button btn-confirm' + = link_to 'Cancel', admin_deploy_keys_path, class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/admin/dev_ops_report/_report.html.haml b/app/views/admin/dev_ops_report/_report.html.haml index 5faadd15ef8..95ef1298d03 100644 --- a/app/views/admin/dev_ops_report/_report.html.haml +++ b/app/views/admin/dev_ops_report/_report.html.haml @@ -4,11 +4,13 @@ = render 'callout' - if !usage_ping_enabled - #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/usage_ping') } } + #js-devops-empty-state{ data: { is_admin: current_user&.admin.to_s, empty_state_svg_path: image_path('illustrations/convdev/convdev_no_index.svg'), enable_usage_ping_link: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings'), docs_link: help_page_path('development/usage_ping/index.md') } } - elsif @metric.blank? = render 'no_data' - else .devops + .gl-my-3.gl-text-gray-400{ data: { testid: 'devops-score-note-text' } } + = s_('DevopsReport|DevOps score metrics are based on usage over the last 30 days. Last updated: %{timestamp}.').html_safe % { timestamp: @metric.created_at.strftime('%Y-%m-%d %H:%M') } .devops-header %h2.devops-header-title{ class: "devops-#{score_level(@metric.average_percentage_score)}-score" } = number_to_percentage(@metric.average_percentage_score, precision: 1) diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index c2599238bce..15306ab7878 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -30,10 +30,10 @@ .gl-alert-body = render 'shared/group_tips' .form-actions - = f.submit _('Create group'), class: "gl-button btn btn-success" + = f.submit _('Create group'), class: "gl-button btn btn-confirm" = link_to _('Cancel'), admin_groups_path, class: "gl-button btn btn-default btn-cancel" - else .form-actions - = f.submit _('Save changes'), class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } + = f.submit _('Save changes'), class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } = link_to _('Cancel'), admin_group_path(@group), class: "gl-button btn btn-cancel" diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index dc122d74e90..df7af86e089 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -33,5 +33,5 @@ = visibility_level_icon(group.visibility_level) .controls.gl-flex-shrink-0.gl-ml-5 - = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'gl-button btn' + = link_to _('Edit'), admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn gl-button btn-default' = link_to _('Delete'), [:admin, group], data: { confirm: _("Are you sure you want to remove %{group_name}?") % { group_name: group.name } }, method: :delete, class: 'gl-button btn btn-danger' diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index bc4d4e489ce..17dccae44b5 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -10,7 +10,7 @@ = search_field_tag :name, project_name, class: "form-control search-text-input js-search-input", autofocus: true, spellcheck: false, placeholder: 'Search by name', data: { qa_selector: 'group_search_field' } = sprite_icon('search', css_class: 'search-icon') = render "shared/groups/dropdown", options_hash: admin_groups_sort_options_hash - = link_to new_admin_group_path, class: "gl-button btn btn-success" do + = link_to new_admin_group_path, class: "gl-button btn btn-confirm" do = _('New group') %ul.content-list = render @groups diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index b949d08718a..f8c490dd948 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -1,3 +1,4 @@ +- add_page_specific_style 'page_bundles/members' - add_to_breadcrumbs _("Groups"), admin_groups_path - breadcrumb_title @group.name - page_title @group.name, _("Groups") @@ -117,7 +118,7 @@ .gl-mt-3 = select_tag :access_level, options_for_select(@group.access_level_roles), class: "project-access-select select2" %hr - = button_tag _('Add users to group'), class: "gl-button btn btn-success" + = button_tag _('Add users to group'), class: "gl-button btn btn-confirm" = render 'shared/members/requests', membership_source: @group, group: @group, requesters: @requesters, force_mobile_view: true .card diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml index 74f73b4972a..93038e63a2e 100644 --- a/app/views/admin/hooks/edit.html.haml +++ b/app/views/admin/hooks/edit.html.haml @@ -9,7 +9,7 @@ = form_for @hook, as: :hook, url: admin_hook_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } .form-actions - %span>= f.submit _('Save changes'), class: 'btn gl-button btn-success gl-mr-3' + %span>= f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mr-3' = render 'shared/web_hooks/test_button', hook: @hook = link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn gl-button btn-danger float-right', data: { confirm: _('Are you sure?') } diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index c0bad6a0a63..3e2cd126e1a 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -7,7 +7,7 @@ .col-lg-8.gl-mb-3 = form_for @hook, as: :hook, url: admin_hooks_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } - = f.submit _('Add system hook'), class: 'btn gl-button btn-success' + = f.submit _('Add system hook'), class: 'btn gl-button btn-confirm' = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class diff --git a/app/views/admin/labels/_form.html.haml b/app/views/admin/labels/_form.html.haml index 12c7acd7668..abf380474e4 100644 --- a/app/views/admin/labels/_form.html.haml +++ b/app/views/admin/labels/_form.html.haml @@ -27,5 +27,5 @@ = render_suggested_colors .form-actions - = f.submit _('Save'), class: 'btn gl-button btn-success js-save-button' - = link_to _("Cancel"), admin_labels_path, class: 'btn gl-button btn-cancel' + = f.submit _('Save'), class: 'btn gl-button btn-confirm js-save-button' + = link_to _("Cancel"), admin_labels_path, class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/admin/labels/destroy.js.haml b/app/views/admin/labels/destroy.js.haml index b9b63829f25..5ee53088230 100644 --- a/app/views/admin/labels/destroy.js.haml +++ b/app/views/admin/labels/destroy.js.haml @@ -1,2 +1,3 @@ - if @labels.size == 0 - $('.labels').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000) + var emptyState = document.querySelector('.labels .nothing-here-block.hidden'); + if (emptyState) emptyState.classList.remove('hidden'); diff --git a/app/views/admin/labels/index.html.haml b/app/views/admin/labels/index.html.haml index f204e620e9d..6861a802a63 100644 --- a/app/views/admin/labels/index.html.haml +++ b/app/views/admin/labels/index.html.haml @@ -1,7 +1,7 @@ - page_title _("Labels") %div - = link_to new_admin_label_path, class: "float-right btn gl-button btn-success" do + = link_to new_admin_label_path, class: "float-right btn gl-button btn-confirm" do = _('New label') %h3.page-title = _('Labels') @@ -13,5 +13,6 @@ = render @labels = paginate @labels, theme: 'gitlab' - - else - .nothing-here-block= _('There are no labels yet') + + .nothing-here-block{ class: ('hidden' if @labels.present?) } + = _('There are no labels yet') diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 4131c8b7edd..c2e40413a14 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -4,7 +4,7 @@ - @projects.each_with_index do |project| %li.project-row{ class: ('no-description' if project.description.blank?) } .controls - = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "gl-button btn" + = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn gl-button btn-default" %button.delete-project-button.gl-button.btn.btn-danger{ data: { delete_project_url: admin_project_path(project), project_name: project.name } } = s_('AdminProjects|Delete') diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index d9ff4404519..50f3c94bcb3 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -30,7 +30,7 @@ = dropdown_content = dropdown_loading = render 'shared/projects/dropdown' - = link_to new_project_path, class: 'gl-button btn btn-success' do + = 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" diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 2085515e349..40443fb3406 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -1,3 +1,4 @@ +- add_page_specific_style 'page_bundles/members' - add_to_breadcrumbs _("Projects"), admin_projects_path - breadcrumb_title @project.full_name - page_title @project.full_name, _("Projects") diff --git a/app/views/admin/serverless/domains/_form.html.haml b/app/views/admin/serverless/domains/_form.html.haml index e4b054c7480..85f2260163a 100644 --- a/app/views/admin/serverless/domains/_form.html.haml +++ b/app/views/admin/serverless/domains/_form.html.haml @@ -65,7 +65,7 @@ %span.form-text.text-muted = _("Upload a private key for your certificate") - = f.submit @domain.persisted? ? _('Save changes') : _('Add domain'), class: "gl-button btn btn-success js-serverless-domain-submit", disabled: @domain.persisted? + = f.submit @domain.persisted? ? _('Save changes') : _('Add domain'), class: "gl-button btn btn-confirm js-serverless-domain-submit", disabled: @domain.persisted? - if @domain.persisted? %button.gl-button.btn.btn-danger{ type: 'button', data: { toggle: 'modal', target: "#modal-delete-domain" } } = _('Delete domain') diff --git a/app/views/admin/instance_statistics/index.html.haml b/app/views/admin/usage_trends/index.html.haml index d5902f702e5..a0be48f71ce 100644 --- a/app/views/admin/instance_statistics/index.html.haml +++ b/app/views/admin/usage_trends/index.html.haml @@ -1,4 +1,4 @@ - breadcrumb_title _("Usage Trends") - page_title _("Usage Trends") -#js-instance-statistics-app +#js-usage-trends-app diff --git a/app/views/admin/users/_cohorts_table.html.haml b/app/views/admin/users/_cohorts_table.html.haml index bb6266b38f6..a92cfb5851a 100644 --- a/app/views/admin/users/_cohorts_table.html.haml +++ b/app/views/admin/users/_cohorts_table.html.haml @@ -2,7 +2,7 @@ .bs-callout.clearfix %p = s_("Cohorts|User cohorts are shown for the last %{months_included} months. Only users with activity are counted in the 'New users' column; inactive users are counted separately.") % { months_included: @cohorts[:months_included] } - = link_to sprite_icon('question-o'), help_page_path('user/admin_area/analytics/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' + = link_to sprite_icon('question-o'), help_page_path('user/admin_area/user_cohorts', anchor: 'cohorts'), title: 'About this feature', target: '_blank' .table-holder.d-xl-table %table.table diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 40393f0db99..b3ed8369263 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -87,8 +87,8 @@ .form-actions - if @user.new_record? - = f.submit 'Create user', class: "btn gl-button btn-success" - = link_to 'Cancel', admin_users_path, class: "gl-button btn btn-cancel" + = f.submit 'Create user', class: "btn gl-button btn-confirm" + = link_to 'Cancel', admin_users_path, class: "gl-button btn btn-default btn-cancel" - else - = f.submit 'Save changes', class: "btn gl-button btn-success" - = link_to 'Cancel', admin_user_path(@user), class: "btn gl-button btn-cancel" + = f.submit 'Save changes', class: "btn gl-button btn-confirm" + = link_to 'Cancel', admin_user_path(@user), class: "gl-button btn btn-default btn-cancel" diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 57edb9abe90..c79b2e978f2 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -43,7 +43,7 @@ .nav-controls = render_if_exists 'admin/users/admin_email_users' = render_if_exists 'admin/users/admin_export_user_permissions' - = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-success btn-search float-right' + = link_to s_('AdminUsers|New user'), new_admin_user_path, class: 'btn gl-button btn-confirm btn-search float-right' .filtered-search-block.row-content-block.border-top-0 = form_tag admin_users_path, method: :get do diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 8da0c7f4300..f9b631ed6cf 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -5,7 +5,7 @@ %a.nav-link{ href: '#users', class: active_when(params[:tab] != 'cohorts'), data: { toggle: 'tab' }, role: 'tab' } = s_('AdminUsers|Users') %li.nav-item.js-users-tab-item{ role: 'presentation' } - %a.nav-link{ href: '#cohorts', class: active_when(params[:tab] == 'cohorts'), data: { toggle: 'tab', track: { event: 'i_analytics_cohorts', action: 'click_tab' } }, role: 'tab' } + %a.nav-link{ href: '#cohorts', class: active_when(params[:tab] == 'cohorts'), data: { toggle: 'tab' }, role: 'tab' } = s_('AdminUsers|Cohorts') .tab-content diff --git a/app/views/ci/variables/_header.html.haml b/app/views/ci/variables/_header.html.haml index a1b7f6efe54..392ff927f01 100644 --- a/app/views/ci/variables/_header.html.haml +++ b/app/views/ci/variables/_header.html.haml @@ -1,6 +1,6 @@ - expanded = local_assigns.fetch(:expanded) -%h4 +%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _('Variables') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml index bbdbda40297..7f508fd0a59 100644 --- a/app/views/clusters/clusters/_advanced_settings.html.haml +++ b/app/views/clusters/clusters/_advanced_settings.html.haml @@ -24,7 +24,7 @@ .text-muted = html_escape(s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes %{code_open}cluster-admin%{code_close} privileges.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } = link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank' - = field.submit _('Save changes'), class: 'btn gl-button btn-success' + = field.submit _('Save changes'), class: 'btn gl-button btn-confirm' .sub-section.form-group %h4 diff --git a/app/views/clusters/clusters/_cluster_list.html.haml b/app/views/clusters/clusters/_cluster_list.html.haml index 9627d940126..38ed7e334c9 100644 --- a/app/views/clusters/clusters/_cluster_list.html.haml +++ b/app/views/clusters/clusters/_cluster_list.html.haml @@ -4,9 +4,9 @@ .top-area.adjust .gl-display-block.gl-text-right.gl-my-4.gl-w-full - if clusterable.can_add_cluster? - = link_to s_('ClusterIntegration|Connect cluster with certificate'), clusterable.new_path, class: 'btn gl-button btn-success js-add-cluster gl-py-2', qa_selector: :integrate_kubernetes_cluster_button + = link_to s_('ClusterIntegration|Connect cluster with certificate'), clusterable.new_path, class: 'btn gl-button btn-confirm js-add-cluster gl-py-2', qa_selector: :integrate_kubernetes_cluster_button - else - %span.btn.gl-button.btn-success.js-add-cluster.disabled.gl-py-2 + %span.btn.gl-button.btn-confirm.js-add-cluster.disabled.gl-py-2 = s_("ClusterIntegration|Connect cluster with certificate") #js-clusters-list-app{ data: js_clusters_list_data(clusterable.index_path(format: :json)) } diff --git a/app/views/clusters/clusters/_empty_state.html.haml b/app/views/clusters/clusters/_empty_state.html.haml index 676a8a8111a..feef3e0027f 100644 --- a/app/views/clusters/clusters/_empty_state.html.haml +++ b/app/views/clusters/clusters/_empty_state.html.haml @@ -11,4 +11,4 @@ - if clusterable.can_add_cluster? .gl-text-center - = link_to s_('ClusterIntegration|Integrate with a cluster certificate'), clusterable.new_path, class: 'gl-button btn btn-success' + = link_to s_('ClusterIntegration|Integrate with a cluster certificate'), clusterable.new_path, class: 'gl-button btn btn-confirm', data: { qa_selector: 'add_kubernetes_cluster_link' } diff --git a/app/views/clusters/clusters/_provider_details_form.html.haml b/app/views/clusters/clusters/_provider_details_form.html.haml index 7fc803e9579..a936cdc04dd 100644 --- a/app/views/clusters/clusters/_provider_details_form.html.haml +++ b/app/views/clusters/clusters/_provider_details_form.html.haml @@ -55,4 +55,4 @@ = render('clusters/clusters/namespace', platform_field: platform_field, field: field) .form-group - = field.submit s_('ClusterIntegration|Save changes'), class: 'gl-button btn btn-success' + = field.submit s_('ClusterIntegration|Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/clusters/clusters/gcp/_form.html.haml b/app/views/clusters/clusters/gcp/_form.html.haml index 50e3d29f974..ee2817879be 100644 --- a/app/views/clusters/clusters/gcp/_form.html.haml +++ b/app/views/clusters/clusters/gcp/_form.html.haml @@ -85,4 +85,4 @@ .form-group.js-gke-cluster-creation-submit-container = field.submit s_('ClusterIntegration|Create Kubernetes cluster'), - class: 'js-gke-cluster-creation-submit gl-button btn btn-success', disabled: true + class: 'js-gke-cluster-creation-submit gl-button btn btn-confirm', disabled: true diff --git a/app/views/clusters/clusters/user/_form.html.haml b/app/views/clusters/clusters/user/_form.html.haml index e2779d1b683..7d82fe06799 100644 --- a/app/views/clusters/clusters/user/_form.html.haml +++ b/app/views/clusters/clusters/user/_form.html.haml @@ -60,4 +60,4 @@ = render('clusters/clusters/namespace', platform_field: platform_kubernetes_field) .form-group - = field.submit s_('ClusterIntegration|Add Kubernetes cluster'), class: 'gl-button btn btn-success', data: { qa_selector: 'add_kubernetes_cluster_button' } + = field.submit s_('ClusterIntegration|Add Kubernetes cluster'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'add_kubernetes_cluster_button' } diff --git a/app/views/dashboard/_groups_head.html.haml b/app/views/dashboard/_groups_head.html.haml index c24fe5c6307..b92f35c108c 100644 --- a/app/views/dashboard/_groups_head.html.haml +++ b/app/views/dashboard/_groups_head.html.haml @@ -3,7 +3,7 @@ - if current_user.can_create_group? .page-title-controls - = link_to _("New group"), new_group_path, class: "gl-button btn btn-success" + = link_to _("New group"), new_group_path, class: "gl-button btn btn-confirm", data: { testid: "new-group-button" } .top-area %ul.nav-links.mobile-separator.nav.nav-tabs diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index 6c994f3b230..57c0801074b 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -9,7 +9,7 @@ - if current_user.can_create_project? .page-title-controls - = link_to _("New project"), new_project_path, class: "gl-button btn btn-success" + = link_to _("New project"), new_project_path, class: "gl-button btn btn-confirm" .top-area.scrolling-tabs-container.inner-page-scroll-tabs .fade-left= sprite_icon('chevron-lg-left', size: 12) diff --git a/app/views/dashboard/_snippets_head.html.haml b/app/views/dashboard/_snippets_head.html.haml index 2640d483615..e96b5695ddc 100644 --- a/app/views/dashboard/_snippets_head.html.haml +++ b/app/views/dashboard/_snippets_head.html.haml @@ -4,7 +4,7 @@ - if current_user && current_user.snippets.any? || @snippets.any? .page-title-controls - if can?(current_user, :create_snippet) - = link_to _("New snippet"), new_snippet_path, class: "gl-button btn btn-success", title: _("New snippet") + = link_to _("New snippet"), new_snippet_path, class: "gl-button btn btn-confirm", title: _("New snippet") .top-area %ul.nav-links.nav.nav-tabs diff --git a/app/views/dashboard/activity.html.haml b/app/views/dashboard/activity.html.haml index 1e93613e978..0ddee68e93f 100644 --- a/app/views/dashboard/activity.html.haml +++ b/app/views/dashboard/activity.html.haml @@ -3,7 +3,7 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, dashboard_projects_url(rss_url_options), title: "All activity") -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - page_title _("Activity") - header_title _("Activity"), activity_dashboard_path diff --git a/app/views/dashboard/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml index afe4f1b84c2..fdfc2c5adb8 100644 --- a/app/views/dashboard/groups/index.html.haml +++ b/app/views/dashboard/groups/index.html.haml @@ -2,7 +2,7 @@ - page_title _("Groups") - header_title _("Groups"), dashboard_groups_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) = render 'dashboard/groups_head' - if params[:filter].blank? && @groups.empty? diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml index b3ee5034204..5a7eb46771b 100644 --- a/app/views/dashboard/issues.html.haml +++ b/app/views/dashboard/issues.html.haml @@ -4,7 +4,7 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{current_user.name} issues") -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) .page-title-holder.d-flex.align-items-center %h1.page-title= _('Issues') diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml index 2111b66d26e..d47df24b1b9 100644 --- a/app/views/dashboard/merge_requests.html.haml +++ b/app/views/dashboard/merge_requests.html.haml @@ -2,7 +2,7 @@ - page_title _("Merge Requests") - @breadcrumb_link = merge_requests_dashboard_path(assignee_username: current_user.username) -= render_dashboard_gold_trial(current_user) += 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') diff --git a/app/views/dashboard/projects/_projects.html.haml b/app/views/dashboard/projects/_projects.html.haml index 5122164dbcb..06ef89e0b57 100644 --- a/app/views/dashboard/projects/_projects.html.haml +++ b/app/views/dashboard/projects/_projects.html.haml @@ -1 +1 @@ -= render 'shared/projects/list', projects: @projects, pipeline_status: Feature.enabled?(:dashboard_pipeline_status, default_enabled: true), user: current_user += render 'shared/projects/list', projects: @projects, pipeline_status: true, user: current_user diff --git a/app/views/dashboard/projects/index.html.haml b/app/views/dashboard/projects/index.html.haml index 6f4d53c79a7..1f4bd06aea4 100644 --- a/app/views/dashboard/projects/index.html.haml +++ b/app/views/dashboard/projects/index.html.haml @@ -12,7 +12,7 @@ callouts_feature_id: UserCalloutsHelper::CUSTOMIZE_HOMEPAGE, track_label: 'home_page' } } -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - page_title _("Projects") - header_title _("Projects"), dashboard_projects_path diff --git a/app/views/dashboard/projects/shared/_common.html.haml b/app/views/dashboard/projects/shared/_common.html.haml index aa55f5a4e9c..17dcb072152 100644 --- a/app/views/dashboard/projects/shared/_common.html.haml +++ b/app/views/dashboard/projects/shared/_common.html.haml @@ -2,7 +2,7 @@ - breadcrumb_title _("Projects") - header_title _("Projects"), dashboard_projects_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) = render "projects/last_push" = render 'dashboard/projects_head', project_tab_filter: :starred diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 9301f24d6a4..d78059b6aed 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -2,7 +2,7 @@ - page_title _("To-Do List") - header_title _("To-Do List"), dashboard_todos_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - add_page_specific_style 'page_bundles/todos' .page-title-holder.d-flex.align-items-center diff --git a/app/views/devise/confirmations/almost_there.haml b/app/views/devise/confirmations/almost_there.haml index bf321bb690b..684af933f3a 100644 --- a/app/views/devise/confirmations/almost_there.haml +++ b/app/views/devise/confirmations/almost_there.haml @@ -1,14 +1,14 @@ -.well-confirmation.text-center.gl-mb-6 +.well-confirmation.gl-text-center.gl-mb-6 %h1.gl-mt-0 - Almost there... + = _("Almost there...") %p.lead.gl-mb-6 - Please check your email to confirm your account + = _("Please check your email to confirm your account") %hr - if Gitlab::CurrentSettings.after_sign_up_text.present? - .well-confirmation.text-center + .well-confirmation.gl-text-center = markdown_field(Gitlab::CurrentSettings, :after_sign_up_text) %p.text-center - No confirmation email received? Please check your spam folder or -.gl-mb-6.prepend-top-20.text-center - %a.btn.btn-lg.btn-success{ href: new_user_confirmation_path } - Request new confirmation email + = _("No confirmation email received? Please check your spam folder or") +.gl-mb-6.prepend-top-20.gl-text-center + %a.btn.gl-button.btn-confirm{ href: new_user_confirmation_path } + = _("Request new confirmation email") diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml index ace80ba16dd..024ccaddaa1 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.html.haml @@ -8,7 +8,7 @@ = f.label :email = f.email_field :email, class: "form-control gl-form-input", required: true, title: 'Please provide a valid email address.', value: nil .clearfix - = f.submit "Resend", class: 'gl-button btn btn-success' + = f.submit "Resend", class: 'gl-button btn btn-confirm' .clearfix.prepend-top-20 = render 'devise/shared/sign_in_link' diff --git a/app/views/devise/sessions/_new_base.html.haml b/app/views/devise/sessions/_new_base.html.haml index 270652483b7..98af69d43b7 100644 --- a/app/views/devise/sessions/_new_base.html.haml +++ b/app/views/devise/sessions/_new_base.html.haml @@ -20,4 +20,4 @@ = recaptcha_tags .submit-container.move-submit-down - = f.submit _('Sign in'), class: 'gl-button btn btn-success', data: { qa_selector: 'sign_in_button' } + = f.submit _('Sign in'), class: 'gl-button btn btn-confirm', data: { qa_selector: 'sign_in_button' } diff --git a/app/views/devise/sessions/_new_crowd.html.haml b/app/views/devise/sessions/_new_crowd.html.haml index 131544ac0c0..161e23d700e 100644 --- a/app/views/devise/sessions/_new_crowd.html.haml +++ b/app/views/devise/sessions/_new_crowd.html.haml @@ -10,4 +10,4 @@ %label{ for: "remember_me" } = check_box_tag :remember_me, '1', false, id: 'remember_me' %span Remember me - = submit_tag "Sign in", class: "btn-success btn" + = submit_tag "Sign in", class: "gl-button btn-confirm btn" diff --git a/app/views/devise/sessions/_new_ldap.html.haml b/app/views/devise/sessions/_new_ldap.html.haml index 8f397de41b7..19fcabb1a2e 100644 --- a/app/views/devise/sessions/_new_ldap.html.haml +++ b/app/views/devise/sessions/_new_ldap.html.haml @@ -16,4 +16,4 @@ %span Remember me .submit-container.move-submit-down - = submit_tag submit_message, class: "gl-button btn-success btn", data: { qa_selector: 'sign_in_button' } + = submit_tag submit_message, class: "gl-button btn btn-confirm", data: { qa_selector: 'sign_in_button' } diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index 8704bd16a13..404484cfb93 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -11,6 +11,6 @@ = f.text_field :otp_attempt, class: 'form-control gl-form-input', required: true, autofocus: true, autocomplete: 'off', title: 'This field is required.', data: { qa_selector: 'two_fa_code_field' } %p.form-text.text-muted.hint Enter the code from the two-factor app on your mobile device. If you've lost your device, you may enter one of your recovery codes. .prepend-top-20 - = f.submit "Verify code", class: "gl-button btn btn-success", data: { qa_selector: 'verify_code_button' } + = f.submit "Verify code", class: "gl-button btn btn-confirm", data: { qa_selector: 'verify_code_button' } - if @user.two_factor_webauthn_u2f_enabled? = render "authentication/authenticate", params: params, resource: resource, resource_name: resource_name, render_remember_me: true, target_path: new_user_session_path diff --git a/app/views/devise/shared/_omniauth_box.html.haml b/app/views/devise/shared/_omniauth_box.html.haml index 705fd9bbd0f..3ec859551ca 100644 --- a/app/views/devise/shared/_omniauth_box.html.haml +++ b/app/views/devise/shared/_omniauth_box.html.haml @@ -7,7 +7,7 @@ .d-flex.justify-content-between.flex-wrap - providers.each do |provider| - has_icon = provider_has_icon?(provider) - = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", class: "btn gl-button btn-default d-flex align-items-center omniauth-btn text-left oauth-login #{qa_class_for_provider(provider)}" do + = button_to omniauth_authorize_path(:user, provider), id: "oauth-login-#{provider}", class: "btn gl-button btn-default omniauth-btn oauth-login #{qa_class_for_provider(provider)}" do - if has_icon = provider_image_tag(provider) %span diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index aa2224b3ea3..2fc89f18de6 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -36,7 +36,7 @@ - if show_recaptcha_sign_up? = recaptcha_tags .submit-container - = f.submit button_text, class: 'btn gl-button btn-success', data: { qa_selector: 'new_user_register_button' } + = f.submit button_text, class: 'btn gl-button btn-confirm', data: { qa_selector: 'new_user_register_button' } = render 'devise/shared/terms_of_service_notice' - if show_omniauth_providers && omniauth_providers_placement == :bottom = render 'devise/shared/signup_omniauth_providers' diff --git a/app/views/devise/shared/_signup_omniauth_providers_top.haml b/app/views/devise/shared/_signup_omniauth_providers_top.haml index 1deacad88c4..a2cf5165c1f 100644 --- a/app/views/devise/shared/_signup_omniauth_providers_top.haml +++ b/app/views/devise/shared/_signup_omniauth_providers_top.haml @@ -1,3 +1,3 @@ -= render 'devise/shared/signup_omniauth_provider_list', providers: experiment_enabled_button_based_providers += render 'devise/shared/signup_omniauth_provider_list', providers: trial_enabled_button_based_providers .omniauth-divider.d-flex.align-items-center.text-center = _("or") diff --git a/app/views/devise/unlocks/new.html.haml b/app/views/devise/unlocks/new.html.haml index d145ac3f359..398a4fa0c5e 100644 --- a/app/views/devise/unlocks/new.html.haml +++ b/app/views/devise/unlocks/new.html.haml @@ -8,7 +8,7 @@ = f.label :email = f.email_field :email, class: 'form-control', autofocus: 'autofocus', autocapitalize: 'off', autocorrect: 'off', title: 'Please provide a valid email address.' .clearfix - = f.submit 'Resend unlock instructions', class: 'gl-button btn btn-success' + = f.submit 'Resend unlock instructions', class: 'gl-button btn btn-confirm' .clearfix.prepend-top-20 = render 'devise/shared/sign_in_link' diff --git a/app/views/doorkeeper/applications/_form.html.haml b/app/views/doorkeeper/applications/_form.html.haml index 39529e59aee..9f5d87a961f 100644 --- a/app/views/doorkeeper/applications/_form.html.haml +++ b/app/views/doorkeeper/applications/_form.html.haml @@ -23,4 +23,4 @@ = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes .gl-mt-3 - = f.submit _('Save application'), class: "gl-button btn btn-success" + = f.submit _('Save application'), class: "gl-button btn btn-confirm" diff --git a/app/views/doorkeeper/authorizations/new.html.haml b/app/views/doorkeeper/authorizations/new.html.haml index d89c4bf0161..7ea10296d97 100644 --- a/app/views/doorkeeper/authorizations/new.html.haml +++ b/app/views/doorkeeper/authorizations/new.html.haml @@ -50,4 +50,4 @@ = hidden_field_tag :nonce, @pre_auth.nonce = hidden_field_tag :code_challenge, @pre_auth.code_challenge = hidden_field_tag :code_challenge_method, @pre_auth.code_challenge_method - = submit_tag _("Authorize"), class: "gl-button btn btn-success gl-ml-3", data: { qa_selector: 'authorization_button' } + = submit_tag _("Authorize"), class: "gl-button btn btn-confirm gl-ml-3", data: { qa_selector: 'authorization_button' } diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index d6662e1fc31..97dd606855b 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -21,7 +21,8 @@ %ul.content-list.event_commits = render "events/commit", project: project, event: event - - create_mr = event.new_ref? && create_mr_button?(project.default_branch, event.ref_name, project) && event.authored_by?(current_user) + - create_mr = event.new_ref? && create_mr_button?(from: project.default_branch, to: event.ref_name, source_project: project, target_project: project) && event.authored_by?(current_user) + - create_mr_path = create_mr_path(from: project.default_branch, to: event.ref_name, source_project: project, target_project: project) if create_mr - if event.commits_count > 1 %li.commits-stat %span ... and #{pluralize(event.commits_count - 1, 'more commit')}. @@ -40,9 +41,9 @@ - if create_mr %span or - = link_to create_mr_path(project.default_branch, event.ref_name, project) do + = link_to create_mr_path do create a merge request - elsif create_mr %li.commits-stat - = link_to create_mr_path(project.default_branch, event.ref_name, project) do + = link_to create_mr_path do Create Merge Request diff --git a/app/views/explore/groups/index.html.haml b/app/views/explore/groups/index.html.haml index f36f30d3638..60132818193 100644 --- a/app/views/explore/groups/index.html.haml +++ b/app/views/explore/groups/index.html.haml @@ -2,7 +2,7 @@ - page_title _("Groups") - header_title _("Groups"), dashboard_groups_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - if current_user = render 'dashboard/groups_head' diff --git a/app/views/explore/projects/index.html.haml b/app/views/explore/projects/index.html.haml index 44456b6c015..ae59d9c728b 100644 --- a/app/views/explore/projects/index.html.haml +++ b/app/views/explore/projects/index.html.haml @@ -3,7 +3,7 @@ - header_title _("Projects"), dashboard_projects_path - page_canonical_link explore_projects_url -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - if current_user = render 'dashboard/projects_head', project_tab_filter: :explore diff --git a/app/views/explore/projects/page_out_of_bounds.html.haml b/app/views/explore/projects/page_out_of_bounds.html.haml index 0ee77ffd7d7..c554cce3dc6 100644 --- a/app/views/explore/projects/page_out_of_bounds.html.haml +++ b/app/views/explore/projects/page_out_of_bounds.html.haml @@ -2,7 +2,7 @@ - page_title _("Projects") - header_title _("Projects"), dashboard_projects_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - if current_user = render 'dashboard/projects_head', project_tab_filter: :explore diff --git a/app/views/explore/projects/starred.html.haml b/app/views/explore/projects/starred.html.haml index ec92852ddde..a1f2fea5134 100644 --- a/app/views/explore/projects/starred.html.haml +++ b/app/views/explore/projects/starred.html.haml @@ -2,7 +2,7 @@ - page_title _("Projects") - header_title _("Projects"), dashboard_projects_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - if current_user = render 'dashboard/projects_head', project_tab_filter: :starred diff --git a/app/views/explore/projects/trending.html.haml b/app/views/explore/projects/trending.html.haml index ed508fa2506..e23f63b0064 100644 --- a/app/views/explore/projects/trending.html.haml +++ b/app/views/explore/projects/trending.html.haml @@ -2,7 +2,7 @@ - page_title _("Projects") - header_title _("Projects"), dashboard_projects_path -= render_dashboard_gold_trial(current_user) += render_dashboard_ultimate_trial(current_user) - if current_user = render 'dashboard/projects_head', project_tab_filter: :explore_trending diff --git a/app/views/groups/_home_panel.html.haml b/app/views/groups/_home_panel.html.haml index 37c4ecc09f3..2df5a6740b0 100644 --- a/app/views/groups/_home_panel.html.haml +++ b/app/views/groups/_home_panel.html.haml @@ -23,17 +23,14 @@ .home-panel-buttons.col-md-12.col-lg-6 - if current_user .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2{ data: { testid: 'group-buttons' } } - - if Feature.enabled?(:vue_notification_dropdown, @group, default_enabled: :yaml) - - if @notification_setting - .js-vue-notification-dropdown{ data: { disabled: emails_disabled, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), group_id: @group.id, container_class: 'gl-mr-3 gl-mt-3 gl-vertical-align-top' } } - - else - = render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn gl-button gl-sm-w-auto gl-w-full', dropdown_container_class: 'gl-mr-0 gl-px-2 gl-sm-w-auto gl-w-full', emails_disabled: emails_disabled + - if @notification_setting + .js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), group_id: @group.id, container_class: 'gl-mx-2 gl-mt-3 gl-vertical-align-top' } } - if can_create_subgroups .gl-px-2.gl-sm-w-auto.gl-w-full - = link_to _("New subgroup"), new_group_path(parent_id: @group.id), class: "btn btn-success btn-md gl-button btn-success-secondary gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_subgroup_button' } + = link_to _("New subgroup"), new_group_path(parent_id: @group.id), class: "btn btn-default gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_subgroup_button' } - if can_create_projects .gl-px-2.gl-sm-w-auto.gl-w-full - = link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-success btn-md gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' } + = link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-confirm gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' } - if @group.description.present? .group-home-desc.mt-1 diff --git a/app/views/groups/_import_group_from_another_instance_panel.html.haml b/app/views/groups/_import_group_from_another_instance_panel.html.haml index 83d2e13d345..2c9d9349f14 100644 --- a/app/views/groups/_import_group_from_another_instance_panel.html.haml +++ b/app/views/groups/_import_group_from_another_instance_panel.html.haml @@ -1,6 +1,4 @@ = form_with url: configure_import_bulk_imports_path, class: 'group-form gl-show-field-errors' do |f| - = form_errors(@group) - .gl-border-l-solid.gl-border-r-solid.gl-border-gray-100.gl-border-1.gl-p-5 %h4.gl-display-flex = s_('GroupsNew|Import groups from another instance of GitLab') @@ -31,4 +29,4 @@ title: s_('GroupsNew|Please fill in your personal access token.'), id: 'import_gitlab_token' .gl-border-gray-100.gl-border-solid.gl-border-1.gl-bg-gray-10.gl-p-5 - = f.submit s_('GroupsNew|Connect instance'), class: 'btn gl-button btn-success' + = f.submit s_('GroupsNew|Connect instance'), class: 'btn gl-button btn-confirm' diff --git a/app/views/groups/_import_group_from_file_panel.html.haml b/app/views/groups/_import_group_from_file_panel.html.haml index 171f3e0371a..c70cc2c4936 100644 --- a/app/views/groups/_import_group_from_file_panel.html.haml +++ b/app/views/groups/_import_group_from_file_panel.html.haml @@ -3,8 +3,6 @@ - group_path << parent.full_path + '/' if parent = form_with url: import_gitlab_group_path, class: 'group-form gl-show-field-errors', multipart: true do |f| - = form_errors(@group) - .gl-border-l-solid.gl-border-r-solid.gl-border-gray-100.gl-border-1.gl-p-5 %h4 = _('Import group from file') @@ -45,6 +43,6 @@ - import_export_link_start = '<a href="%{url}" target="_blank">'.html_safe % { url: help_page_path('user/group/settings/import_export') } = s_('GroupsNew|To import a group, navigate to the group settings for the GitLab source instance, %{link_start}generate an export file%{link_end}, and upload it here.').html_safe % { link_start: import_export_link_start, link_end: '</a>'.html_safe } .gl-mt-3 - = render 'shared/file_picker_button', f: f, field: :file, help_text: nil, classes: 'gl-button btn-success-secondary gl-mr-2' + = render 'shared/file_picker_button', f: f, field: :file, help_text: nil, classes: 'gl-button btn-confirm-secondary gl-mr-2' .gl-border-gray-100.gl-border-solid.gl-border-1.gl-bg-gray-10.gl-p-5 - = f.submit _('Import'), class: 'btn gl-button btn-success' + = f.submit _('Import'), class: 'btn gl-button btn-confirm' diff --git a/app/views/groups/_new_group_fields.html.haml b/app/views/groups/_new_group_fields.html.haml index 64860c61082..14a3b0ece95 100644 --- a/app/views/groups/_new_group_fields.html.haml +++ b/app/views/groups/_new_group_fields.html.haml @@ -18,5 +18,5 @@ = render_if_exists 'shared/groups/invite_members' .row .form-actions.col-sm-12 - = f.submit _('Create group'), class: "btn gl-button btn-success" + = f.submit _('Create group'), class: "btn gl-button btn-confirm" = link_to _('Cancel'), dashboard_groups_path, class: 'btn gl-button btn-default btn-cancel' diff --git a/app/views/groups/dependency_proxies/_url.html.haml b/app/views/groups/dependency_proxies/_url.html.haml index 25a2442f4d4..785ad8f94fd 100644 --- a/app/views/groups/dependency_proxies/_url.html.haml +++ b/app/views/groups/dependency_proxies/_url.html.haml @@ -1,4 +1,4 @@ -- proxy_url = "#{group_url(@group)}#{DependencyProxy::URL_SUFFIX}" +- proxy_url = group_dependency_proxy_url(@group) %h5.prepend-top-20= _('Dependency proxy URL') diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index a5257ff20bc..da00879ecf9 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -1,3 +1,4 @@ +- add_page_specific_style 'page_bundles/members' - page_title _('Group members') - can_manage_members = can?(current_user, :admin_group_member, @group) - show_invited_members = can_manage_members && @invited_members.exists? @@ -16,8 +17,9 @@ = 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 } - if can_invite_members_for_group?(@group) .gl-w-half.gl-xs-w-full - .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2.gl-mb-3 - .js-invite-members-trigger.gl-px-2.gl-sm-w-auto.gl-w-full.gl-mb-4{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite members') } } + .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') } } + .js-invite-members-trigger{ data: { variant: 'success', classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite members') } } = render 'groups/invite_members_modal', group: @group - if can_manage_members && !can_invite_members_for_group?(@group) %hr.gl-mt-4 diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index ffb0ade4f73..52060e2be16 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -19,8 +19,8 @@ .form-actions - if @milestone.new_record? - = f.submit 'Create milestone', class: "btn-success gl-button btn", data: { qa_selector: "create_milestone_button" } + = f.submit 'Create milestone', class: "btn-confirm gl-button btn", data: { qa_selector: "create_milestone_button" } = link_to "Cancel", group_milestones_path(@group), class: "btn gl-button btn-cancel" - else - = f.submit 'Update milestone', class: "btn-success gl-button btn" + = f.submit 'Update milestone', class: "btn-confirm gl-button btn" = link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn gl-button btn-cancel" diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml index 2d5dc4c931d..1c7427fef87 100644 --- a/app/views/groups/milestones/index.html.haml +++ b/app/views/groups/milestones/index.html.haml @@ -8,7 +8,7 @@ = render 'shared/milestones/search_form' = render 'shared/milestones_sort_dropdown' - if can?(current_user, :admin_milestone, @group) - = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-success", data: { qa_selector: "new_group_milestone_link" } + = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-confirm", data: { qa_selector: "new_group_milestone_link" } - if @milestones.blank? = render 'shared/empty_states/milestones' diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 784f477673a..9d595d19779 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -7,7 +7,7 @@ projects: - if can? current_user, :admin_group, @group .controls - = link_to new_project_path(namespace_id: @group.id), class: "btn gl-button btn-sm btn-success" do + = link_to new_project_path(namespace_id: @group.id), class: "btn gl-button btn-sm btn-confirm" do New project %ul.projects-list.content-list.group-settings-projects - @projects.each do |project| diff --git a/app/views/groups/registry/repositories/index.html.haml b/app/views/groups/registry/repositories/index.html.haml index 899e58050af..fa6bd021e45 100644 --- a/app/views/groups/registry/repositories/index.html.haml +++ b/app/views/groups/registry/repositories/index.html.haml @@ -12,7 +12,6 @@ "registry_host_url_with_port" => escape_once(registry_config.host_port), "garbage_collection_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'container-registry-garbage-collection'), "run_cleanup_policies_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'run-the-cleanup-policy-now'), - "cleanup_policies_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'how-the-cleanup-policy-works'), "is_admin": current_user&.admin.to_s, is_group_page: "true", "group_path": @group.full_path, diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml index 627807841c5..fddb83114f3 100644 --- a/app/views/groups/settings/_advanced.html.haml +++ b/app/views/groups/settings/_advanced.html.haml @@ -8,7 +8,7 @@ %p = s_('GroupSettings|Changing group URL can have unintended side effects.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank' + = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank' .input-group.gl-field-error-anchor .group-root-path.input-group-prepend.has-tooltip{ title: group_path(@group), :'data-placement' => 'bottom' } diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml index 8ad5755fef8..f5cd7dde6a4 100644 --- a/app/views/groups/settings/_general.html.haml +++ b/app/views/groups/settings/_general.html.haml @@ -1,3 +1,5 @@ +- enable_search_settings locals: { container_class: 'gl-my-5' } + = form_for @group, html: { multipart: true, class: 'gl-show-field-errors js-general-settings-form' }, authenticity_token: true do |f| %input{ type: 'hidden', name: 'update_section', value: 'js-general-settings' } = form_errors(@group) @@ -29,4 +31,4 @@ = link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link' = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group - = f.submit _('Save changes'), class: 'btn gl-button btn-success mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' } + = f.submit _('Save changes'), class: 'btn gl-button btn-confirm mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' } diff --git a/app/views/groups/settings/_pages_settings.html.haml b/app/views/groups/settings/_pages_settings.html.haml index 273714d4dcc..a7b1813e4f1 100644 --- a/app/views/groups/settings/_pages_settings.html.haml +++ b/app/views/groups/settings/_pages_settings.html.haml @@ -2,4 +2,4 @@ = render_if_exists 'shared/pages/max_pages_size_input', form: f .gl-mt-3 - = f.submit s_('GitLabPages|Save'), class: 'btn gl-button btn-success' + = f.submit s_('GitLabPages|Save'), class: 'btn gl-button btn-confirm' diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml index 6e2c28ba2e8..dc20e796846 100644 --- a/app/views/groups/settings/_permissions.html.haml +++ b/app/views/groups/settings/_permissions.html.haml @@ -41,4 +41,4 @@ = render 'groups/settings/two_factor_auth', f: f, group: @group = render_if_exists 'groups/personal_access_token_expiration_policy', f: f, group: @group = render_if_exists 'groups/member_lock_setting', f: f, group: @group - = f.submit _('Save changes'), class: 'btn gl-button btn-success gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' } + = 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/ci_cd/_auto_devops_form.html.haml b/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml index c18fe79be05..dedb87c51ef 100644 --- a/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml +++ b/app/views/groups/settings/ci_cd/_auto_devops_form.html.haml @@ -12,4 +12,4 @@ .form-text.text-muted = s_('GroupSettings|The Auto DevOps pipeline runs if no alternative CI configuration file is found.') = link_to _('Learn more.'), help_page_path('topics/autodevops/index.md'), target: '_blank' - = f.submit _('Save changes'), class: 'btn gl-button btn-success gl-mt-5' + = f.submit _('Save changes'), class: 'btn gl-button btn-confirm gl-mt-5' diff --git a/app/views/groups/settings/ci_cd/_form.html.haml b/app/views/groups/settings/ci_cd/_form.html.haml index eb61ecf5536..c5cc3eb693c 100644 --- a/app/views/groups/settings/ci_cd/_form.html.haml +++ b/app/views/groups/settings/ci_cd/_form.html.haml @@ -10,4 +10,4 @@ = _("The maximum file size in megabytes for individual job artifacts.") = link_to sprite_icon('question-o'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'maximum-artifacts-size'), target: '_blank' - = f.submit _('Save changes'), class: "btn gl-button btn-success" + = f.submit _('Save changes'), class: "btn gl-button btn-confirm" diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index 1badb7b6ba1..574750d5f57 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -1,9 +1,11 @@ -- breadcrumb_title _("CI / CD Settings") -- page_title _("CI / CD") +- breadcrumb_title _("CI/CD Settings") +- page_title _("CI/CD") - expanded = expanded_by_default? - general_expanded = @group.errors.empty? ? expanded : true +- enable_search_settings locals: { container_class: 'gl-my-5' } + -# 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, - if can?(current_user, :update_max_artifacts_size, @group) diff --git a/app/views/groups/settings/packages_and_registries/index.html.haml b/app/views/groups/settings/packages_and_registries/index.html.haml index 1a12ad4902b..21eef20a987 100644 --- a/app/views/groups/settings/packages_and_registries/index.html.haml +++ b/app/views/groups/settings/packages_and_registries/index.html.haml @@ -2,4 +2,6 @@ - page_title _('Packages & Registries') - @content_class = 'limit-container-width' unless fluid_layout +- enable_search_settings locals: { container_class: 'gl-my-5' } + %section#js-packages-and-registries-settings{ data: { default_expanded: expanded_by_default?.to_s, group_path: @group.full_path } } diff --git a/app/views/groups/settings/repository/_initial_branch_name.html.haml b/app/views/groups/settings/repository/_initial_branch_name.html.haml index 1881ec31b0c..efe690a0c2d 100644 --- a/app/views/groups/settings/repository/_initial_branch_name.html.haml +++ b/app/views/groups/settings/repository/_initial_branch_name.html.haml @@ -19,4 +19,4 @@ = (_("Changes affect new repositories only. If not specified, either the configured application-wide default or Git's default name %{branch_name_default} will be used.") % { branch_name_default: fallback_branch_name }).html_safe = f.hidden_field :redirect_target, value: "repository_settings" - = f.submit _('Save changes'), class: 'btn gl-button btn-success' + = f.submit _('Save changes'), class: 'btn gl-button btn-confirm' diff --git a/app/views/groups/settings/repository/show.html.haml b/app/views/groups/settings/repository/show.html.haml index a5819320405..b15d36c631a 100644 --- a/app/views/groups/settings/repository/show.html.haml +++ b/app/views/groups/settings/repository/show.html.haml @@ -1,6 +1,8 @@ - breadcrumb_title _('Repository Settings') - page_title _('Repository') +- enable_search_settings locals: { container_class: 'gl-my-5' } + - deploy_token_description = s_('DeployTokens|Group deploy tokens allow access to the packages, repositories, and registry images within the group.') = render "shared/deploy_tokens/index", group_or_project: @group, description: deploy_token_description diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index d1787d36cd2..a1557cda071 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -16,11 +16,6 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: "#{@group.name} activity") -= content_for :invite_members_sidebar do - - if can_invite_members_for_group?(@group) - %li - .js-invite-members-trigger{ data: { icon: 'plus', classes: 'gl-text-decoration-none! gl-shadow-none!', display_text: _('Invite team members') } } - = render partial: 'flash_messages' = render_if_exists 'trials/banner', namespace: @group diff --git a/app/views/groups/sidebar/_packages_settings.html.haml b/app/views/groups/sidebar/_packages_settings.html.haml index 87300ed39ed..78533aba75f 100644 --- a/app/views/groups/sidebar/_packages_settings.html.haml +++ b/app/views/groups/sidebar/_packages_settings.html.haml @@ -1,5 +1,5 @@ - if group_packages_list_nav? = nav_link(controller: :packages_and_registries) do - = link_to group_settings_packages_and_registries_path(@group), title: _('Packages & Registries') do + = link_to group_settings_packages_and_registries_path(@group), title: _('Packages & Registries'), data: { qa_selector: 'group_package_settings_link' } do %span = _('Packages & Registries') diff --git a/app/views/import/bitbucket_server/new.html.haml b/app/views/import/bitbucket_server/new.html.haml index 19c28d53087..308065da90a 100644 --- a/app/views/import/bitbucket_server/new.html.haml +++ b/app/views/import/bitbucket_server/new.html.haml @@ -25,4 +25,4 @@ .col-md-4 = password_field_tag :personal_access_token, '', class: 'form-control gl-mr-3', placeholder: _('Personal Access Token'), size: 40 .form-actions - = submit_tag _('List your Bitbucket Server repositories'), class: 'btn btn-success' + = submit_tag _('List your Bitbucket Server repositories'), class: 'gl-button btn btn-confirm' diff --git a/app/views/import/bulk_imports/status.html.haml b/app/views/import/bulk_imports/status.html.haml index 778bc1ef1a4..917d88af75a 100644 --- a/app/views/import/bulk_imports/status.html.haml +++ b/app/views/import/bulk_imports/status.html.haml @@ -9,4 +9,5 @@ available_namespaces_path: import_available_namespaces_path(format: :json), create_bulk_import_path: import_bulk_imports_path(format: :json), jobs_path: realtime_changes_import_bulk_imports_path(format: :json), - source_url: @source_url } } + source_url: @source_url, + group_path_regex: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS } } diff --git a/app/views/import/fogbugz/new.html.haml b/app/views/import/fogbugz/new.html.haml index 4daa769215f..c0abac0a633 100644 --- a/app/views/import/fogbugz/new.html.haml +++ b/app/views/import/fogbugz/new.html.haml @@ -22,4 +22,4 @@ .col-md-4 = password_field_tag :password, nil, class: 'form-control' .form-actions - = submit_tag _('Continue to the next step'), class: 'btn btn-success' + = submit_tag _('Continue to the next step'), class: 'gl-button btn btn-confirm' diff --git a/app/views/import/fogbugz/new_user_map.html.haml b/app/views/import/fogbugz/new_user_map.html.haml index fb93a3eca0d..47139917379 100644 --- a/app/views/import/fogbugz/new_user_map.html.haml +++ b/app/views/import/fogbugz/new_user_map.html.haml @@ -40,4 +40,4 @@ scope: :all, email_user: true, selected: user[:gitlab_user]) .form-actions - = submit_tag _('Continue to the next step'), class: 'btn btn-success' + = submit_tag _('Continue to the next step'), class: 'gl-button btn btn-confirm' diff --git a/app/views/import/gitea/new.html.haml b/app/views/import/gitea/new.html.haml index c4670869c93..285d2fb23a3 100644 --- a/app/views/import/gitea/new.html.haml +++ b/app/views/import/gitea/new.html.haml @@ -19,4 +19,4 @@ .col-sm-4 = text_field_tag :personal_access_token, nil, class: 'form-control' .form-actions - = submit_tag _('List Your Gitea Repositories'), class: 'btn btn-success' + = submit_tag _('List Your Gitea Repositories'), class: 'gl-button btn btn-confirm' diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index 7e49cad7902..32143f823d7 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -10,7 +10,7 @@ = import_github_authorize_message - if github_import_configured? && !has_ci_cd_only_params? - = link_to status_import_github_path, class: 'btn btn-success gl-button' do + = link_to status_import_github_path, class: 'gl-button btn btn-confirm' do = sprite_icon('github', css_class: 'gl-mr-2') = title @@ -30,5 +30,5 @@ = render_if_exists 'import/github/ci_cd_only' .form-actions.d-flex.justify-content-end - = link_to _('Cancel'), new_project_path, class: 'btn' - = submit_tag _('Authenticate'), class: 'btn btn-success ml-2', data: { qa_selector: 'authenticate_button' } + = 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' } diff --git a/app/views/import/gitlab_projects/new.html.haml b/app/views/import/gitlab_projects/new.html.haml index cd477c085f9..8ba62c91e6a 100644 --- a/app/views/import/gitlab_projects/new.html.haml +++ b/app/views/import/gitlab_projects/new.html.haml @@ -20,5 +20,5 @@ = file_field_tag :file, class: '' .row .form-actions.col-sm-12 - = submit_tag _('Import project'), class: 'btn btn-success' - = link_to _('Cancel'), new_project_path, class: 'btn btn-cancel' + = submit_tag _('Import project'), class: 'gl-button btn btn-confirm' + = link_to _('Cancel'), new_project_path, class: 'gl-button btn btn-default btn-cancel' diff --git a/app/views/import/manifest/_form.html.haml b/app/views/import/manifest/_form.html.haml index 1a3b945cfe5..365184537cc 100644 --- a/app/views/import/manifest/_form.html.haml +++ b/app/views/import/manifest/_form.html.haml @@ -19,5 +19,5 @@ = link_to sprite_icon('question-o'), help_page_path('user/project/import/manifest') .gl-mb-3 - = submit_tag _('List available repositories'), class: 'gl-button btn btn-success' + = submit_tag _('List available repositories'), class: 'gl-button btn btn-confirm' = link_to _('Cancel'), new_project_path, class: 'gl-button btn btn-default btn-cancel' diff --git a/app/views/import/phabricator/new.html.haml b/app/views/import/phabricator/new.html.haml index 5f73a27dbd6..69483512816 100644 --- a/app/views/import/phabricator/new.html.haml +++ b/app/views/import/phabricator/new.html.haml @@ -24,4 +24,4 @@ .col-md-4 = password_field_tag :api_token, params[:api_token], class: 'form-control gl-mr-3', placeholder: _('Personal Access Token'), size: 40 .form-actions - = submit_tag _('Import tasks'), class: 'btn btn-success' + = submit_tag _('Import tasks'), class: 'gl-button btn btn-confirm' diff --git a/app/views/import/shared/_new_project_form.html.haml b/app/views/import/shared/_new_project_form.html.haml index b053d14a851..bfc4e65e23d 100644 --- a/app/views/import/shared/_new_project_form.html.haml +++ b/app/views/import/shared/_new_project_form.html.haml @@ -1,7 +1,7 @@ .row .form-group.project-name.col-sm-12 = label_tag :name, _('Project name'), class: 'label-bold' - = text_field_tag :name, @name, placeholder: "My awesome project", class: "js-project-name form-control input-lg", autofocus: true + = text_field_tag :name, @name, placeholder: "My awesome project", class: "js-project-name form-control input-lg", autofocus: true, required: true, aria: { required: true } .form-group.col-12.col-sm-6 = label_tag :namespace_id, _('Project URL'), class: 'label-bold' .form-group @@ -18,4 +18,4 @@ = hidden_field_tag :namespace_id, current_user.namespace_id .form-group.col-12.col-sm-6.project-path = label_tag :path, _('Project slug'), class: 'label-bold' - = text_field_tag :path, @path, placeholder: "my-awesome-project", class: "js-path-name form-control", required: true + = text_field_tag :path, @path, placeholder: "my-awesome-project", class: "js-path-name form-control", required: true, aria: { required: true } diff --git a/app/views/jira_connect/subscriptions/index.html.haml b/app/views/jira_connect/subscriptions/index.html.haml index a549ed3540b..c7873991010 100644 --- a/app/views/jira_connect/subscriptions/index.html.haml +++ b/app/views/jira_connect/subscriptions/index.html.haml @@ -1,61 +1,51 @@ -%header.jira-connect-header - = brand_header_logo +%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' -.jira-connect-user +.jira-connect-user.gl-font-base - if current_user - user_link = link_to(current_user.to_reference, jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in') = _('Signed in to GitLab as %{user_link}').html_safe % { user_link: user_link } - elsif @subscriptions.present? = link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in' -.jira-connect-app +%main.jira-connect-app.gl-px-5.gl-pt-7.gl-mx-auto - if current_user.blank? && @subscriptions.empty? - %h2= s_('JiraService|GitLab for Jira Configuration') - %p= s_('JiraService|Sign in to GitLab.com to get started.') + .jira-connect-app-body.gl-text-center + %h2= s_('JiraService|GitLab for Jira Configuration') + %p= s_('JiraService|Sign in to GitLab.com to get started.') - .gl-mt-7 - - sign_in_button_class = new_jira_connect_ui? ? 'btn gl-button btn-confirm' : 'ak-button ak-button__appearance-primary' - = external_link _('Sign in to GitLab'), jira_connect_users_path, class: "#{sign_in_button_class} js-jira-connect-sign-in" + .gl-mt-7 + = external_link _('Sign in to GitLab'), jira_connect_users_path, class: "btn gl-button btn-confirm js-jira-connect-sign-in" - .gl-mt-7 - %p Note: this integration only works with accounts on GitLab.com (SaaS). + .gl-mt-7 + %p= s_('Integrations|Note: this integration only works with accounts on GitLab.com (SaaS).') - else .js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } - - unless new_jira_connect_ui? - %form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path } - .ak-field-group - %label - GitLab namespace - - .ak-field-group.field-group-input - %input#namespace-input.ak-field-text{ type: 'text', required: true, placeholder: 'e.g. "MyCompany" or "MyCompany/GroupName"' } - %button.ak-button.ak-button__appearance-primary{ type: 'submit' } - Link namespace to Jira - - - if @subscriptions.present? - %table.subscriptions.gl-w-full - %thead - %tr - %th Namespace - %th Added - %th - %tbody - - @subscriptions.each do |subscription| + .jira-connect-app-body + - if @subscriptions.present? + %table.subscriptions.gl-w-full + %thead %tr - %td= subscription.namespace.full_path - %td= subscription.created_at - %td= link_to 'Remove', jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription' - - else - %h4.empty-subscriptions - No linked namespaces - %p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.') - - %p.browser-limitations-notice - %strong Browser limitations: - Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use - %a{ href: 'https://www.mozilla.org/en-US/firefox/', target: '_blank', rel: 'noopener noreferrer' } Firefox - or enable cross‑site cookies in your browser when adding a namespace. + %th= _('Namespace') + %th= _('Added') + %th + %tbody + - @subscriptions.each do |subscription| + %tr + %td= subscription.namespace.full_path + %td= subscription.created_at + %td= link_to _('Remove'), jira_connect_subscription_path(subscription), class: 'js-jira-connect-remove-subscription' + - else + .gl-text-center + %h4= s_('Integrations|No linked namespaces') + %p= s_('Integrations|Namespaces are your GitLab groups and subgroups that will be linked to this Jira instance.') + + %p.jira-connect-app-body.gl-mt-7.gl-font-base.gl-text-center + %strong= s_('Integrations|Browser limitations') + - firefox_link_url = 'https://www.mozilla.org/en-US/firefox/' + - firefox_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: firefox_link_url } + = s_('Integrations|Adding a namespace currently works only in browsers that allow cross‑site cookies. Please make sure to use %{firefox_link_start}Firefox%{firefox_link_end} or enable cross‑site cookies in your browser when adding a namespace.').html_safe % { firefox_link_start: firefox_link_start, firefox_link_end: '</a>'.html_safe } = link_to _('Learn more'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/284211', target: '_blank', rel: 'noopener noreferrer' = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index 8b430f579e9..601598d65da 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -44,6 +44,7 @@ = yield :page_specific_styles = stylesheet_link_tag_defer "application_utilities" = stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations'] + = stylesheet_link_tag "test_environment", media: "all" if Rails.env.test? = stylesheet_link_tag_defer "highlight/themes/#{user_color_scheme}" @@ -54,14 +55,12 @@ = Gon::Base.render_data(nonce: content_security_policy_nonce) = javascript_include_tag locale_path unless I18n.locale == :en - -# Temporarily commented out to investigate performance: https://gitlab.com/gitlab-org/gitlab/-/issues/251179 - -# = webpack_bundle_tag "sentry" if Gitlab.config.sentry.enabled + = webpack_bundle_tag "sentry" if Gitlab.config.sentry.enabled = webpack_bundle_tag 'performance_bar' if performance_bar_enabled? = yield :page_specific_javascripts = webpack_controller_bundle_tags - = webpack_bundle_tag "chrome_84_icon_fix" if browser.chrome?([">=84", "<84.0.4147.125"]) || browser.edge?([">=84", "<84.0.522.59"]) = yield :project_javascripts diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml index 9d14dfb3786..bdce4eac755 100644 --- a/app/views/layouts/_snowplow.html.haml +++ b/app/views/layouts/_snowplow.html.haml @@ -8,3 +8,6 @@ n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{asset_url('snowplow/sp.js')}","snowplow")); window.snowplowOptions = #{Gitlab::Tracking.snowplow_options(@group).to_json} + + gl = window.gl || {}; + gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new.to_context.to_json.to_json} diff --git a/app/views/layouts/jira_connect.html.haml b/app/views/layouts/jira_connect.html.haml index da45d84a83b..6acd7799875 100644 --- a/app/views/layouts/jira_connect.html.haml +++ b/app/views/layouts/jira_connect.html.haml @@ -3,14 +3,10 @@ %meta{ content: "text/html; charset=utf-8", "http-equiv" => "Content-Type" } %title GitLab - - unless new_jira_connect_ui? - = stylesheet_link_tag 'https://unpkg.com/@atlaskit/css-reset@3.0.6/dist/bundle.css' - = stylesheet_link_tag 'https://unpkg.com/@atlaskit/reduced-ui-pack@10.5.5/dist/bundle.css' = yield :page_specific_styles = javascript_include_tag 'https://connect-cdn.atl-paas.net/all.js' = Gon::Base.render_data(nonce: content_security_policy_nonce) = yield :head %body - .ac-content - = yield + = yield diff --git a/app/views/layouts/nav/groups_dropdown/_show.html.haml b/app/views/layouts/nav/groups_dropdown/_show.html.haml index d0394451a61..a9d88341a19 100644 --- a/app/views/layouts/nav/groups_dropdown/_show.html.haml +++ b/app/views/layouts/nav/groups_dropdown/_show.html.haml @@ -8,5 +8,11 @@ = nav_link(path: 'groups#explore') do = link_to explore_groups_path, data: { track_label: "groups_dropdown_explore_groups", track_event: "click_link" } do = _('Explore groups') + = nav_link(path: 'groups/new#create-group-pane', html_options: { class: 'gl-border-0 gl-border-t-1 gl-border-solid gl-border-gray-100' }) do + = link_to new_group_path(anchor: 'create-group-pane'), data: { track_label: "groups_dropdown_create_group", track_event: "click_link" } do + = _('Create group') + = nav_link(path: 'groups/new#import-group-pane') do + = link_to new_group_path(anchor: 'import-group-pane'), data: { track_label: "groups_dropdown_import_group", track_event: "click_link" } do + = _('Import group') .frequent-items-dropdown-content #js-groups-dropdown{ data: { user_name: current_user.username, group: group_meta } } diff --git a/app/views/layouts/nav/projects_dropdown/_show.html.haml b/app/views/layouts/nav/projects_dropdown/_show.html.haml index 91f999a9a74..d8bf64fab64 100644 --- a/app/views/layouts/nav/projects_dropdown/_show.html.haml +++ b/app/views/layouts/nav/projects_dropdown/_show.html.haml @@ -11,5 +11,16 @@ = nav_link(path: 'projects#trending') do = link_to explore_root_path, data: { track_label: "projects_dropdown_explore_projects", track_event: "click_link" } do = _('Explore projects') + = nav_link(path: 'projects/new#blank_project', + html_options: { class: 'gl-border-0 gl-border-t-1 gl-border-solid gl-border-gray-100' }, + data: { track_label: "projects_dropdown_blank_project", track_event: "click_link" }) do + = link_to new_project_path(anchor: 'blank_project') do + = _('Create blank project') + = nav_link(path: 'projects/new#import_project') do + = link_to new_project_path(anchor: 'import_project'), data: { track_label: "projects_dropdown_import_project", track_event: "click_link" } do + = _('Import project') + = nav_link(path: 'projects/new#create_from_template') do + = link_to new_project_path(anchor: 'create_from_template'), data: { track_label: "projects_dropdown_create_from_template", track_event: "click_link" } do + = _('Create from template') .frequent-items-dropdown-content #js-projects-dropdown{ data: { user_name: current_user.username, project: project_meta } } diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index f887d335807..d756867541b 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -65,11 +65,10 @@ = link_to admin_dev_ops_report_path, title: _('DevOps Report') do %span = _('DevOps Report') - - if Feature.enabled?(:instance_statistics, default_enabled: true) - = nav_link(controller: :instance_statistics) do - = link_to admin_instance_statistics_path, title: _('Usage Trends') do - %span - = _('Usage Trends') + = nav_link(controller: :usage_trends) do + = link_to admin_usage_trends_path, title: _('Usage Trends') do + %span + = _('Usage Trends') = nav_link(controller: admin_monitoring_nav_links) do = link_to admin_system_info_path, data: { qa_selector: 'admin_monitoring_link' } do diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index e99b2f443be..7350db64462 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -137,8 +137,6 @@ %strong.fly-out-top-item-name = _('Members') - = content_for :invite_members_sidebar - - if group_sidebar_link?(:settings) = nav_link(path: group_settings_nav_link_paths) do = link_to edit_group_path(@group) do @@ -173,9 +171,9 @@ = _('Repository') = nav_link(controller: :ci_cd) do - = link_to group_settings_ci_cd_path(@group), title: _('CI / CD') do + = link_to group_settings_ci_cd_path(@group), title: _('CI/CD') do %span - = _('CI / CD') + = _('CI/CD') = render 'groups/sidebar/packages_settings' diff --git a/app/views/layouts/nav/sidebar/_profile.html.haml b/app/views/layouts/nav/sidebar/_profile.html.haml index a66110f28e8..4ae81d69c16 100644 --- a/app/views/layouts/nav/sidebar/_profile.html.haml +++ b/app/views/layouts/nav/sidebar/_profile.html.haml @@ -3,7 +3,7 @@ .context-header = link_to profile_path, title: _('Profile Settings') do .avatar-container.s40.settings-avatar - = image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile", alt: current_user.name + = image_tag avatar_icon_for_user(current_user, 40), class: "avatar s40 avatar-tile js-sidebar-user-avatar", alt: current_user.name, data: { testid: 'sidebar-user-avatar' } .sidebar-context-title= _('User Settings') %ul.sidebar-top-level-items = nav_link(path: 'profiles#show', html_options: {class: 'home'}) do diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 8bb009bfd17..4c331dbd69d 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -86,7 +86,7 @@ = render_if_exists 'projects/sidebar/repository_locked_files' - if project_nav_tab? :issues - = nav_link(controller: @project.issues_enabled? ? ['projects/issues', :labels, :milestones, :boards] : 'projects/issues') do + = nav_link(controller: @project.issues_enabled? ? ['projects/issues', :labels, :milestones, :boards, :iterations] : 'projects/issues') do = link_to project_issues_path(@project), class: 'shortcuts-issues qa-issues-item' do .nav-icon-container = sprite_icon('issues') @@ -179,13 +179,13 @@ .nav-icon-container = sprite_icon('rocket') %span.nav-item-name#js-onboarding-pipelines-link - = _('CI / CD') + = _('CI/CD') %ul.sidebar-sub-level-items = nav_link(controller: [:pipelines, :builds, :jobs, :pipeline_schedules, :artifacts, :test_cases, :pipeline_editor], html_options: { class: "fly-out-top-item" }) do = link_to project_pipelines_path(@project) do %strong.fly-out-top-item-name - = _('CI / CD') + = _('CI/CD') %li.divider.fly-out-top-item - if project_nav_tab? :pipelines = nav_link(path: ['pipelines#index', 'pipelines#show']) do @@ -286,7 +286,7 @@ - if project_nav_tab? :clusters - show_cluster_hint = show_gke_cluster_integration_callout?(@project) - = nav_link(controller: [:clusters, :user, :gcp]) do + = nav_link(controller: [:cluster_agents, :clusters]) do = link_to project_clusters_path(@project), title: _('Kubernetes'), class: 'shortcuts-kubernetes' do %span = _('Kubernetes') @@ -378,8 +378,6 @@ %strong.fly-out-top-item-name = _('Members') - = content_for :invite_members_sidebar - - if project_nav_tab? :settings = nav_link(path: sidebar_settings_paths) do = link_to edit_project_path(@project) do @@ -420,9 +418,9 @@ = _('Repository') - if !@project.archived? && @project.feature_available?(:builds, current_user) = nav_link(controller: :ci_cd) do - = link_to project_settings_ci_cd_path(@project), title: _('CI / CD') do + = link_to project_settings_ci_cd_path(@project), title: _('CI/CD') do %span - = _('CI / CD') + = _('CI/CD') - if settings_operations_available? = nav_link(controller: [:operations]) do = link_to project_settings_operations_path(@project), title: _('Operations'), data: { qa_selector: 'operations_settings_link' } do diff --git a/app/views/notify/_users_list.html.haml b/app/views/notify/_users_list.html.haml new file mode 100644 index 00000000000..7ba2330fe7a --- /dev/null +++ b/app/views/notify/_users_list.html.haml @@ -0,0 +1,10 @@ +%tr + %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;border-top:1px solid #ededed;" } + = user_label + %td{ style: "font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; margin: 0; padding: 14px 0 0px 5px; font-size: 15px; line-height: 1.4; color: #333333; font-weight: 400; width: 75%; border-top-style: solid; border-top-color: #ededed; border-top-width: 1px; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" } + %ul.users-list{ style: "font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 15px; line-height: 1.4; padding-right: 5px; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" } + - users.each do |user| + %li + %img.avatar{ alt: "Avatar", height: "24", src: avatar_icon_for_user(user, 24, only_path: false), style: "border-radius: 12px; max-width: 100%; height: auto; -ms-interpolation-mode: bicubic; margin: -2px 0;", width: "24" } + %a.muted{ href: user_url(user), style: "color: #333333; text-decoration: none; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; vertical-align: top;" } + = user.name diff --git a/app/views/notify/access_token_about_to_expire_email.html.haml b/app/views/notify/access_token_about_to_expire_email.html.haml index 240c7300c7f..ea27f72764f 100644 --- a/app/views/notify/access_token_about_to_expire_email.html.haml +++ b/app/views/notify/access_token_about_to_expire_email.html.haml @@ -1,7 +1,11 @@ %p = _('Hi %{username}!') % { username: sanitize_name(@user.name) } %p - = _('One or more of your personal access tokens will expire in %{days_to_expire} days or less.') % { days_to_expire: @days_to_expire } + = _('One or more of your personal access tokens will expire in %{days_to_expire} days or less:') % { days_to_expire: @days_to_expire } %p - - pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url } + %ul + - @token_names.each do |token| + %li= token +%p + - pat_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: @target_url } = html_escape(_('You can create a new one or check them in your %{pat_link_start}personal access tokens%{pat_link_end} settings')) % { pat_link_start: pat_link_start, pat_link_end: '</a>'.html_safe } diff --git a/app/views/notify/access_token_about_to_expire_email.text.erb b/app/views/notify/access_token_about_to_expire_email.text.erb index edcec51aeb4..dc9b1379e47 100644 --- a/app/views/notify/access_token_about_to_expire_email.text.erb +++ b/app/views/notify/access_token_about_to_expire_email.text.erb @@ -1,5 +1,9 @@ <%= _('Hi %{username}!') % { username: sanitize_name(@user.name) } %> -<%= _('One or more of your personal access tokens will expire in %{days_to_expire} days or less.') % { days_to_expire: @days_to_expire} %> +<%= _('One or more of your personal access tokens will expire in %{days_to_expire} days or less:') % { days_to_expire: @days_to_expire } %> + +<% @token_names.each do |token| %> + - <%= token %> +<% end %> <%= _('You can create a new one or check them in your personal access tokens settings %{pat_link}') % { pat_link: @target_url } %> diff --git a/app/views/notify/change_in_merge_request_draft_status_email.html.haml b/app/views/notify/change_in_merge_request_draft_status_email.html.haml new file mode 100644 index 00000000000..5604a30d9f1 --- /dev/null +++ b/app/views/notify/change_in_merge_request_draft_status_email.html.haml @@ -0,0 +1,2 @@ +%p + = _('%{username} changed the draft status of merge request %{mr_reference}' % {username: sanitize_name(@updated_by_user.name), mr_reference: @merge_request.to_reference }) diff --git a/app/views/notify/change_in_merge_request_draft_status_email.text.erb b/app/views/notify/change_in_merge_request_draft_status_email.text.erb new file mode 100644 index 00000000000..4e2df2dff1d --- /dev/null +++ b/app/views/notify/change_in_merge_request_draft_status_email.text.erb @@ -0,0 +1 @@ +<%= "#{sanitize_name(@updated_by_user.name)} changed the draft status of merge request #{@merge_request.to_reference}" %> diff --git a/app/views/notify/closed_merge_request_email.text.haml b/app/views/notify/closed_merge_request_email.text.haml index 8546da2d7f0..28766f861d9 100644 --- a/app/views/notify/closed_merge_request_email.text.haml +++ b/app/views/notify/closed_merge_request_email.text.haml @@ -6,3 +6,4 @@ Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @m Author: #{sanitize_name(@merge_request.author_name)} = assignees_label(@merge_request) += reviewers_label(@merge_request) diff --git a/app/views/notify/in_product_marketing_email.html.haml b/app/views/notify/in_product_marketing_email.html.haml index be517516a98..39f084efe40 100644 --- a/app/views/notify/in_product_marketing_email.html.haml +++ b/app/views/notify/in_product_marketing_email.html.haml @@ -177,8 +177,9 @@ %td{ style: "padding: 10px 20px 30px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#000000; font-size: 18px; line-height: 24px;" } %p{ style: "margin: 0 0 20px 0;" } = in_product_marketing_body_line1(@track, @series, format: :html).html_safe - %p{ style: "margin: 0 0 20px 0;" } - = in_product_marketing_body_line2(@track, @series, format: :html).html_safe + - in_product_marketing_body_line2(@track, @series, format: :html)&.tap do |line| + %p{ style: "margin: 0 0 20px 0;" } + = line.html_safe %tr %td{ align: "center", style: "padding: 10px 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" } .cta_link= cta_link(@track, @series, @group, format: :html) diff --git a/app/views/notify/merge_request_status_email.text.haml b/app/views/notify/merge_request_status_email.text.haml index 3d7115856d4..ab663b65199 100644 --- a/app/views/notify/merge_request_status_email.text.haml +++ b/app/views/notify/merge_request_status_email.text.haml @@ -6,3 +6,4 @@ Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @m Author: #{sanitize_name(@merge_request.author_name)} = assignees_label(@merge_request) += reviewers_label(@merge_request) diff --git a/app/views/notify/merge_request_unmergeable_email.text.haml b/app/views/notify/merge_request_unmergeable_email.text.haml index 412a0887186..a23d083747c 100644 --- a/app/views/notify/merge_request_unmergeable_email.text.haml +++ b/app/views/notify/merge_request_unmergeable_email.text.haml @@ -6,3 +6,4 @@ Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @m Author: #{sanitize_name(@merge_request.author_name)} = assignees_label(@merge_request) += reviewers_label(@merge_request) 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 4db213fb229..e7c51c8fb13 100644 --- a/app/views/notify/merge_when_pipeline_succeeds_email.html.haml +++ b/app/views/notify/merge_when_pipeline_succeeds_email.html.haml @@ -42,13 +42,13 @@ } } - ul.assignees-list { + ul.users-list { list-style: none; padding: 0px; display: block; margin-top: 0px; } - ul.assignees-list li { + ul.users-list li { display: inline-block; padding-right: 12px; padding-top: 8px; @@ -137,16 +137,10 @@ = @merge_request.author.name - if @merge_request.assignees.any? - %tr - %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:1.4;color:#8c8c8c;font-weight:300;padding:14px 0;margin:0;border-top:1px solid #ededed;" } - = assignees_label(@merge_request, include_value: false) - %td{ style: "font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; margin: 0; padding: 14px 0 0px 5px; font-size: 15px; line-height: 1.4; color: #333333; font-weight: 400; width: 75%; border-top-style: solid; border-top-color: #ededed; border-top-width: 1px; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" } - %ul.assignees-list{ style: "font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 15px; line-height: 1.4; padding-right: 5px; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt;" } - - @merge_request.assignees.each do |assignee| - %li - %img.avatar{ alt: "Avatar", height: "24", src: avatar_icon_for_user(assignee, 24, only_path: false), style: "border-radius: 12px; max-width: 100%; height: auto; -ms-interpolation-mode: bicubic; margin: -2px 0;", width: "24" } - %a.muted{ href: user_url(assignee), style: "color: #333333; text-decoration: none; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; vertical-align: top;" } - = assignee.name + = render 'users_list', users: @merge_request.assignees, user_label: assignees_label(@merge_request, include_value: false) + + - if @merge_request.reviewers.any? + = render 'users_list', users: @merge_request.reviewers, user_label: reviewers_label(@merge_request, include_value: false) = render_if_exists 'layouts/mailer/additional_text' diff --git a/app/views/notify/merge_when_pipeline_succeeds_email.text.haml b/app/views/notify/merge_when_pipeline_succeeds_email.text.haml index fdc23a6af0f..de29dda6c71 100644 --- a/app/views/notify/merge_when_pipeline_succeeds_email.text.haml +++ b/app/views/notify/merge_when_pipeline_succeeds_email.text.haml @@ -6,3 +6,4 @@ Merge Request url: #{project_merge_request_url(@merge_request.target_project, @m Author: #{sanitize_name(@merge_request.author_name)} = assignees_label(@merge_request) += reviewers_label(@merge_request) diff --git a/app/views/notify/merged_merge_request_email.text.haml b/app/views/notify/merged_merge_request_email.text.haml index 74e6f86f603..a8e07fa8d1c 100644 --- a/app/views/notify/merged_merge_request_email.text.haml +++ b/app/views/notify/merged_merge_request_email.text.haml @@ -6,3 +6,4 @@ Merge Request URL: #{project_merge_request_url(@merge_request.target_project, @m Author: #{sanitize_name(@merge_request.author_name)} = assignees_label(@merge_request) += reviewers_label(@merge_request) diff --git a/app/views/notify/new_mention_in_merge_request_email.text.erb b/app/views/notify/new_mention_in_merge_request_email.text.erb index 3c78e257a88..0121006852c 100644 --- a/app/views/notify/new_mention_in_merge_request_email.text.erb +++ b/app/views/notify/new_mention_in_merge_request_email.text.erb @@ -4,6 +4,7 @@ You have been mentioned in Merge Request <%= @merge_request.to_reference %> <%= merge_path_description(@merge_request, 'to') %> Author: <%= sanitize_name(@merge_request.author_name) %> -= assignees_label(@merge_request) +<%= assignees_label(@merge_request) %> +<%= reviewers_label(@merge_request) %> <%= @merge_request.description %> diff --git a/app/views/notify/new_merge_request_email.html.haml b/app/views/notify/new_merge_request_email.html.haml index 8fecdc6e8a6..8fdba10e7a1 100644 --- a/app/views/notify/new_merge_request_email.html.haml +++ b/app/views/notify/new_merge_request_email.html.haml @@ -1,5 +1,8 @@ %p.details - #{link_to @merge_request.author_name, user_url(@merge_request.author)} created a merge request: + = html_escape(_('%{userLinkStart}%{user}%{linkEnd} created a %{mrLinkStart}merge request%{linkEnd}:')) % {userLinkStart: "<a href=\"#{user_url(@merge_request.author)}\">".html_safe, + user: @merge_request.author_name, + mrLinkStart: "<a href=\"#{@target_url}\">".html_safe, + linkEnd: '</a>'.html_safe} %p .branch @@ -8,6 +11,8 @@ Author: #{@merge_request.author_name} .assignee = assignees_label(@merge_request) + .reviewer + = reviewers_label(@merge_request) .approvers = render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter diff --git a/app/views/notify/new_merge_request_email.text.erb b/app/views/notify/new_merge_request_email.text.erb index f4b0ed0f886..6148af4890e 100644 --- a/app/views/notify/new_merge_request_email.text.erb +++ b/app/views/notify/new_merge_request_email.text.erb @@ -3,6 +3,7 @@ <%= merge_path_description(@merge_request, 'to') %> <%= 'Author:' %> <%= @merge_request.author_name %> <%= assignees_label(@merge_request) if @merge_request.assignees.any? %> +<%= reviewers_label(@merge_request) if @merge_request.reviewers.any? %> <%= render_if_exists 'notify/merge_request_approvers', presenter: @mr_presenter %> <%= @merge_request.description %> diff --git a/app/views/peek/_bar.html.haml b/app/views/peek/_bar.html.haml index 9725f640be9..8914bfab336 100644 --- a/app/views/peek/_bar.html.haml +++ b/app/views/peek/_bar.html.haml @@ -2,5 +2,6 @@ #js-peek{ data: { env: Peek.env, request_id: peek_request_id, + stats_url: ENV.fetch('GITLAB_PERFORMANCE_BAR_STATS_URL', ''), peek_url: "#{peek_routes_path}/results" }, class: Peek.env } diff --git a/app/views/profiles/_email_settings.html.haml b/app/views/profiles/_email_settings.html.haml index 977116af88f..6691d20c8f7 100644 --- a/app/views/profiles/_email_settings.html.haml +++ b/app/views/profiles/_email_settings.html.haml @@ -8,7 +8,7 @@ = form.select :public_email, options_for_select(@user.public_verified_emails, selected: @user.public_email), { help: s_("Profiles|This email will be displayed on your public profile"), include_blank: s_("Profiles|Do not show on profile") }, control_class: 'select2 input-lg', disabled: email_change_disabled -- commit_email_link_url = help_page_path('user/profile/index', anchor: 'commit-email', target: '_blank') +- commit_email_link_url = help_page_path('user/profile/index', anchor: 'change-the-email-displayed-on-your-commits', target: '_blank') - 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.select :commit_email, options_for_select(commit_email_select_options(@user), selected: selected_commit_email(@user)), diff --git a/app/views/profiles/accounts/show.html.haml b/app/views/profiles/accounts/show.html.haml index e936cc133bd..1f09f3097ad 100644 --- a/app/views/profiles/accounts/show.html.haml +++ b/app/views/profiles/accounts/show.html.haml @@ -51,7 +51,7 @@ %p = s_('Profiles|Changing your username can have unintended side effects.') = succeed '.' do - = link_to s_('Profiles|Learn more'), help_page_path('user/profile/index', anchor: 'changing-your-username'), target: '_blank' + = link_to s_('Profiles|Learn more'), help_page_path('user/profile/index', anchor: 'change-your-username'), target: '_blank' .col-lg-8 - data = { initial_username: current_user.username, root_url: root_url, action_url: update_username_profile_path(format: :json) } #update-username{ data: data } diff --git a/app/views/profiles/notifications/_group_settings.html.haml b/app/views/profiles/notifications/_group_settings.html.haml index abbfbd995b6..82083af9ff1 100644 --- a/app/views/profiles/notifications/_group_settings.html.haml +++ b/app/views/profiles/notifications/_group_settings.html.haml @@ -9,11 +9,8 @@ = link_to group.name, group_path(group) .table-section.section-30.text-right - - if Feature.enabled?(:vue_notification_dropdown, default_enabled: :yaml) - - if setting - .js-vue-notification-dropdown{ data: { disabled: emails_disabled, dropdown_items: notification_dropdown_items(setting).to_json, notification_level: setting.level, group_id: group.id, container_class: 'gl-mr-3', show_label: "true" } } - - else - = render 'shared/notifications/button', notification_setting: setting, emails_disabled: emails_disabled + - if setting + .js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(setting).to_json, notification_level: setting.level, group_id: group.id, container_class: 'gl-mr-3', show_label: "true" } } .table-section.section-30 = form_for setting, url: profile_notifications_group_path(group), method: :put, html: { class: 'update-notifications gl-display-flex' } do |f| diff --git a/app/views/profiles/notifications/_project_settings.html.haml b/app/views/profiles/notifications/_project_settings.html.haml index 8cd552caa3d..e6953d1b32e 100644 --- a/app/views/profiles/notifications/_project_settings.html.haml +++ b/app/views/profiles/notifications/_project_settings.html.haml @@ -8,8 +8,5 @@ = link_to_project(project) .float-right - - if Feature.enabled?(:vue_notification_dropdown, default_enabled: :yaml) - - if setting - .js-vue-notification-dropdown{ data: { disabled: emails_disabled, dropdown_items: notification_dropdown_items(setting).to_json, notification_level: setting.level, project_id: project.id, container_class: 'gl-mr-3', show_label: "true" } } - - else - = render 'shared/notifications/button', notification_setting: setting, emails_disabled: emails_disabled + - if setting + .js-vue-notification-dropdown{ data: { disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(setting).to_json, notification_level: setting.level, project_id: project.id, container_class: 'gl-mr-3', show_label: "true" } } diff --git a/app/views/profiles/notifications/show.html.haml b/app/views/profiles/notifications/show.html.haml index cb0ada414ed..853188c563f 100644 --- a/app/views/profiles/notifications/show.html.haml +++ b/app/views/profiles/notifications/show.html.haml @@ -32,11 +32,8 @@ %br .clearfix .form-group.float-left.global-notification-setting - - if Feature.enabled?(:vue_notification_dropdown, default_enabled: :yaml) - - if @global_notification_setting - .js-vue-notification-dropdown{ data: { dropdown_items: notification_dropdown_items(@global_notification_setting).to_json, notification_level: @global_notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), show_label: 'true' } } - - else - = render 'shared/notifications/button', notification_setting: @global_notification_setting + - if @global_notification_setting + .js-vue-notification-dropdown{ data: { dropdown_items: notification_dropdown_items(@global_notification_setting).to_json, notification_level: @global_notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), show_label: 'true' } } .clearfix diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index cd76a67b692..535964028f4 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -88,6 +88,15 @@ = s_("Preferences|Show one file at a time on merge request's Changes tab") .form-text.text-muted = s_("Preferences|Instead of all the files changed, show only one file at a time. To switch between files, use the file browser.") + .form-group.form-check + = f.check_box :markdown_surround_selection, class: 'form-check-input' + = f.label :markdown_surround_selection, class: 'form-check-label' do + = s_('Preferences|Surround text selection when typing quotes or brackets') + .form-text.text-muted + - supported_characters = %w(" ' ` \( [ { < * _).map {|char| "<code>#{char}</code>" }.join(', ') + - msg = "Preferences|When you type in a description or comment box, selected text is surrounded by the corresponding character after typing one of the following characters: #{supported_characters}." + = s_(msg).html_safe + .form-group = f.label :tab_width, s_('Preferences|Tab width'), class: 'label-bold' = f.number_field :tab_width, diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 4689fd5272a..7995231c739 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -48,17 +48,17 @@ .col-lg-8 = f.fields_for :status, @user.status do |status_form| - emoji_button = button_tag type: :button, - class: 'js-toggle-emoji-menu emoji-menu-toggle-button gl-button btn has-tooltip', + class: 'js-toggle-emoji-menu emoji-menu-toggle-button btn gl-button btn-default has-tooltip', title: s_("Profiles|Add status emoji") do - if custom_emoji - = emoji_icon @user.status.emoji + = emoji_icon(@user.status.emoji, class: 'gl-mr-0!') %span#js-no-emoji-placeholder.no-emoji-placeholder{ class: ('hidden' if custom_emoji) } = sprite_icon('slight-smile', css_class: 'award-control-icon-neutral') = sprite_icon('smiley', css_class: 'award-control-icon-positive') = sprite_icon('smile', css_class: 'award-control-icon-super-positive') - reset_message_button = button_tag type: :button, id: 'js-clear-user-status-button', - class: 'clear-user-status gl-button btn has-tooltip', + class: 'clear-user-status btn gl-button btn-default has-tooltip', title: s_("Profiles|Clear status") do = sprite_icon("close") @@ -120,7 +120,7 @@ - private_profile_label = capture do = s_("Profiles|Don't display activity-related personal information on your profiles") = f.check_box :private_profile, label: private_profile_label, inline: true, wrapper_class: 'mr-0' - = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'private-profile') + = link_to sprite_icon('question-o'), help_page_path('user/profile/index.md', anchor: 'make-your-user-profile-page-private') %h5= s_("Profiles|Private contributions") = f.check_box :include_private_contributions, label: s_('Profiles|Include private contributions on my profile'), wrapper_class: 'mb-2', inline: true .help-block diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 0284c779cfa..3853f428447 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -9,7 +9,7 @@ %h4.gl-mt-0 = _('Register Two-Factor Authenticator') %p - = _('Use an one time password authenticator on your mobile device or computer to enable two-factor authentication (2FA).') + = _('Use a one-time password authenticator on your mobile device or computer to enable two-factor authentication (2FA).') .col-lg-8 - if current_user.two_factor_otp_enabled? %p diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 0d3049cd9a2..f5eea9aa9c6 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -3,11 +3,9 @@ - max_project_topic_length = 15 - emails_disabled = @project.emails_disabled? -= render 'projects/invite_members_modal', project: @project - .project-home-panel.js-show-on-project-root.gl-my-5{ class: [("empty-project" if empty_repo)] } - .row.gl-mb-3 - .home-panel-title-row.col-md-12.col-lg-6.d-flex + .gl-display-flex.gl-justify-content-space-between.gl-flex-wrap.gl-sm-flex-direction-column.gl-mb-3 + .home-panel-title-row.gl-display-flex .avatar-container.rect-avatar.s64.home-panel-avatar.gl-flex-shrink-0.gl-w-11.gl-h-11.gl-mr-3.float-none = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s64', width: 64, height: 64, itemprop: 'image') .d-flex.flex-column.flex-wrap.align-items-baseline @@ -43,16 +41,13 @@ = _("+ %{count} more") % { count: @project.count_of_extra_topics_not_shown } - .project-repo-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end + .project-repo-buttons.gl-display-flex.gl-justify-content-md-end.gl-align-items-start.gl-flex-wrap.gl-mt-5 - if current_user - .d-inline-flex - - if Feature.enabled?(:vue_notification_dropdown, @project, default_enabled: :yaml) - - if @notification_setting - .js-vue-notification-dropdown{ data: { button_size: "small", disabled: emails_disabled, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), project_id: @project.id, container_class: 'gl-mr-3 gl-mt-5 gl-vertical-align-top' } } - - else - = render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn-xs', dropdown_container_class: 'gl-mr-3', emails_disabled: emails_disabled + .gl-display-flex.gl-align-items-start.gl-mr-3 + - if @notification_setting + .js-vue-notification-dropdown{ data: { button_size: "small", disabled: emails_disabled.to_s, dropdown_items: notification_dropdown_items(@notification_setting).to_json, notification_level: @notification_setting.level, help_page_path: help_page_path('user/profile/notifications'), project_id: @project.id } } - .count-buttons.d-inline-flex + .count-buttons.gl-display-flex.gl-align-items-flex-start = render 'projects/buttons/star' = render 'projects/buttons/fork' diff --git a/app/views/projects/_invite_members_link.html.haml b/app/views/projects/_invite_members_link.html.haml deleted file mode 100644 index 95cfc75d955..00000000000 --- a/app/views/projects/_invite_members_link.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- return unless can_invite_members_for_project?(@project) - -%li - .js-invite-members-trigger{ data: { icon: 'plus', classes: 'gl-text-decoration-none! gl-shadow-none!', display_text: _('Invite team members') } } diff --git a/app/views/projects/_invite_members_modal.html.haml b/app/views/projects/_invite_members_modal.html.haml index b1bba5b59ca..00f823b9016 100644 --- a/app/views/projects/_invite_members_modal.html.haml +++ b/app/views/projects/_invite_members_modal.html.haml @@ -2,6 +2,6 @@ .js-invite-members-modal{ data: { id: project.id, name: project.name, is_project: 'true', - access_levels: GroupMember.access_level_roles.to_json, + access_levels: ProjectMember.access_level_roles.to_json, default_access_level: Gitlab::Access::GUEST, help_link: help_page_url('user/permissions') } } diff --git a/app/views/projects/_merge_request_merge_checks_settings.html.haml b/app/views/projects/_merge_request_merge_checks_settings.html.haml index b099eb6800e..694d192d079 100644 --- a/app/views/projects/_merge_request_merge_checks_settings.html.haml +++ b/app/views/projects/_merge_request_merge_checks_settings.html.haml @@ -2,24 +2,22 @@ .form-group %b= s_('ProjectSettings|Merge checks') - %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged') + %p.text-secondary= s_('ProjectSettings|These checks must pass before merge requests can be merged.') .form-check.mb-2.builds-feature = form.check_box :only_allow_merge_if_pipeline_succeeds, class: 'form-check-input' = form.label :only_allow_merge_if_pipeline_succeeds, class: 'form-check-label' do = s_('ProjectSettings|Pipelines must succeed') .text-secondary - = s_('ProjectSettings|Pipelines need to be configured to enable this feature.') - = link_to sprite_icon('question-o'), - help_page_path('ci/merge_request_pipelines/index.md', - anchor: 'pipelines-for-merge-requests'), - target: '_blank' + - configuring_pipelines_for_merge_requests_help_link_url = help_page_path('ci/merge_request_pipelines/index.md', anchor: 'configuring-pipelines-for-merge-requests') + - configuring_pipelines_for_merge_requests_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configuring_pipelines_for_merge_requests_help_link_url } + = s_('ProjectSettings|To enable this feature, configure pipelines. %{link_start}How to configure pipelines for merge requests?%{link_end}').html_safe % { link_start: configuring_pipelines_for_merge_requests_help_link_start, link_end: '</a>'.html_safe } .form-check.mb-2 .gl-pl-6 = form.check_box :allow_merge_on_skipped_pipeline, class: 'form-check-input' = form.label :allow_merge_on_skipped_pipeline, class: 'form-check-label' do = s_('ProjectSettings|Skipped pipelines are considered successful') .text-secondary - = s_('ProjectSettings|This introduces the risk of merging changes that will not pass the pipeline.') + = s_('ProjectSettings|Introduces the risk of merging changes that do not pass the pipeline.') .form-check.mb-2 = form.check_box :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-input', data: { qa_selector: 'allow_merge_if_all_discussions_are_resolved_checkbox' } = form.label :only_allow_merge_if_all_discussions_are_resolved, class: 'form-check-label' do 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 1be7f7bb418..f55d840e14b 100644 --- a/app/views/projects/_merge_request_merge_method_settings.html.haml +++ b/app/views/projects/_merge_request_merge_method_settings.html.haml @@ -2,32 +2,32 @@ .form-group %b= s_('ProjectSettings|Merge method') - %p.text-secondary= s_('ProjectSettings|This will dictate the commit history when you merge a merge request') + %p.text-secondary= s_('ProjectSettings|Determine what happens to the commit history when you merge a merge request.') .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') + = 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') + = s_('ProjectSettings|Every merge creates a merge commit.') %br - = s_('ProjectSettings|Fast-forward merges only') + = s_('ProjectSettings|Fast-forward merges only.') %br - = s_('ProjectSettings|When conflicts arise the user is given the option to rebase') + = s_('ProjectSettings|When there is a merge conflict, the user is given the option to rebase.') .form-check.mb-2 - = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff form-check-input" + = form.radio_button :merge_method, :ff, class: "js-merge-method-radio form-check-input", data: { qa_selector: 'merge_ff_radio_button' } = 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') + = s_('ProjectSettings|No merge commits are created.') %br - = s_('ProjectSettings|Fast-forward merges only') + = s_('ProjectSettings|Fast-forward merges only.') %br - = s_('ProjectSettings|When conflicts arise the user is given the option to rebase') + = s_('ProjectSettings|When there is a merge conflict, the user is given the option to rebase.') diff --git a/app/views/projects/_merge_request_merge_options_settings.html.haml b/app/views/projects/_merge_request_merge_options_settings.html.haml index 80dabeceeb0..20f3933d0a8 100644 --- a/app/views/projects/_merge_request_merge_options_settings.html.haml +++ b/app/views/projects/_merge_request_merge_options_settings.html.haml @@ -2,7 +2,7 @@ .form-group#project-merge-options{ data: { project_full_path: @project.full_path } } %b= s_('ProjectSettings|Merge options') - %p.text-secondary= s_('ProjectSettings|Additional merge request capabilities that influence how and when merges will be performed') + %p.text-secondary= s_('ProjectSettings|Additional settings that influence how and when merges are done.') = render_if_exists 'projects/merge_pipelines_settings', form: form = render_if_exists 'projects/merge_trains_settings', form: form .form-check.mb-2 @@ -12,10 +12,10 @@ .form-check.mb-2 = form.check_box :printing_merge_request_link_enabled, class: 'form-check-input' = form.label :printing_merge_request_link_enabled, class: 'form-check-label' do - = s_('ProjectSettings|Show link to create/view merge request when pushing from the command line') + = s_('ProjectSettings|Show link to create or view a merge request when pushing from the command line') .form-check.mb-2 = form.check_box :remove_source_branch_after_merge, class: 'form-check-input' = form.label :remove_source_branch_after_merge, class: 'form-check-label' do - = s_("ProjectSettings|Enable 'Delete source branch' option by default") + = s_('ProjectSettings|Enable "Delete source branch" option by default') .descr.text-secondary - = s_('ProjectSettings|Existing merge requests and protected branches are not affected') + = s_('ProjectSettings|Existing merge requests and protected branches are not affected.') diff --git a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml b/app/views/projects/_merge_request_merge_suggestions_settings.html.haml index 31a85a204be..12ab905479a 100644 --- a/app/views/projects/_merge_request_merge_suggestions_settings.html.haml +++ b/app/views/projects/_merge_request_merge_suggestions_settings.html.haml @@ -3,15 +3,13 @@ .form-group %b= s_('ProjectSettings|Merge suggestions') %p.text-secondary - = s_('ProjectSettings|The commit message used to apply merge request suggestions') - = link_to sprite_icon('question-o'), - help_page_path('user/discussions/index.md', - anchor: 'configure-the-commit-message-for-applied-suggestions'), - target: '_blank' + - configure_the_commit_message_for_applied_suggestions_help_link_url = help_page_path('user/discussions/index.md', anchor: 'configure-the-commit-message-for-applied-suggestions') + - configure_the_commit_message_for_applied_suggestions_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_commit_message_for_applied_suggestions_help_link_url } + = s_('ProjectSettings|The commit message used when applying merge request suggestions. %{link_start}Learn more about suggestions.%{link_end}').html_safe % { link_start: configure_the_commit_message_for_applied_suggestions_help_link_start, link_end: '</a>'.html_safe } .mb-2 - = form.text_field :suggestion_commit_message, class: 'form-control gl-form-input mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE + = form.text_field :suggestion_commit_message, class: 'form-control mb-2', placeholder: Gitlab::Suggestions::CommitMessage::DEFAULT_SUGGESTION_COMMIT_MESSAGE %p.form-text.text-muted - = s_('ProjectSettings|The variables GitLab supports:') + = s_('ProjectSettings|Supported variables:') - Gitlab::Suggestions::CommitMessage::PLACEHOLDERS.keys.each do |placeholder| %code = "%{#{placeholder}}".html_safe 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 a5dbfeb16d8..61ffd4814f1 100644 --- a/app/views/projects/_merge_request_squash_options_settings.html.haml +++ b/app/views/projects/_merge_request_squash_options_settings.html.haml @@ -4,7 +4,7 @@ .form-group %b= s_('ProjectSettings|Squash commits when merging') %p.text-secondary - = s_('ProjectSettings|Set the default behavior and availability of this option in merge requests. Changes made are also applied to existing merge requests.') + = 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' diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 41992ee5ea9..8b1bf37ff10 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -8,7 +8,7 @@ .form-group.project-name.col-sm-12 = f.label :name, class: 'label-bold' do %span= _("Project name") - = f.text_field :name, placeholder: "My awesome project", class: "form-control input-lg", autofocus: true, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_name", track_value: "" } + = f.text_field :name, placeholder: "My awesome project", class: "form-control input-lg", autofocus: true, data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "project_name", track_value: "" }, required: true, aria: { required: true } .form-group.project-path.col-sm-6 = f.label :namespace_id, class: 'label-bold' do %span= s_("Project URL") @@ -33,7 +33,7 @@ .form-group.project-path.col-sm-6 = f.label :path, class: 'label-bold' do %span= _("Project slug") - = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", required: true + = f.text_field :path, placeholder: "my-awesome-project", class: "form-control", required: true, aria: { required: true } - if current_user.can_create_group? .form-text.text-muted - link_start_group_path = '<a href="%{path}">' % { path: new_group_path } @@ -55,7 +55,7 @@ %div{ :class => "col-sm-12" } .form-check - experiment(:new_project_readme, actor: current_user) do |e| - = check_box_tag 'project[initialize_with_readme]', '1', e.run, class: 'form-check-input qa-initialize-with-readme-checkbox', data: { track_label: "#{track_label}", track_event: "activate_form_input", track_property: "init_with_readme", track_value: "" } + = check_box_tag 'project[initialize_with_readme]', '1', e.run, class: 'form-check-input', data: { qa_selector: "initialize_with_readme_checkbox", track_label: "#{track_label}", track_event: "activate_form_input", track_property: "init_with_readme", track_value: "" } = label_tag 'project[initialize_with_readme]', class: 'form-check-label' do .option-title %strong= s_('ProjectsNew|Initialize repository with a README') diff --git a/app/views/projects/_new_project_push_tip.html.haml b/app/views/projects/_new_project_push_tip.html.haml deleted file mode 100644 index a63b4bed9de..00000000000 --- a/app/views/projects/_new_project_push_tip.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -.push-to-create-popover - %p - = label_tag(:push_to_create_tip, _("Private projects can be created in your personal namespace with:"), class: "weight-normal") - - %p.input-group.project-tip-command - %span - = text_field_tag :push_to_create_tip, push_to_create_project_command, class: "js-select-on-focus form-control monospace", readonly: true, aria: { label: _("Push project from command line") } - %span.input-group-append - = clipboard_button(text: push_to_create_project_command, title: _("Copy command"), class: 'input-group-text', placement: "right") - %p - = link_to("What does this command do?", help_page_path("user/project/working_with_projects", anchor: "push-to-create-a-new-project"), target: "_blank") diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index 0998cd480d3..53b9e7f3d65 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -1,5 +1,5 @@ - expanded = expanded_by_default? -%section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded) } +%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.js-settings-toggle diff --git a/app/views/projects/artifacts/browse.html.haml b/app/views/projects/artifacts/browse.html.haml index b363f0d4325..3ebac785d55 100644 --- a/app/views/projects/artifacts/browse.html.haml +++ b/app/views/projects/artifacts/browse.html.haml @@ -18,7 +18,7 @@ .tree-controls< = link_to download_project_job_artifacts_path(@project, @build), rel: 'nofollow', download: '', class: 'gl-button btn btn-default download' do - = sprite_icon('download') + = sprite_icon('download', css_class: 'gl-mr-2') Download artifacts archive .tree-content-holder diff --git a/app/views/projects/blame/_age_map_legend.html.haml b/app/views/projects/blame/_age_map_legend.html.haml deleted file mode 100644 index 533dc20ffb3..00000000000 --- a/app/views/projects/blame/_age_map_legend.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%span.left-label Newer -%span.legend-box.legend-box-0 -%span.legend-box.legend-box-1 -%span.legend-box.legend-box-2 -%span.legend-box.legend-box-3 -%span.legend-box.legend-box-4 -%span.legend-box.legend-box-5 -%span.legend-box.legend-box-6 -%span.legend-box.legend-box-7 -%span.legend-box.legend-box-8 -%span.legend-box.legend-box-9 -%span.right-label Older diff --git a/app/views/projects/blame/_blame_group.html.haml b/app/views/projects/blame/_blame_group.html.haml deleted file mode 100644 index e9967814833..00000000000 --- a/app/views/projects/blame/_blame_group.html.haml +++ /dev/null @@ -1,26 +0,0 @@ -%tr - %td.blame-commit{ class: commit_data.age_map_class } - .commit - = commit_data.author_avatar - .commit-row-title - %span.item-title.str-truncated-100 - = commit_data.commit_link - %span - = commit_data.project_blame_link - - .light - = commit_data.commit_author_link - = _('committed') - #{commit_data.time_ago_tooltip} - %td.line-numbers - - line_count = blame_group[:lines].count - - (current_line...(current_line + line_count)).each do |i| - %a.diff-line-num{ href: "#L#{i}", id: "L#{i}", 'data-line-number' => i } - = link_icon - = i - \ - %td.lines - %pre.code.highlight - %code - - blame_group[:lines].each do |line| - #{line} diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 2f3d0660caa..cba63d5e6d6 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -6,18 +6,56 @@ .file-holder = render "projects/blob/header", blob: @blob, blame: true + .file-blame-legend - = render 'age_map_legend' + %span.left-label Newer + %span.legend-box.legend-box-0 + %span.legend-box.legend-box-1 + %span.legend-box.legend-box-2 + %span.legend-box.legend-box-3 + %span.legend-box.legend-box-4 + %span.legend-box.legend-box-5 + %span.legend-box.legend-box-6 + %span.legend-box.legend-box-7 + %span.legend-box.legend-box-8 + %span.legend-box.legend-box-9 + %span.right-label Older + .table-responsive.file-content.blame.code.js-syntax-highlight %table - current_line = 1 - @blame.groups.each do |blame_group| - commit_data = @blame.commit_data(blame_group[:commit]) + - line_count = blame_group[:lines].count + + %tr + %td.blame-commit{ class: commit_data.age_map_class } + .commit + = commit_data.author_avatar + + .commit-row-title + %span.item-title.str-truncated-100 + = commit_data.commit_link + %span + = commit_data.project_blame_link + + + .light + = commit_data.commit_author_link + = _('committed') + #{commit_data.time_ago_tooltip} + + %td.line-numbers + - (current_line...(current_line + line_count)).each do |i| + %a.diff-line-num.gl-justify-content-end{ href: "#L#{i}", id: "L#{i}", 'data-line-number' => i, class: "gl-display-flex!" } + = link_icon + = i + \ - = render 'blame_group', - blame_group: blame_group, - current_line: current_line, - link_icon: link_icon, - commit_data: commit_data + %td.lines + %pre.code.highlight + %code + - blame_group[:lines].each do |line| + #{line} - - current_line += blame_group[:lines].count + - current_line += line_count diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index 70a4202a5d0..717c03ad27d 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -11,7 +11,7 @@ = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-metrics-dashboard-selector qa-metrics-dashboard-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: metrics_dashboard_ymls(@project) } } ) #gitlab-ci-yml-selector.gitlab-ci-yml-selector.js-gitlab-ci-yml-selector-wrap.js-template-selector-wrap.hidden = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-gitlab-ci-yml-selector qa-gitlab-ci-yml-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_ymls(@project) } } ) - - if experiment_enabled?(:ci_syntax_templates, subject: current_user) + - if experiment_enabled?(:ci_syntax_templates_b, subject: current_user) && @project.namespace.recent? .gitlab-ci-syntax-yml-selector.js-gitlab-ci-syntax-yml-selector-wrap.js-template-selector-wrap.hidden = dropdown_tag(_("Learn CI/CD syntax"), options: { toggle_class: 'js-gitlab-ci-syntax-yml-selector qa-gitlab-ci-syntax-yml-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: gitlab_ci_syntax_ymls(@project) } } ) .dockerfile-selector.js-dockerfile-selector-wrap.js-template-selector-wrap.hidden diff --git a/app/views/projects/blob/_upload.html.haml b/app/views/projects/blob/_upload.html.haml index f400c7de5eb..b68c75701b9 100644 --- a/app/views/projects/blob/_upload.html.haml +++ b/app/views/projects/blob/_upload.html.haml @@ -17,7 +17,7 @@ %br .dropzone-alerts.gl-alert.gl-alert-danger.gl-mb-5.data{ style: "display:none" } - = render 'shared/new_commit_form', placeholder: placeholder + = render 'shared/new_commit_form', placeholder: placeholder, ref: local_assigns[:ref] .form-actions = button_tag class: 'btn gl-button btn-success btn-upload-file', id: 'submit-all', type: 'button' do diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index fcf073e1e09..6f86ccd7824 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -35,8 +35,8 @@ .gl-display-inline-flex.gl-vertical-align-middle.gl-mr-5 %svg.s24 - - if merge_project && create_mr_button?(@repository.root_ref, branch.name) - = link_to create_mr_path(@repository.root_ref, branch.name), class: 'gl-button btn btn-default' do + - if merge_project && create_mr_button?(from: @repository.root_ref, to: branch.name, source_project: @project, target_project: @project) + = link_to create_mr_path(from: @repository.root_ref, to: branch.name, source_project: @project, target_project: @project), class: 'gl-button btn btn-default' do = _('Merge request') - if branch.name != @repository.root_ref diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml index 0ec47744fc9..ee195e69a98 100644 --- a/app/views/projects/buttons/_clone.html.haml +++ b/app/views/projects/buttons/_clone.html.haml @@ -2,7 +2,7 @@ - dropdown_class = local_assigns.fetch(:dropdown_class, '') .git-clone-holder.js-git-clone-holder - %a#clone-dropdown.gl-button.btn.btn-info.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } } + %a#clone-dropdown.gl-button.btn.btn-confirm.clone-dropdown-btn.qa-clone-dropdown{ href: '#', data: { toggle: 'dropdown' } } %span.gl-mr-2.js-clone-dropdown-label = _('Clone') = sprite_icon("chevron-down", css_class: "icon") @@ -11,19 +11,19 @@ %li{ class: 'gl-px-4!' } %label.label-bold = _('Clone with SSH') - .input-group + .input-group.btn-group = text_field_tag :ssh_project_clone, project.ssh_url_to_repo, class: "js-select-on-focus form-control qa-ssh-clone-url", readonly: true, aria: { label: _('Repository clone URL') } .input-group-append - = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text btn-default btn-clipboard") + = clipboard_button(target: '#ssh_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' - if http_enabled? %li.pt-2{ class: 'gl-px-4!' } %label.label-bold = _('Clone with %{http_label}') % { http_label: gitlab_config.protocol.upcase } - .input-group + .input-group.btn-group = text_field_tag :http_project_clone, project.http_url_to_repo, class: "js-select-on-focus form-control qa-http-clone-url", readonly: true, aria: { label: _('Repository clone URL') } .input-group-append - = clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text btn-default btn-clipboard") + = clipboard_button(target: '#http_project_clone', title: _("Copy URL"), class: "input-group-text gl-button btn btn-icon btn-default") = render_if_exists 'projects/buttons/geo' %li.divider.mt-2 %li.pt-2.gl-new-dropdown-item diff --git a/app/views/projects/buttons/_fork.html.haml b/app/views/projects/buttons/_fork.html.haml index fad168da71e..e4ec2e44298 100644 --- a/app/views/projects/buttons/_fork.html.haml +++ b/app/views/projects/buttons/_fork.html.haml @@ -1,17 +1,16 @@ - unless @project.empty_repo? - if current_user && can?(current_user, :fork_project, @project) - .count-badge.d-inline-flex.align-item-stretch.gl-mr-3 + .count-badge.btn-group - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2 - = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'btn btn-default has-tooltip count-badge-button d-flex align-items-center fork-btn' do + = link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: s_('ProjectOverview|Go to your fork'), class: 'gl-button btn btn-default btn-sm has-tooltip fork-btn' do = sprite_icon('fork', css_class: 'icon') %span= s_('ProjectOverview|Fork') - else - can_create_fork = current_user.can?(:create_fork) - disabled_fork_tooltip = s_('ProjectOverview|You have reached your project limit') - %span.has-tooltip{ title: (disabled_fork_tooltip unless can_create_fork) } - = link_to new_project_fork_path(@project), class: "btn btn-default btn-xs count-badge-button d-flex align-items-center fork-btn #{' disabled' unless can_create_fork }", 'aria-label' => (disabled_fork_tooltip unless can_create_fork) do + %span.btn-group.has-tooltip{ title: (disabled_fork_tooltip unless can_create_fork) } + = link_to new_project_fork_path(@project), class: "gl-button btn btn-default btn-sm fork-btn #{' disabled' unless can_create_fork }", 'aria-label' => (disabled_fork_tooltip unless can_create_fork) do = sprite_icon('fork', css_class: 'icon') %span= s_('ProjectOverview|Fork') - %span.fork-count.count-badge-count.d-flex.align-items-center - = link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Fork'), s_('ProjectOverview|Forks'), @project.forks_count), class: 'count' do - = @project.forks_count + = link_to project_forks_path(@project), title: n_(s_('ProjectOverview|Forks'), s_('ProjectOverview|Forks'), @project.forks_count), class: 'gl-button btn btn-default btn-sm count has-tooltip' do + = @project.forks_count diff --git a/app/views/projects/buttons/_star.html.haml b/app/views/projects/buttons/_star.html.haml index 690f0fe10f7..00d518450e9 100644 --- a/app/views/projects/buttons/_star.html.haml +++ b/app/views/projects/buttons/_star.html.haml @@ -1,21 +1,19 @@ - if current_user - .count-badge.d-inline-flex.align-item-stretch.gl-mr-3 - %button.count-badge-button.btn.btn-default.btn-xs.d-flex.align-items-center.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } } + .count-badge.d-inline-flex.align-item-stretch.gl-mr-3.btn-group + %button.gl-button.btn.btn-default.btn-sm.star-btn.toggle-star{ type: "button", data: { endpoint: toggle_star_project_path(@project, :json) } } - if current_user.starred?(@project) = sprite_icon('star', css_class: 'icon') %span.starred= s_('ProjectOverview|Unstar') - else = sprite_icon('star-o', css_class: 'icon') %span= s_('ProjectOverview|Star') - %span.star-count.count-badge-count.d-flex.align-items-center - = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do - = @project.star_count + = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm star-count count' do + = @project.star_count - else - .count-badge.d-inline-flex.align-item-stretch.gl-mr-3 - = link_to new_user_session_path, class: 'btn btn-default btn-xs has-tooltip count-badge-button d-flex align-items-center star-btn', title: s_('ProjectOverview|You must sign in to star a project') do + .count-badge.d-inline-flex.align-item-stretch.gl-mr-3.btn-group + = link_to new_user_session_path, class: 'gl-button btn btn-default btn-sm has-tooltip star-btn', title: s_('ProjectOverview|You must sign in to star a project') do = sprite_icon('star-o', css_class: 'icon') %span= s_('ProjectOverview|Star') - %span.star-count.count-badge-count.d-flex.align-items-center - = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'count' do - = @project.star_count + = link_to project_starrers_path(@project), title: n_(s_('ProjectOverview|Starrer'), s_('ProjectOverview|Starrers'), @project.star_count), class: 'gl-button btn btn-default btn-sm star-count count' do + = @project.star_count diff --git a/app/views/projects/ci/pipeline_editor/show.html.haml b/app/views/projects/ci/pipeline_editor/show.html.haml index 10aed15f380..3e10cf49b66 100644 --- a/app/views/projects/ci/pipeline_editor/show.html.haml +++ b/app/views/projects/ci/pipeline_editor/show.html.haml @@ -1,12 +1,14 @@ - page_title s_('Pipelines|Pipeline Editor') #js-pipeline-editor{ data: { "ci-config-path": @project.ci_config_path_or_default, + "commit-sha" => @project.commit ? @project.commit.sha : '', + "default-branch" => @project.default_branch, + "empty-state-illustration-path" => image_path('illustrations/empty-state/empty-dag-md.svg'), + "initial-branch-name": params[:branch_name], + "lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'), + "new-merge-request-path" => namespace_project_new_merge_request_path, "project-path" => @project.path, "project-full-path" => @project.full_path, "project-namespace" => @project.namespace.full_path, - "default-branch" => @project.default_branch, - "commit-sha" => @project.commit ? @project.commit.sha : '', - "new-merge-request-path" => namespace_project_new_merge_request_path, - "lint-help-page-path" => help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax'), "yml-help-page-path" => help_page_path('ci/yaml/README'), } } diff --git a/app/views/projects/cleanup/_show.html.haml b/app/views/projects/cleanup/_show.html.haml index e693082461f..b0112be0e3d 100644 --- a/app/views/projects/cleanup/_show.html.haml +++ b/app/views/projects/cleanup/_show.html.haml @@ -2,8 +2,8 @@ %section.settings.no-animate#cleanup{ class: ('expanded' if expanded) } .settings-header - %h4= _('Repository cleanup') - %button.btn.js-settings-toggle + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Repository cleanup') + %button.btn.gl-button.btn-default.js-settings-toggle = expanded ? _('Collapse') : _('Expand') %p - link_url = 'https://github.com/newren/git-filter-repo' diff --git a/app/views/projects/commit/_change.html.haml b/app/views/projects/commit/_change.html.haml index bda8ec39e81..81a77489075 100644 --- a/app/views/projects/commit/_change.html.haml +++ b/app/views/projects/commit/_change.html.haml @@ -18,7 +18,10 @@ .js-cherry-pick-commit-modal{ data: { title: title, endpoint: cherry_pick_namespace_project_commit_path(commit, namespace_id: @project.namespace.full_path, project_id: @project), branch: @project.default_branch, + target_project_id: @project.id, + target_project_name: @project.full_path, push_code: can?(current_user, :push_code, @project).to_s, branch_collaboration: @project.branch_allows_collaboration?(current_user, selected_branch).to_s, existing_branch: ERB::Util.html_escape(selected_branch), - branches_endpoint: project_branches_path(@project) } } + branches_endpoint: refs_project_path(@project), + projects: cherry_pick_projects_data(@project).to_json } } diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 53b9fd733ec..974393b893b 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -74,22 +74,25 @@ %span.commit-info.merge-requests{ 'data-project-commit-path' => merge_requests_project_commit_path(@project, @commit.id, format: :json) } .spinner.vertical-align-middle - - last_pipeline = @commit.last_pipeline - - if can?(current_user, :read_pipeline, last_pipeline) + - if can?(current_user, :read_pipeline, @last_pipeline) .well-segment.pipeline-info .status-icon-container - = link_to project_pipeline_path(@project, last_pipeline.id), class: "ci-status-icon-#{last_pipeline.status}" do - = ci_icon_for_status(last_pipeline.status) + = link_to project_pipeline_path(@project, @last_pipeline.id), class: "ci-status-icon-#{@last_pipeline.status}" do + = ci_icon_for_status(@last_pipeline.status) #{ _('Pipeline') } - = link_to "##{last_pipeline.id}", project_pipeline_path(@project, last_pipeline.id) - = ci_label_for_status(last_pipeline.status) - - if last_pipeline.stages_count.nonzero? - #{ n_(s_('Pipeline|with stage'), s_('Pipeline|with stages'), last_pipeline.stages_count) } + = link_to "##{@last_pipeline.id}", project_pipeline_path(@project, @last_pipeline.id) + = ci_label_for_status(@last_pipeline.status) + - if @last_pipeline.stages_count.nonzero? + #{ n_(s_('Pipeline|with stage'), s_('Pipeline|with stages'), @last_pipeline.stages_count) } .mr-widget-pipeline-graph - = render 'shared/mini_pipeline_graph', pipeline: last_pipeline, klass: 'js-commit-pipeline-graph' - - if last_pipeline.duration + - if ::Gitlab::Ci::Features.ci_commit_pipeline_mini_graph_vue_enabled?(@project) + .stage-cell + .js-commit-pipeline-mini-graph{ data: { stages: @last_pipeline_stages.to_json.html_safe } } + - else + = render 'shared/mini_pipeline_graph', pipeline: @last_pipeline, klass: 'js-commit-pipeline-graph' + - if @last_pipeline.duration in - = time_interval_in_words last_pipeline.duration + = time_interval_in_words @last_pipeline.duration - if @merge_request .well-segment diff --git a/app/views/projects/commit/_pipelines_list.haml b/app/views/projects/commit/_pipelines_list.haml index 81c354f1c8f..7f52e6ed7eb 100644 --- a/app/views/projects/commit/_pipelines_list.haml +++ b/app/views/projects/commit/_pipelines_list.haml @@ -1,8 +1,6 @@ - disable_initialization = local_assigns.fetch(:disable_initialization, false) #commit-pipeline-table-view{ data: { disable_initialization: disable_initialization, endpoint: endpoint, - "help-page-path" => help_page_path('ci/quick_start/README'), - "help-auto-devops-path" => help_page_path('topics/autodevops/index.md'), "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), "project-id": @project.id, diff --git a/app/views/projects/commits/_commit.html.haml b/app/views/projects/commits/_commit.html.haml index c708efe7c7b..ceb312450be 100644 --- a/app/views/projects/commits/_commit.html.haml +++ b/app/views/projects/commits/_commit.html.haml @@ -60,5 +60,5 @@ .commit-sha-group.btn-group.d-none.d-sm-flex .label.label-monospace.monospace = commit.short_id - = clipboard_button(text: commit.id, title: _("Copy commit SHA"), class: "gl-button btn btn-default", container: "body") + = clipboard_button(text: commit.id, title: _("Copy commit SHA"), class: "gl-button btn btn-default btn-icon", container: "body") = link_to_browse_code(project, commit) diff --git a/app/views/projects/commits/show.html.haml b/app/views/projects/commits/show.html.haml index 802df664241..463984a13a2 100644 --- a/app/views/projects/commits/show.html.haml +++ b/app/views/projects/commits/show.html.haml @@ -18,9 +18,9 @@ - if @merge_request.present? .control.d-none.d-md-block = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'btn gl-button' - - elsif create_mr_button?(@repository.root_ref, @ref) + - elsif create_mr_button?(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project) .control.d-none.d-md-block - = link_to _("Create merge request"), create_mr_path(@repository.root_ref, @ref), class: 'btn gl-button btn-success' + = link_to _("Create merge request"), create_mr_path(from: @repository.root_ref, to: @ref, source_project: @project, target_project: @project), class: 'btn gl-button btn-success' .control = form_tag(project_commits_path(@project, @id), method: :get, class: 'commits-search-form js-signature-container', data: { 'signatures-path' => namespace_project_signatures_path }) do diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml deleted file mode 100644 index 17134613b17..00000000000 --- a/app/views/projects/compare/_form.html.haml +++ /dev/null @@ -1,28 +0,0 @@ -= form_tag project_compare_index_path(@project), method: :post, class: 'form-inline js-requires-input js-signature-container', data: { 'signatures-path' => signatures_namespace_project_compare_index_path } do - .form-group.dropdown.compare-form-group.to.js-compare-to-dropdown - .input-group.inline-input-group - %span.input-group-prepend - .input-group-text - = s_("CompareBranches|Source") - = hidden_field_tag :to, params[:to] - = button_tag type: 'button', title: params[:to], class: "btn gl-button form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do - .dropdown-toggle-text.str-truncated.monospace.float-left= params[:to] || _("Select branch/tag") - = sprite_icon('chevron-down', css_class: 'float-right') - = render 'shared/ref_dropdown' - .compare-ellipsis.inline ... - .form-group.dropdown.compare-form-group.from.js-compare-from-dropdown - .input-group.inline-input-group - %span.input-group-prepend - .input-group-text - = s_("CompareBranches|Target") - = hidden_field_tag :from, params[:from] - = button_tag type: 'button', title: params[:from], class: "btn gl-button form-control compare-dropdown-toggle js-compare-dropdown has-tooltip", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do - .dropdown-toggle-text.str-truncated.monospace.float-left= params[:from] || _("Select branch/tag") - = sprite_icon('chevron-down', css_class: 'float-right') - = render 'shared/ref_dropdown' - - = button_tag s_("CompareBranches|Compare"), class: "btn gl-button btn-success commits-compare-btn" - - if @merge_request.present? - = link_to _("View open merge request"), project_merge_request_path(@project, @merge_request), class: 'gl-ml-3 btn' - - elsif create_mr_button? - = link_to _("Create merge request"), create_mr_path, class: 'gl-ml-3 btn gl-button' diff --git a/app/views/projects/compare/index.html.haml b/app/views/projects/compare/index.html.haml index 3f9aa24a569..e3ab184ec6f 100644 --- a/app/views/projects/compare/index.html.haml +++ b/app/views/projects/compare/index.html.haml @@ -13,8 +13,4 @@ = html_escape(_("Changes are shown as if the %{b_open}source%{b_close} revision was being merged into the %{b_open}target%{b_close} revision.")) % { b_open: '<b>'.html_safe, b_close: '</b>'.html_safe } .prepend-top-20 - #js-compare-selector{ data: { project_compare_index_path: project_compare_index_path(@project), - refs_project_path: refs_project_path(@project), - params_from: params[:from], params_to: params[:to], - project_merge_request_path: @merge_request.present? ? project_merge_request_path(@project, @merge_request) : '', - create_mr_path: create_mr_button? ? create_mr_path : '' } } + #js-compare-selector{ data: project_compare_selector_data(@project, @merge_request, params) } diff --git a/app/views/projects/compare/show.html.haml b/app/views/projects/compare/show.html.haml index 51cf95dc84b..9e9c271e7be 100644 --- a/app/views/projects/compare/show.html.haml +++ b/app/views/projects/compare/show.html.haml @@ -2,7 +2,8 @@ - page_title "#{params[:from]}...#{params[:to]}" .sub-header-block.no-bottom-space - = render "form" + .js-signature-container{ data: { 'signatures-path' => signatures_namespace_project_compare_index_path } } + #js-compare-selector{ data: project_compare_selector_data(@project, @merge_request, params) } - if @commits.present? = render "projects/commits/commit_list" diff --git a/app/views/projects/cycle_analytics/_empty_stage.html.haml b/app/views/projects/cycle_analytics/_empty_stage.html.haml deleted file mode 100644 index cdad0bc7231..00000000000 --- a/app/views/projects/cycle_analytics/_empty_stage.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -.empty-stage-container - .empty-stage - .icon-no-data - = custom_icon ('icon_no_data') - %h4 {{ __('We don\'t have enough data to show this stage.') }} - %p - {{currentStage.emptyStageText}} diff --git a/app/views/projects/cycle_analytics/_no_access.html.haml b/app/views/projects/cycle_analytics/_no_access.html.haml deleted file mode 100644 index c3eda398234..00000000000 --- a/app/views/projects/cycle_analytics/_no_access.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -.no-access-stage-container - .no-access-stage - .icon-lock - = custom_icon ('icon_lock') - %h4 {{ __('You need permission.') }} - %p - {{ __('Want to see the data? Please ask an administrator for access.') }} diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index fc3710d3609..71730da0595 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,66 +1,6 @@ - page_title _("Value Stream Analytics") - add_page_specific_style 'page_bundles/cycle_analytics' +- svgs = { empty_state_svg_path: image_path("illustrations/analytics/cycle-analytics-empty-chart.svg"), no_data_svg_path: image_path("illustrations/analytics/cycle-analytics-empty-chart.svg"), no_access_svg_path: image_path("illustrations/analytics/no-access.svg") } +- initial_data = { request_path: project_cycle_analytics_path(@project) }.merge!(svgs) -#cycle-analytics{ "v-cloak" => "true", data: { request_path: project_cycle_analytics_path(@project) } } - %gl-loading-icon{ "v-show" => "isLoading", "size" => "lg" } - .wrapper{ "v-show" => "!isLoading && !hasError" } - .card - .card-header - {{ __('Recent Project Activity') }} - .d-flex.justify-content-between - .flex-grow.text-center{ "v-for" => "item in state.summary" } - %h3.header {{ item.value }} - %p.text {{ item.title }} - .flex-grow.align-self-center.text-center - .dropdown.inline.js-ca-dropdown - %button.dropdown-menu-toggle{ "data-toggle" => "dropdown", :type => "button" } - %span.dropdown-label {{ n__('Last %d day', 'Last %d days', 30) }} - = sprite_icon("chevron-down", css_class: "dropdown-menu-toggle-icon gl-top-3") - %ul.dropdown-menu.dropdown-menu-right - %li - %a{ "href" => "#", "data-value" => "7" } - {{ n__('Last %d day', 'Last %d days', 7) }} - %li - %a{ "href" => "#", "data-value" => "30" } - {{ n__('Last %d day', 'Last %d days', 30) }} - %li - %a{ "href" => "#", "data-value" => "90" } - {{ n__('Last %d day', 'Last %d days', 90) }} - .stage-panel-container - .card.stage-panel - .card-header.border-bottom-0 - %nav.col-headers - %ul - %li.stage-header.pl-5 - %span.stage-name.font-weight-bold - {{ s__('ProjectLifecycle|Stage') }} - %span.has-tooltip{ "data-placement" => "top", title: _("The phase of the development lifecycle."), "aria-hidden" => "true" } - = sprite_icon('question-o', css_class: 'gl-text-gray-500') - %li.median-header - %span.stage-name.font-weight-bold - {{ __('Median') }} - %span.has-tooltip{ "data-placement" => "top", title: _("The value lying at the midpoint of a series of observed values. E.g., between 3, 5, 9, the median is 5. Between 3, 5, 7, 8, the median is (5+7)/2 = 6."), "aria-hidden" => "true" } - = sprite_icon('question-o', css_class: 'gl-text-gray-500') - %li.event-header.pl-3 - %span.stage-name.font-weight-bold{ "v-if" => "currentStage && currentStage.legend" } - {{ currentStage ? __(currentStage.legend) : __('Related Issues') }} - %span.has-tooltip{ "data-placement" => "top", title: _("The collection of events added to the data gathered for that stage."), "aria-hidden" => "true" } - = sprite_icon('question-o', css_class: 'gl-text-gray-500') - %li.total-time-header.pr-5.text-right - %span.stage-name.font-weight-bold - {{ __('Time') }} - %span.has-tooltip{ "data-placement" => "top", title: _("The time taken by each data entry gathered by that stage."), "aria-hidden" => "true" } - = sprite_icon('question-o', css_class: 'gl-text-gray-500') - .stage-panel-body - %nav.stage-nav - %ul - %stage-nav-item{ "v-for" => "stage in state.stages", ":key" => '`ca-stage-title-${stage.title}`', '@select' => 'selectStage(stage)', ":title" => "stage.title", ":is-user-allowed" => "stage.isUserAllowed", ":value" => "stage.value", ":is-active" => "stage.active" } - .section.stage-events.overflow-auto - %gl-loading-icon{ "v-show" => "isLoadingStage", "size" => "lg" } - %template{ "v-if" => "currentStage && !currentStage.isUserAllowed" } - = render partial: "no_access" - %template{ "v-else" => true } - %template{ "v-if" => "isEmptyStage && !isLoadingStage" } - = render partial: "empty_stage" - %template{ "v-if" => "state.events.length && !isLoadingStage && !isEmptyStage" } - %component{ ":is" => "currentStage.component", ":stage" => "currentStage", ":items" => "state.events" } +#js-cycle-analytics{ data: initial_data } diff --git a/app/views/projects/default_branch/_show.html.haml b/app/views/projects/default_branch/_show.html.haml index 0c7649e93d7..728f035555e 100644 --- a/app/views/projects/default_branch/_show.html.haml +++ b/app/views/projects/default_branch/_show.html.haml @@ -2,8 +2,8 @@ %section.settings.no-animate#default-branch-settings{ class: ('expanded' if expanded) } .settings-header - %h4= _('Default branch') - %button.btn.js-settings-toggle + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default branch') + %button.btn.gl-button.btn-default.js-settings-toggle = 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/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 2f533b5848d..cec8948aaa4 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -3,7 +3,7 @@ - can_create_note = !@diff_notes_disabled && can?(current_user, :create_note, diffs.project) - diff_page_context = local_assigns.fetch(:diff_page_context, nil) - load_diff_files_async = Feature.enabled?(:async_commit_diff_files, @project) && diff_page_context == "is-commit" -- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async && Feature.enabled?(:paginate_commit_view, @project, type: :development) +- paginate_diffs = local_assigns.fetch(:paginate_diffs, false) && !load_diff_files_async - diff_files = conditionally_paginate_diff_files(diffs, paginate: paginate_diffs) .content-block.oneline-block.files-changed.diff-files-changed.js-diff-files-changed diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index 4b198717790..9197b177b7b 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -16,8 +16,9 @@ - unless diff_file.submodule? .file-actions.d-none.d-sm-block - if diff_file.blob&.readable_text? - = link_to '#', class: 'js-toggle-diff-comments btn gl-button active has-tooltip', title: _("Toggle comments for this file"), disabled: @diff_notes_disabled do - = sprite_icon('comment') + %span.has-tooltip{ title: _("Toggle comments for this file") } + = link_to '#', class: 'js-toggle-diff-comments btn gl-button btn-default selected', disabled: @diff_notes_disabled do + = sprite_icon('comment') \ - if editable_diff?(diff_file) - link_opts = @merge_request.persisted? ? { from_merge_request_iid: @merge_request.iid } : {} diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index c26017ccb79..9388c5fad6d 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -19,7 +19,7 @@ %p= _('Choose visibility level, enable/disable project features and their permissions, disable email notifications, and show default award emoji.') .settings-content - = form_for @project, remote: true, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f| + = form_for @project, html: { multipart: true, class: "sharing-permissions-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-shared-permissions' } %template.js-project-permissions-form-data{ type: "application/json" }= project_permissions_panel_data_json(@project) .js-project-permissions-form @@ -27,7 +27,7 @@ = render "visibility_modal" = f.submit _('Save changes'), class: "btn gl-button btn-success #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } -%section.qa-merge-request-settings.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)] } +%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') @@ -36,10 +36,10 @@ .settings-content = render_if_exists 'shared/promotions/promote_mr_features' - = form_for @project, remote: true, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| + = form_for @project, html: { multipart: true, class: "merge-request-settings-form js-mr-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-merge-request-settings' } = render 'projects/merge_request_settings', form: f - = f.submit _('Save changes'), class: "btn gl-button btn-success qa-save-merge-request-changes rspec-save-merge-request-changes" + = f.submit _('Save changes'), class: "btn gl-button btn-success rspec-save-merge-request-changes", data: { qa_selector: 'save_merge_request_changes_button' } = render_if_exists 'projects/merge_request_approvals_settings', expanded: expanded @@ -60,7 +60,7 @@ = render 'projects/service_desk_settings' -%section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) } +%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') @@ -96,8 +96,8 @@ .input-group-prepend .input-group-text #{Gitlab::Utils.append_path(root_url, @project.namespace.full_path)}/ - = f.text_field :path, class: 'form-control qa-project-path-field h-auto' - = f.submit _('Change path'), class: "gl-button btn btn-warning qa-change-path-button" + = f.text_field :path, class: 'form-control h-auto', data: { qa_selector: 'project_path_field' } + = f.submit _('Change path'), class: "gl-button btn btn-warning", data: { qa_selector: 'change_path_button' } = render 'transfer', project: @project diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 2c245c1a914..0c682226df3 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -1,10 +1,7 @@ - @content_class = "limit-container-width" unless fluid_layout -- default_branch_name = @project.default_branch || "master" +- default_branch_name = @project.default_branch_or_master - @skip_current_level_breadcrumb = true -= content_for :invite_members_sidebar do - = render partial: 'projects/invite_members_link' - = render partial: 'flash_messages', locals: { project: @project } = render "home_panel" @@ -77,3 +74,6 @@ %span>< git push -u origin --all git push -u origin --tags + +- if @project.empty_repo_upload_experiment? + = 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/forks/_fork_button.html.haml b/app/views/projects/forks/_fork_button.html.haml index cfef2a19420..60a4a5c9d70 100644 --- a/app/views/projects/forks/_fork_button.html.haml +++ b/app/views/projects/forks/_fork_button.html.haml @@ -1,7 +1,7 @@ - avatar = namespace_icon(namespace, 100) - can_create_project = current_user.can?(:create_projects, namespace) -.bordered-box.fork-thumbnail.text-center.gl-m-3{ class: ("disabled" unless can_create_project) } +.bordered-box.fork-thumbnail.text-center.gl-m-3.gl-pb-5{ class: ("disabled" unless can_create_project) } - if /no_((\w*)_)*avatar/.match(avatar) = group_icon(namespace, class: "avatar rect-avatar s100 identicon mx-auto") - else diff --git a/app/views/projects/forks/new.html.haml b/app/views/projects/forks/new.html.haml index ccef28a2cf3..267fc3ae986 100644 --- a/app/views/projects/forks/new.html.haml +++ b/app/views/projects/forks/new.html.haml @@ -1,18 +1,29 @@ -- page_title _("Fork project") - -.row.gl-mt-3 - .col-lg-3 - %h4.gl-mt-0 - = _("Fork project") - %p - = _("A fork is a copy of a project.") - %br - = _('Forking a repository allows you to make changes without affecting the original project.') - .col-lg-9 - - if @own_namespace.present? - .fork-thumbnail-container.js-fork-content - %h5.gl-mt-0.gl-mb-0.gl-ml-3.gl-mr-3 - = _("Select a namespace to fork the project") - = render 'fork_button', namespace: @own_namespace - #fork-groups-mount-element{ data: { endpoint: new_project_fork_path(@project, format: :json) } } +- page_title s_("ForkProject|Fork project") +- if Feature.enabled?(:fork_project_form) + #fork-groups-mount-element{ data: { fork_illustration: image_path('illustrations/project-create-new-sm.svg'), + endpoint: new_project_fork_path(@project, format: :json), + new_group_path: new_group_path, + project_full_path: project_path(@project), + visibility_help_path: help_page_path("public_access/public_access"), + project_id: @project.id, + project_name: @project.name, + project_path: @project.path, + project_description: @project.description, + project_visibility: @project.visibility } } +- else + .row.gl-mt-3 + .col-lg-3 + %h4.gl-mt-0 + = s_("ForkProject|Fork project") + %p + = s_("ForkProject|A fork is a copy of a project.") + %br + = s_('ForkProject|Forking a repository allows you to make changes without affecting the original project.') + .col-lg-9 + - if @own_namespace.present? + .fork-thumbnail-container.js-fork-content + %h5.gl-mt-0.gl-mb-0.gl-ml-3.gl-mr-3 + = s_("ForkProject|Select a namespace to fork the project") + = render 'fork_button', namespace: @own_namespace + #fork-groups-mount-element{ data: { endpoint: new_project_fork_path(@project, format: :json) } } diff --git a/app/views/projects/issues/_form.html.haml b/app/views/projects/issues/_form.html.haml index dcc8000c0c5..d85c448b29a 100644 --- a/app/views/projects/issues/_form.html.haml +++ b/app/views/projects/issues/_form.html.haml @@ -1,3 +1,3 @@ = form_for [@project, @issue], - html: { class: 'issue-form common-note-form js-quick-submit js-requires-input' } do |f| + html: { class: 'issue-form common-note-form gl-mt-3 js-quick-submit js-requires-input' } do |f| = render 'shared/issuable/form', f: f, issuable: @issue diff --git a/app/views/projects/issues/_issue.html.haml b/app/views/projects/issues/_issue.html.haml index 23510713494..838b4538cad 100644 --- a/app/views/projects/issues/_issue.html.haml +++ b/app/views/projects/issues/_issue.html.haml @@ -22,7 +22,7 @@ #{issuable_reference(issue)} %span.issuable-authored.d-none.d-sm-inline-block · - opened #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by + created #{time_ago_with_tooltip(issue.created_at, placement: 'bottom')} by - if issue.service_desk_reply_to #{issue.service_desk_reply_to} via #{link_to_member(@project, issue.author, avatar: false)} diff --git a/app/views/projects/issues/_nav_btns.html.haml b/app/views/projects/issues/_nav_btns.html.haml index dbf6a1f1b94..06522d9d434 100644 --- a/app/views/projects/issues/_nav_btns.html.haml +++ b/app/views/projects/issues/_nav_btns.html.haml @@ -1,17 +1,15 @@ - show_feed_buttons = local_assigns.fetch(:show_feed_buttons, true) - show_import_button = local_assigns.fetch(:show_import_button, true) && can?(current_user, :import_issues, @project) - show_export_button = local_assigns.fetch(:show_export_button, true) +- issuable_type = 'issues' +- can_edit = can?(current_user, :admin_project, @project) +- notification_email = @current_user.present? ? @current_user.notification_email : nil .nav-controls.issues-nav-controls - if show_feed_buttons = render 'shared/issuable/feed_buttons' - .btn-group - - if show_export_button - = render 'shared/issuable/csv_export/button', issuable_type: 'issues' - - - if show_import_button - = render 'projects/issues/import_csv/button' + .js-csv-import-export-buttons{ data: { show_export_button: show_export_button.to_s, show_import_button: show_import_button.to_s, issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_issues_path(@project, request.query_parameters), import_csv_issues_path: import_csv_namespace_project_issues_path, container_class: 'gl-mr-3', can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project) } } - if @can_bulk_update = button_tag _("Edit issues"), class: "gl-button btn btn-default gl-mr-3 js-bulk-update-toggle" @@ -19,11 +17,6 @@ = link_to _("New issue"), new_project_issue_path(@project, issue: { assignee_id: finder.assignee.try(:id), milestone_id: finder.milestones.first.try(:id) }), - class: "gl-button btn btn-success", + class: "gl-button btn btn-confirm", id: "new_issue_link" -- if show_export_button - = render 'shared/issuable/csv_export/modal', issuable_type: 'issues' - -- if show_import_button - = render 'projects/issues/import_csv/modal' diff --git a/app/views/projects/issues/_service_desk_empty_state.html.haml b/app/views/projects/issues/_service_desk_empty_state.html.haml index 40abedea9d4..a4251c8e5dc 100644 --- a/app/views/projects/issues/_service_desk_empty_state.html.haml +++ b/app/views/projects/issues/_service_desk_empty_state.html.haml @@ -1,7 +1,7 @@ - service_desk_enabled = @project.service_desk_enabled? - can_edit_project_settings = can?(current_user, :admin_project, @project) -- title_text = _("Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab") +- title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab") - if Gitlab::ServiceDesk.supported? .empty-state @@ -13,21 +13,21 @@ - if can_edit_project_settings && service_desk_enabled %p - = _("Have your users email") + = s_("ServiceDesk|Your users can send emails to this address:") %code= @project.service_desk_address - %span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") - = link_to _('Read more'), help_page_path('user/project/service_desk') + %span= s_("ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.") + = link_to _('Learn more.'), help_page_path('user/project/service_desk') - if can_edit_project_settings && !service_desk_enabled .text-center - = link_to _("Turn on 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-success' - else .empty-state .svg-content = render 'shared/empty_states/icons/service_desk_setup.svg' .text-content - %h4= _('Service Desk is enabled but not yet active') + %h4= s_('ServiceDesk|Service Desk is enabled but not yet active') %p - = _("You must set up incoming email before it becomes active.") - = link_to _('More information'), help_page_path('administration/incoming_email', anchor: 'set-it-up') + = s_("ServiceDesk|To activate Service Desk on this instance, an instance administrator must first set up incoming email.") + = link_to _('Learn more.'), help_page_path('administration/incoming_email', anchor: 'set-it-up') diff --git a/app/views/projects/issues/_service_desk_info_content.html.haml b/app/views/projects/issues/_service_desk_info_content.html.haml index 1eb427f4f7c..448a341eba6 100644 --- a/app/views/projects/issues/_service_desk_info_content.html.haml +++ b/app/views/projects/issues/_service_desk_info_content.html.haml @@ -1,7 +1,7 @@ - service_desk_enabled = @project.service_desk_enabled? - can_edit_project_settings = can?(current_user, :admin_project, @project) -- title_text = _("Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab") +- title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab") .non-empty-state.media .svg-content @@ -12,12 +12,12 @@ - if can_edit_project_settings && service_desk_enabled %p - = _("Have your users email") + = s_("ServiceDesk|Your users can send emails to this address:") %code= @project.service_desk_address - %span= _("Those emails automatically become issues (with the comments becoming the email conversation) listed here.") - = link_to _('Read more'), help_page_path('user/project/service_desk') + %span= s_("ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.") + = link_to _('Learn more.'), help_page_path('user/project/service_desk') - if can_edit_project_settings && !service_desk_enabled .gl-mt-3 - = link_to _("Turn on 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-success' diff --git a/app/views/projects/issues/import_csv/_button.html.haml b/app/views/projects/issues/import_csv/_button.html.haml deleted file mode 100644 index 229eb0654a8..00000000000 --- a/app/views/projects/issues/import_csv/_button.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -- type = local_assigns.fetch(:type, :icon) -- can_edit = can?(current_user, :admin_project, @project) - -.dropdown.btn-group - %button.btn.gl-button.rounded-right.btn-default.btn-icon.text-center{ class: ('has-tooltip' if type == :icon), title: (_('Import issues') if type == :icon), - data: { toggle: 'dropdown', qa_selector: 'import_issues_button' }, 'aria-label' => _('Import issues'), 'aria-haspopup' => 'true', 'aria-expanded' => 'false' } - - if type == :icon - = sprite_icon('import') - - else - = _('Import issues') - %ul.dropdown-menu - %li - %button{ data: { toggle: 'modal', target: '.issues-import-modal' } } - = _('Import CSV') - - if can_edit - %li{ data: { qa_selector: 'import_from_jira_link' } } - = link_to _('Import from Jira'), project_import_jira_path(@project) diff --git a/app/views/projects/issues/import_csv/_modal.html.haml b/app/views/projects/issues/import_csv/_modal.html.haml deleted file mode 100644 index e928a71b940..00000000000 --- a/app/views/projects/issues/import_csv/_modal.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -.issues-import-modal.modal - .modal-dialog - .modal-content - = form_tag import_csv_namespace_project_issues_path, multipart: true do - .modal-header - %h3 - = _('Import issues') - .svg-content.import-export-svg-container - = image_tag 'illustrations/export-import.svg', alt: _('Import/Export illustration'), class: 'illustration' - %a.close{ href: '#', 'data-dismiss' => 'modal' } × - .modal-body - .modal-text - %p - = _("Your issues will be imported in the background. Once finished, you'll get a confirmation email.") - .form-group - = label_tag :file, _('Upload CSV file'), class: 'label-bold' - %div - = file_field_tag :file, accept: '.csv,text/csv', required: true - %p.text-secondary - = _('It must have a header row and at least two columns: the first column is the issue title and the second column is the issue description. The separator is automatically detected.') - = _('The maximum file size allowed is %{size}.') % { size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes) } - .modal-footer - %button{ type: 'submit', class: 'gl-button btn btn-success', title: _('Import issues'), data: { track_label: "export_issues_csv", track_event: "click_button", track_value: ""} } - = _('Import issues') diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index dd66e00b813..1d300c42768 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -8,7 +8,7 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@project.name} issues") -.js-projects-issues-root{ data: { can_edit: can?(current_user, :admin_project, @project).to_s, +.js-jira-issues-import-status{ data: { can_edit: can?(current_user, :admin_project, @project).to_s, is_jira_configured: @project.jira_service.present?.to_s, issues_path: project_issues_path(@project), project_path: @project.full_path } } @@ -17,16 +17,25 @@ .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 + - if Feature.enabled?(:vue_issues_list, @project) + - data_endpoint = local_assigns.fetch(:data_endpoint, expose_path(api_v4_projects_issues_path(id: @project.id))) + .js-issues-list{ data: { endpoint: data_endpoint, + full_path: @project.full_path, + has_blocked_issues_feature: Gitlab.ee? && @project.feature_available?(:blocked_issues).to_s, + has_issuable_health_status_feature: Gitlab.ee? && @project.feature_available?(:issuable_health_status).to_s, + has_issue_weights_feature: Gitlab.ee? && @project.feature_available?(:issue_weights).to_s } } + - else + = render 'shared/issuable/search_bar', type: :issues - .issues-holder - = render 'issues' - - if new_issue_email - .issuable-footer.text-center - .js-issueable-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) } } + - if @can_bulk_update + = render 'shared/issuable/bulk_update_sidebar', type: :issues + + .issues-holder + = render 'issues' + - if new_issue_email + .issuable-footer.text-center + .js-issueable-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 diff --git a/app/views/projects/issues/new.html.haml b/app/views/projects/issues/new.html.haml index d1601d7fd10..b18027f0f25 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") -%h3.page-title= _("New Issue") -%hr +.top-area.flex-lg-row + %h3.page-title= _("New Issue") = render "form" diff --git a/app/views/projects/learn_gitlab/index.html.haml b/app/views/projects/learn_gitlab/index.html.haml index d5fdbc10eb4..94023b21aab 100644 --- a/app/views/projects/learn_gitlab/index.html.haml +++ b/app/views/projects/learn_gitlab/index.html.haml @@ -1,4 +1,5 @@ - breadcrumb_title _("Learn GitLab") - page_title _("Learn GitLab") +- add_page_specific_style 'page_bundles/learn_gitlab' #js-learn-gitlab-app{ data: { actions: onboarding_actions_data(@project).to_json } } diff --git a/app/views/projects/mattermosts/_no_teams.html.haml b/app/views/projects/mattermosts/_no_teams.html.haml index 00efea81f8f..f375222e311 100644 --- a/app/views/projects/mattermosts/_no_teams.html.haml +++ b/app/views/projects/mattermosts/_no_teams.html.haml @@ -1,6 +1,8 @@ - if @teams_error_message = content_for :flash_message do - .alert.alert-danger= @teams_error_message + .gl-alert.gl-alert-danger + = sprite_icon('error', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body= @teams_error_message %p You aren’t a member of any team on the Mattermost instance at diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml index b1463693fb4..6c0fc9575fc 100644 --- a/app/views/projects/merge_requests/_merge_request.html.haml +++ b/app/views/projects/merge_requests/_merge_request.html.haml @@ -18,7 +18,7 @@ #{issuable_reference(merge_request)} %span.issuable-authored.d-none.d-sm-inline-block · - opened #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')} + created #{time_ago_with_tooltip(merge_request.created_at, placement: 'bottom')} by #{link_to_member(@project, merge_request.author, avatar: false)} = render_if_exists 'shared/issuable/gitlab_team_member_badge', author: merge_request.author - if merge_request.milestone diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 61747fe2c8d..354c6665a50 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -45,7 +45,7 @@ %li= link_to 'Report abuse', new_abuse_report_path(user_id: @merge_request.author.id, ref_url: merge_request_url(@merge_request)) - if can_update_merge_request - = link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-md-block btn gl-button btn-default btn-grouped js-issuable-edit qa-edit-button" + = link_to 'Edit', edit_project_merge_request_path(@project, @merge_request), class: "d-none d-md-block btn gl-button btn-default btn-grouped js-issuable-edit", data: { qa_selector: "edit_button" } - if can_update_merge_request && !are_close_and_open_buttons_hidden = render 'projects/merge_requests/close_reopen_draft_report_toggle' diff --git a/app/views/projects/merge_requests/_nav_btns.html.haml b/app/views/projects/merge_requests/_nav_btns.html.haml index 473490c6c35..511e53b192f 100644 --- a/app/views/projects/merge_requests/_nav_btns.html.haml +++ b/app/views/projects/merge_requests/_nav_btns.html.haml @@ -1,10 +1,10 @@ -.btn-group - = render 'shared/issuable/csv_export/button', issuable_type: 'merge-requests' +- issuable_type = 'merge-requests' +- notification_email = @current_user.present? ? @current_user.notification_email : nil + +.js-csv-import-export-buttons{ data: { show_export_button: "true", issuable_type: issuable_type, issuable_count: issuables_count_for_state(issuable_type.to_sym, params[:state]), email: notification_email, export_csv_path: export_csv_project_merge_requests_path(@project, request.query_parameters), container_class: 'gl-mr-3' } } - if @can_bulk_update - = button_tag "Edit merge requests", class: "gl-button btn gl-mr-3 js-bulk-update-toggle" + = button_tag "Edit merge requests", class: "gl-button btn btn-default gl-mr-3 js-bulk-update-toggle" - if merge_project - = link_to new_merge_request_path, class: "gl-button btn btn-success", title: "New merge request" do + = link_to new_merge_request_path, class: "gl-button btn btn-confirm", title: "New merge request" do New merge request - - = render 'shared/issuable/csv_export/modal', issuable_type: 'merge_requests' diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml index 123affeb5d6..6e6046eba14 100644 --- a/app/views/projects/merge_requests/_widget.html.haml +++ b/app/views/projects/merge_requests/_widget.html.haml @@ -8,6 +8,7 @@ window.gl.mrWidgetData.mr_troubleshooting_docs_path = '#{help_page_path('user/project/merge_requests/reviewing_and_managing_merge_requests.md', anchor: 'troubleshooting')}'; window.gl.mrWidgetData.pipeline_must_succeed_docs_path = '#{help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds.md', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds')}'; window.gl.mrWidgetData.security_approvals_help_page_path = '#{help_page_path('user/application_security/index.md', anchor: 'security-approvals-in-merge-requests')}'; + window.gl.mrWidgetData.license_compliance_docs_path = '#{help_page_path('user/compliance/license_compliance/index.md', anchor: 'policies')}'; window.gl.mrWidgetData.eligible_approvers_docs_path = '#{help_page_path('user/project/merge_requests/merge_request_approvals', anchor: 'eligible-approvers')}'; window.gl.mrWidgetData.approvals_help_path = '#{help_page_path("user/project/merge_requests/merge_request_approvals")}'; window.gl.mrWidgetData.pipelines_empty_svg_path = '#{image_path('illustrations/pipelines_empty.svg')}'; diff --git a/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml b/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml deleted file mode 100644 index cb1cb41eb71..00000000000 --- a/app/views/projects/merge_requests/conflicts/_commit_stats.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -.content-block.oneline-block.files-changed{ "v-if" => "!isLoading && !hasError" } - .inline-parallel-buttons{ "v-if" => "showDiffViewTypeSwitcher" } - .btn-group - %button.btn.gl-button{ ":class" => "{'active': !isParallel}", "@click" => "handleViewTypeChange('inline')" } - = _('Inline') - %button.btn.gl-button{ ":class" => "{'active': isParallel}", "@click" => "handleViewTypeChange('parallel')" } - = _('Side-by-side') - - .js-toggle-container - .commit-stat-summary - = _('Showing %{conflict_start}%{conflicts_text}%{strong_end} between %{ref_start}%{source_branch}%{strong_end} and %{ref_start}%{target_branch}%{strong_end}').html_safe % { conflict_start: '<strong class="cred">'.html_safe, ref_start: '<strong class="ref-name">'.html_safe, strong_end: '</strong>'.html_safe, conflicts_text: '{{conflictsCountText}}', source_branch: '{{conflictsData.sourceBranch}}', target_branch: '{{conflictsData.targetBranch}}' } diff --git a/app/views/projects/merge_requests/conflicts/_file_actions.html.haml b/app/views/projects/merge_requests/conflicts/_file_actions.html.haml deleted file mode 100644 index 220ddf1bad3..00000000000 --- a/app/views/projects/merge_requests/conflicts/_file_actions.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -.file-actions.d-flex.align-items-center.gl-ml-auto.gl-align-self-start - .btn-group.gl-mr-3{ "v-if" => "file.type === 'text'" } - %button.btn.gl-button{ ":class" => "{ 'active': file.resolveMode == 'interactive' }", - '@click' => "onClickResolveModeButton(file, 'interactive')", - type: 'button' } - = _('Interactive mode') - %button.btn.gl-button{ ':class' => "{ 'active': file.resolveMode == 'edit' }", - '@click' => "onClickResolveModeButton(file, 'edit')", - type: 'button' } - = _('Edit inline') - %a.btn.gl-button.view-file{ ":href" => "file.blobPath" } - = _('View file @%{commit_sha}') % { commit_sha: '{{conflictsData.shortCommitSha}}' } diff --git a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml b/app/views/projects/merge_requests/conflicts/_submit_form.html.haml deleted file mode 100644 index 87356f33b1e..00000000000 --- a/app/views/projects/merge_requests/conflicts/_submit_form.html.haml +++ /dev/null @@ -1,24 +0,0 @@ -- branch_name = link_to @merge_request.source_branch, project_tree_path(@merge_request.project, @merge_request.source_branch), class: "ref-name" -- translation =_('You can resolve the merge conflict using either the Interactive mode, by choosing %{use_ours} or %{use_theirs} buttons, or by editing the files directly. Commit these changes into %{branch_name}') % { use_ours: '<code>Use Ours</code>', use_theirs: '<code>Use Theirs</code>', branch_name: branch_name } - -%hr -.resolve-conflicts-form - .form-group.row - .col-md-4 - %h4= _('Resolve conflicts on source branch') - .resolve-info{ "v-pre": true } - = translation.html_safe - .col-md-8 - %label.label-bold{ "for" => "commit-message" } - #{ _('Commit message') } - .commit-message-container - .max-width-marker - %textarea.form-control.js-commit-message#commit-message{ "v-model" => "conflictsData.commitMessage", "rows" => "5" } - .form-group.row - .offset-md-4.col-md-8 - .row - .col-6 - %button.btn.gl-button.btn-success.js-submit-button{ type: "button", "@click" => "commit()", ":disabled" => "!readyToCommit" } - %span {{commitButtonText}} - .col-6.text-right - = link_to "Cancel", project_merge_request_path(@merge_request.project, @merge_request), class: "gl-button btn btn-default" diff --git a/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml b/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml deleted file mode 100644 index 4ba5ec5795a..00000000000 --- a/app/views/projects/merge_requests/conflicts/components/_diff_file_editor.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%diff-file-editor{ "inline-template" => "true", ":file" => "file", ":on-cancel-discard-confirmation" => "cancelDiscardConfirmation", ":on-accept-discard-confirmation" => "acceptDiscardConfirmation" } - .diff-editor-wrap{ "v-show" => "file.showEditor" } - .discard-changes-alert-wrap{ "v-if" => "file.promptDiscardConfirmation" } - .discard-changes-alert - Are you sure you want to discard your changes? - .discard-actions - %button.btn.btn-sm.btn-danger-secondary.gl-button{ "@click" => "acceptDiscardConfirmation(file)" } Discard changes - %button.btn.btn-default.btn-sm.gl-button{ "@click" => "cancelDiscardConfirmation(file)" } Cancel - .editor-wrap{ ":class" => "classObject" } - .editor{ "style" => "height: 350px", data: { 'editor-loading': true } } diff --git a/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml b/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml deleted file mode 100644 index 7bd5c437942..00000000000 --- a/app/views/projects/merge_requests/conflicts/components/_inline_conflict_lines.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -%inline-conflict-lines{ "inline-template" => "true", ":file" => "file" } - %table.diff-wrap-lines.code.code-commit.js-syntax-highlight - %tr.line_holder.diff-inline{ "v-for" => "line in file.inlineLines" } - %td.diff-line-num.new_line{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader" } - %a {{line.new_line}} - %td.diff-line-num.old_line{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader" } - %a {{line.old_line}} - %td.line_content{ ":class" => "lineCssClass(line)", "v-if" => "!line.isHeader", "v-html" => "line.richText" } - %td.diff-line-num.header{ ":class" => "lineCssClass(line)", "v-if" => "line.isHeader" } - %td.diff-line-num.header{ ":class" => "lineCssClass(line)", "v-if" => "line.isHeader" } - %td.line_content.header{ ":class" => "lineCssClass(line)", "v-if" => "line.isHeader" } - %strong{ "v-html" => "line.richText" } - %button.btn{ "@click" => "handleSelected(file, line.id, line.section)" } - {{line.buttonTitle}} diff --git a/app/views/projects/merge_requests/conflicts/show.html.haml b/app/views/projects/merge_requests/conflicts/show.html.haml index 827df540629..e02f126d165 100644 --- a/app/views/projects/merge_requests/conflicts/show.html.haml +++ b/app/views/projects/merge_requests/conflicts/show.html.haml @@ -1,5 +1,6 @@ - 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" .merge-request-details.issuable-details @@ -7,30 +8,7 @@ = render 'shared/issuable/sidebar', issuable_sidebar: @issuable_sidebar, assignees: @merge_request.assignees, source_branch: @merge_request.source_branch -#conflicts{ "v-cloak" => "true", 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) } } - .loading{ "v-if" => "isLoading" } - .spinner.spinner-md - - .nothing-here-block{ "v-if" => "hasError" } - {{conflictsData.errorMessage}} - - = render partial: "projects/merge_requests/conflicts/commit_stats" - - .files-wrapper{ "v-if" => "!isLoading && !hasError" } - .files - .diff-file.file-holder.conflict{ "v-for" => "file in conflictsData.files" } - .js-file-title.file-title.file-title-flex-parent.cursor-default - .file-header-content - %file-icon{ ':file-name': 'file.filePath', ':size': '18', 'css-classes': 'gl-mr-2' } - %strong.file-title-name {{file.filePath}} - = render partial: 'projects/merge_requests/conflicts/file_actions' - .diff-content.diff-wrap-lines - .file-content{ "v-show" => "!isParallel && file.resolveMode === 'interactive' && file.type === 'text'" } - = render partial: "projects/merge_requests/conflicts/components/inline_conflict_lines" - .file-content{ "v-show" => "isParallel && file.resolveMode === 'interactive' && file.type === 'text'" } - %parallel-conflict-lines{ ":file" => "file" } - %div{ "v-show" => "file.resolveMode === 'edit' || file.type === 'text-editor'" } - = render partial: "projects/merge_requests/conflicts/components/diff_file_editor" - - = render partial: "projects/merge_requests/conflicts/submit_form" +#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), + merge_request_path: project_merge_request_path(@merge_request.project, @merge_request) } } diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 453a34d1e7a..d664ee709dd 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -35,7 +35,7 @@ = tab_link_for @merge_request, :pipelines do = _("Pipelines") %span.badge.badge-pill.js-pipelines-mr-count= number_of_pipelines - = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab qa-diffs-tab", id: "diffs-tab" do + = render "projects/merge_requests/tabs/tab", name: "diffs", class: "diffs-tab", id: "diffs-tab", qa_selector: "diffs_tab" do = tab_link_for @merge_request, :diffs do = _("Changes") %span.badge.badge-pill= @merge_request.diff_size diff --git a/app/views/projects/milestones/_form.html.haml b/app/views/projects/milestones/_form.html.haml index f6e4442d4fb..56906eb6e66 100644 --- a/app/views/projects/milestones/_form.html.haml +++ b/app/views/projects/milestones/_form.html.haml @@ -21,8 +21,8 @@ .form-actions - if @milestone.new_record? - = f.submit _('Create milestone'), class: 'gl-button btn-success btn', data: { qa_selector: 'create_milestone_button' } - = link_to _('Cancel'), project_milestones_path(@project), class: 'gl-button btn btn-cancel' + = f.submit _('Create milestone'), class: 'gl-button btn-confirm btn', data: { qa_selector: 'create_milestone_button' } + = link_to _('Cancel'), project_milestones_path(@project), class: 'gl-button btn btn-default btn-cancel' - else - = f.submit _('Save changes'), class: 'gl-button btn-success btn' - = link_to _('Cancel'), project_milestone_path(@project, @milestone), class: 'gl-button btn btn-cancel' + = f.submit _('Save changes'), class: 'gl-button btn-confirm btn' + = link_to _('Cancel'), project_milestone_path(@project, @milestone), class: 'gl-button btn btn-default btn-cancel' diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml index c0df986e1ca..059ef53c42b 100644 --- a/app/views/projects/milestones/index.html.haml +++ b/app/views/projects/milestones/index.html.haml @@ -8,7 +8,7 @@ = render 'shared/milestones/search_form' = render 'shared/milestones_sort_dropdown' - if can?(current_user, :admin_milestone, @project) - = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-success', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do + = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do = _('New milestone') - if @milestones.blank? diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index d6ad6147e6e..5a1e263141d 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -5,8 +5,8 @@ %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= _('Mirroring repositories') - %button.btn.gl-button.js-settings-toggle + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Mirroring repositories') + %button.btn.gl-button.btn-default.js-settings-toggle = 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.') @@ -35,7 +35,7 @@ = link_to _('Learn more.'), help_page_path('user/project/repository/repository_mirroring', anchor: 'mirror-only-protected-branches'), target: '_blank', rel: 'noopener noreferrer' .panel-footer - = f.submit _('Mirror repository'), class: 'gl-button btn btn-success js-mirror-submit qa-mirror-repository-button', name: :update_remote_mirror + = f.submit _('Mirror repository'), class: 'gl-button btn btn-confirm js-mirror-submit qa-mirror-repository-button', name: :update_remote_mirror - else .gl-alert.gl-alert-info{ role: 'alert' } = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index 45e7eae8c70..059d6eb28c5 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -8,7 +8,7 @@ .project-edit-errors = render 'projects/errors' - .js-experiment-new-project-creation{ data: { is_ci_cd_available: (ci_cd_projects_available? if Gitlab.ee?), has_errors: @project.errors.any?, new_project_guidelines: brand_new_project_guidelines } } + .js-experiment-new-project-creation{ data: { is_ci_cd_available: (ci_cd_projects_available? if Gitlab.ee?), has_errors: @project.errors.any?, new_project_guidelines: brand_new_project_guidelines, push_to_create_project_command: push_to_create_project_command, working_with_projects_help_path: help_page_path("user/project/working_with_projects") } } .row{ 'v-cloak': true } .col-lg-3.profile-settings-sidebar @@ -28,9 +28,6 @@ %p %strong= _("Tip:") = _("You can also create a project from the command line.") - %a.push-new-project-tip{ data: { title: _("Push to create a project") }, href: help_page_path('user/project/working_with_projects', anchor: 'push-to-create-a-new-project'), target: "_blank", rel: "noopener noreferrer" } - = _("Show command") - %template.push-new-project-tip-template= render partial: "new_project_push_tip" .col-lg-9.js-toggle-container %ul.nav.nav-tabs.nav-links.gitlab-tabs{ role: 'tablist' } diff --git a/app/views/projects/no_repo.html.haml b/app/views/projects/no_repo.html.haml index 3c7afff57f6..c88ea313287 100644 --- a/app/views/projects/no_repo.html.haml +++ b/app/views/projects/no_repo.html.haml @@ -12,8 +12,6 @@ #{ _('This means you can not push code until you create an empty repository or import existing one.') } %hr -= render 'projects/invite_members_modal', project: @project - .no-repo-actions = link_to project_repository_path(@project), method: :post, class: 'btn gl-button btn-confirm' do #{ _('Create empty repository') } diff --git a/app/views/projects/pages/_list.html.haml b/app/views/projects/pages/_list.html.haml index 84c8ab0ceba..40352e79175 100644 --- a/app/views/projects/pages/_list.html.haml +++ b/app/views/projects/pages/_list.html.haml @@ -21,7 +21,7 @@ %span.badge.badge-danger = s_('GitLabPages|Expired') %div - = link_to s_('GitLabPages|Edit'), project_pages_domain_path(@project, domain), class: "btn gl-button btn-sm btn-grouped btn-success btn-inverted" + = 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?')}, method: :delete, class: "btn gl-button btn-danger btn-sm btn-grouped" - if domain.needs_verification? %li.list-group-item.bs-callout-warning diff --git a/app/views/projects/pages/_pages_settings.html.haml b/app/views/projects/pages/_pages_settings.html.haml index 51483176d6f..f39941f6f0d 100644 --- a/app/views/projects/pages/_pages_settings.html.haml +++ b/app/views/projects/pages/_pages_settings.html.haml @@ -11,4 +11,4 @@ = s_('GitLabPages|Force HTTPS (requires valid certificates)') .gl-mt-3 - = f.submit s_('GitLabPages|Save'), class: 'btn btn-success gl-button' + = f.submit s_('GitLabPages|Save'), class: 'btn btn-confirm gl-button' diff --git a/app/views/projects/pages/show.html.haml b/app/views/projects/pages/show.html.haml index 4347cbdbd9b..d0d5e675fcb 100644 --- a/app/views/projects/pages/show.html.haml +++ b/app/views/projects/pages/show.html.haml @@ -5,7 +5,7 @@ = s_('GitLabPages|Pages') - if can?(current_user, :update_pages, @project) && (Gitlab.config.pages.external_http || Gitlab.config.pages.external_https) - = link_to new_project_pages_domain_path(@project), class: 'btn gl-button btn-success float-right', title: s_('GitLabPages|New Domain') do + = link_to new_project_pages_domain_path(@project), class: 'btn gl-button btn-confirm float-right', title: s_('GitLabPages|New Domain') do = s_('GitLabPages|New Domain') %p.light diff --git a/app/views/projects/pages_domains/new.html.haml b/app/views/projects/pages_domains/new.html.haml index 0c3ab4f10a6..0b794226c7f 100644 --- a/app/views/projects/pages_domains/new.html.haml +++ b/app/views/projects/pages_domains/new.html.haml @@ -7,6 +7,6 @@ = form_for [@project, domain_presenter], html: { class: 'fieldset-form' } do |f| = render 'form', { f: f } .form-actions - = f.submit _('Create New Domain'), class: "btn btn-success" + = f.submit _('Create New Domain'), class: "gl-button btn btn-confirm" .float-right - = link_to _('Cancel'), project_pages_path(@project), class: 'btn btn-cancel' + = link_to _('Cancel'), project_pages_path(@project), class: 'gl-button btn btn-default btn-cancel' diff --git a/app/views/projects/pages_domains/show.html.haml b/app/views/projects/pages_domains/show.html.haml index 54522a70f4a..d16821c3940 100644 --- a/app/views/projects/pages_domains/show.html.haml +++ b/app/views/projects/pages_domains/show.html.haml @@ -17,5 +17,5 @@ = form_for [@project, domain_presenter], html: { class: 'fieldset-form' } do |f| = render 'form', { f: f } .form-actions.d-flex.justify-content-between - = f.submit _('Save Changes'), class: "btn btn-success" - = link_to _('Cancel'), project_pages_path(@project), class: 'btn btn-default btn-inverse' + = f.submit _('Save Changes'), class: "gl-button btn btn-confirm" + = link_to _('Cancel'), project_pages_path(@project), class: 'gl-button btn btn-default btn-inverse' diff --git a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml index e17c905e092..190bf9bf071 100644 --- a/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml +++ b/app/views/projects/pipeline_schedules/_pipeline_schedule.html.haml @@ -27,14 +27,14 @@ %td .float-right.btn-group - if can?(current_user, :play_pipeline_schedule, pipeline_schedule) - = link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('Play'), class: 'btn gl-button btn-default btn-svg' do + = link_to play_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('Play'), class: 'btn gl-button btn-default btn-icon' do = sprite_icon('play') - if can?(current_user, :take_ownership_pipeline_schedule, pipeline_schedule) = link_to take_ownership_pipeline_schedule_path(pipeline_schedule), method: :post, title: s_('PipelineSchedules|Take ownership'), class: 'btn gl-button btn-default' do = s_('PipelineSchedules|Take ownership') - if can?(current_user, :update_pipeline_schedule, pipeline_schedule) - = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-button btn-default' do + = link_to edit_pipeline_schedule_path(pipeline_schedule), title: _('Edit'), class: 'btn gl-button btn-default btn-icon' do = sprite_icon('pencil') - if can?(current_user, :admin_pipeline_schedule, pipeline_schedule) - = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn gl-button btn-danger', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do + = link_to pipeline_schedule_path(pipeline_schedule), title: _('Delete'), method: :delete, class: 'btn gl-button btn-danger btn-icon', data: { confirm: _("Are you sure you want to delete this pipeline schedule?") } do = sprite_icon('remove') diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 904b3d6f483..58d125acc2d 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -56,7 +56,7 @@ %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 - = custom_icon("icon_status_#{build.status}") + = 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')} } diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index ff728ab2fb3..139f6e3c94d 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,4 +1,4 @@ -- page_title _('CI / CD Analytics') +- page_title _('CI/CD Analytics') #js-project-pipelines-charts-app{ data: { project_path: @project.full_path, should_render_deployment_frequency_charts: should_render_deployment_frequency_charts.to_s } } diff --git a/app/views/projects/pipelines/index.html.haml b/app/views/projects/pipelines/index.html.haml index 6a4dd88ae07..7d7b8a155ac 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -7,8 +7,6 @@ #pipelines-list-vue{ data: { endpoint: project_pipelines_path(@project, format: :json), project_id: @project.id, params: params.to_json, - "help-page-path" => help_page_path('ci/quick_start/README'), - "auto-devops-help-path" => help_page_path('topics/autodevops/index.md'), "pipeline-schedule-url" => pipeline_schedules_path(@project), "empty-state-svg-path" => image_path('illustrations/pipelines_empty.svg'), "error-state-svg-path" => image_path('illustrations/pipelines_failed.svg'), diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index 7d5cef2015d..7a3817fe87b 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -6,7 +6,7 @@ = s_('Pipeline|Run Pipeline') %hr -- if Feature.enabled?(:new_pipeline_form, @project, default_enabled: true) +- if Feature.enabled?(:new_pipeline_form, @project, default_enabled: :yaml) #js-new-pipeline{ data: { project_id: @project.id, pipelines_path: project_pipelines_path(@project), config_variables_path: config_variables_namespace_project_pipelines_path(@project.namespace, @project), @@ -14,8 +14,7 @@ ref_param: params[:ref] || @project.default_branch, var_param: params[:var].to_json, file_param: params[:file_var].to_json, - branch_refs: @project.repository.branch_names.to_json.html_safe, - tag_refs: @project.repository.tag_names.to_json.html_safe, + project_refs_endpoint: refs_project_path(@project, sort: 'updated_desc'), settings_link: project_settings_ci_cd_path(@project), max_warnings: ::Gitlab::Ci::Warnings::MAX_LIMIT } } diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index b431ef202b3..68c80833299 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -26,4 +26,4 @@ = render "projects/pipelines/with_tabs", pipeline: @pipeline, pipeline_has_errors: pipeline_has_errors -.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json), pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid } } +.js-pipeline-details-vue{ data: { endpoint: project_pipeline_path(@project, @pipeline, format: :json), metrics_path: namespace_project_ci_prometheus_metrics_histograms_path(namespace_id: @project.namespace, project_id: @project, format: :json), pipeline_project_path: @project.full_path, pipeline_iid: @pipeline.iid, graphql_resource_etag: graphql_etag_pipeline_path(@pipeline) } } diff --git a/app/views/projects/project_members/_groups.html.haml b/app/views/projects/project_members/_groups.html.haml deleted file mode 100644 index fe8a50ebb42..00000000000 --- a/app/views/projects/project_members/_groups.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -.card.card-without-border - = render 'shared/members/tab_pane/header' do - = render 'shared/members/tab_pane/title' do - = html_escape(_("Groups with access to %{strong_open}%{project_name}%{strong_close}")) % { project_name: sanitize(@project.name, tags: []), strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - = form_tag project_project_members_path(@project), method: :get, class: 'user-search-form gl-mx-n3 gl-my-n3', data: { testid: 'group-link-search-form' } do - .gl-px-3.gl-py-2 - .search-control-wrap.gl-relative - = render 'shared/members/search_field', name: 'search_groups' - %ul.content-list.members-list{ data: { testid: 'project-member-groups' } } - - @group_links.each do |group_link| - = render 'shared/members/group', group_link: group_link, can_admin_member: can_manage_project_members?(@project), group_link_path: project_group_link_path(@project, group_link) diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml deleted file mode 100644 index 24ca7ebded9..00000000000 --- a/app/views/projects/project_members/_team.html.haml +++ /dev/null @@ -1,22 +0,0 @@ -- project = local_assigns.fetch(:project) -- members = local_assigns.fetch(:members) -- group = local_assigns.fetch(:group) -- current_user_is_group_owner = local_assigns.fetch(:current_user_is_group_owner) - -.card.card-without-border - = render 'shared/members/tab_pane/header' do - = render 'shared/members/tab_pane/title' do - = html_escape(_("Members of %{strong_open}%{project_name}%{strong_close}")) % { project_name: sanitize(project.name, tags: []), strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - = form_tag project_project_members_path(project), method: :get, class: 'user-search-form gl-display-flex gl-md-align-items-center gl-flex-wrap gl-flex-direction-column gl-md-flex-direction-row gl-mx-n3 gl-my-n3', data: { testid: 'user-search-form' } do - .gl-px-3.gl-py-2 - .search-control-wrap.gl-relative - = render 'shared/members/search_field' - = render 'shared/members/tab_pane/form_item' do - = label_tag :sort_by, _('Sort by'), class: 'label-bold gl-mr-2 gl-mb-0 gl-py-2 align-self-md-center' - = render 'shared/members/sort_dropdown' - %ul.content-list.members-list{ data: { qa_selector: 'members_list', testid: 'members-table' } } - = render partial: 'shared/members/member', - collection: members, as: :member, - locals: { membership_source: project, - group: group, - current_user_is_group_owner: current_user_is_group_owner } diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index beb435d268a..c88dae079ae 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,6 +1,5 @@ +- add_page_specific_style 'page_bundles/members' - page_title _("Members") -- group = @project.group -- vue_project_members_list_enabled = Feature.enabled?(:vue_project_members_list, @project, default_enabled: :yaml) .js-remove-member-modal .row.gl-mt-3 @@ -18,8 +17,9 @@ %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 } .col-md-12.col-lg-6 - .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2.gl-mb-3 - .js-invite-members-trigger.gl-px-2.gl-sm-w-auto.gl-w-full.gl-mb-4{ data: { classes: 'btn btn-success gl-button gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite members') } } + .gl-display-flex.gl-flex-wrap.gl-justify-content-end + .js-invite-group-trigger{ data: { classes: 'gl-mt-3 gl-sm-w-auto gl-w-full', display_text: _('Invite a group') } } + .js-invite-members-trigger{ data: { variant: 'success', classes: 'gl-mt-3 gl-sm-w-auto gl-w-full gl-sm-ml-3', display_text: _('Invite members') } } = render 'projects/invite_members_modal', project: @project - else @@ -75,44 +75,22 @@ %span.badge.badge-pill= @requesters.count .tab-content #tab-members.tab-pane{ class: ('active' unless groups_tab_active?) } - - if vue_project_members_list_enabled - .js-project-members-list{ data: project_members_list_data_attributes(@project, @project_members) } - .loading - .spinner.spinner-md - - else - = render 'projects/project_members/team', project: @project, group: group, members: @project_members, current_user_is_group_owner: current_user_is_group_owner?(@project) + .js-project-members-list{ data: project_members_list_data_attributes(@project, @project_members) } + .loading + .spinner.spinner-md = paginate @project_members, theme: "gitlab", params: { search_groups: nil } - if show_groups?(@group_links) #tab-groups.tab-pane{ class: ('active' if groups_tab_active?) } - - if vue_project_members_list_enabled - .js-project-group-links-list{ data: project_group_links_list_data_attributes(@project, @group_links) } - .loading - .spinner.spinner-md - - else - = render 'projects/project_members/groups', group_links: @group_links + .js-project-group-links-list{ data: project_group_links_list_data_attributes(@project, @group_links) } + .loading + .spinner.spinner-md - if show_invited_members?(@project, @invited_members) #tab-invited-members.tab-pane - - if vue_project_members_list_enabled - .js-project-invited-members-list{ data: project_members_list_data_attributes(@project, @invited_members) } - .loading - .spinner.spinner-md - - else - .card.card-without-border - = render 'shared/members/tab_pane/header' do - = render 'shared/members/tab_pane/title' do - = html_escape(_('Members invited to %{strong_start}%{project_name}%{strong_end}')) % { project_name: @project.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - %ul.content-list.members-list - = render partial: 'shared/members/member', collection: @invited_members, as: :member, locals: { membership_source: @project, group: group, current_user_is_group_owner: current_user_is_group_owner?(@project) } + .js-project-invited-members-list{ data: project_members_list_data_attributes(@project, @invited_members) } + .loading + .spinner.spinner-md - if show_access_requests?(@project, @requesters) #tab-access-requests.tab-pane - - if vue_project_members_list_enabled - .js-project-access-requests-list{ data: project_members_list_data_attributes(@project, @requesters) } - .loading - .spinner.spinner-md - - else - .card.card-without-border - = render 'shared/members/tab_pane/header' do - = render 'shared/members/tab_pane/title' do - = html_escape(_('Users requesting access to %{strong_start}%{project_name}%{strong_end}')) % { project_name: @project.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - %ul.content-list.members-list - = render partial: 'shared/members/member', collection: @requesters, as: :member, locals: { membership_source: @project, group: group } + .js-project-access-requests-list{ data: project_members_list_data_attributes(@project, @requesters) } + .loading + .spinner.spinner-md diff --git a/app/views/projects/project_templates/_project_fields_form.html.haml b/app/views/projects/project_templates/_project_fields_form.html.haml index 201e2d5b5fb..7908550ca88 100644 --- a/app/views/projects/project_templates/_project_fields_form.html.haml +++ b/app/views/projects/project_templates/_project_fields_form.html.haml @@ -8,5 +8,5 @@ .selected-icon.gl-mr-3 .selected-template .input-group-append - %button.btn.btn-default.change-template{ type: "button" } + %button.btn.gl-button.btn-default.change-template{ type: "button" } = _('Change template') diff --git a/app/views/projects/protected_branches/shared/_branches_list.html.haml b/app/views/projects/protected_branches/shared/_branches_list.html.haml index f07de81d7fd..522e9888bc6 100644 --- a/app/views/projects/protected_branches/shared/_branches_list.html.haml +++ b/app/views/projects/protected_branches/shared/_branches_list.html.haml @@ -23,6 +23,12 @@ %th = s_("ProtectedBranch|Allowed to push") + - if ::Feature.enabled?(:allow_force_push_to_protected_branches, @project) + %th + = s_("ProtectedBranch|Allow force push") + %span.has-tooltip{ data: { container: 'body' }, title: s_('ProtectedBranch|Allow force push for all users with push access.'), 'aria-hidden': 'true' } + = sprite_icon('question', size: 16, css_class: 'gl-text-gray-500') + = render_if_exists 'projects/protected_branches/ee/code_owner_approval_table_head' - if can_admin_project diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml index 6ce01566a42..ae03b198bc9 100644 --- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml @@ -21,6 +21,13 @@ = f.label :push_access_levels_attributes, s_("ProtectedBranch|Allowed to push:"), class: 'col-md-2 text-left text-md-right' .col-md-10 = yield :push_access_levels + - if ::Feature.enabled?(:allow_force_push_to_protected_branches, @project) + .form-group.row + = f.label :allow_force_push, s_("ProtectedBranch|Allow force push:"), class: 'col-md-2 gl-text-left text-md-right' + .col-md-10 + = render "shared/buttons/project_feature_toggle", class_list: "js-force-push-toggle project-feature-toggle" + .form-text.gl-text-gray-600.gl-mt-0 + = s_("ProtectedBranch|Allow force push for all users with push access.") = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form', f: f .card-footer - = f.submit s_('ProtectedBranch|Protect'), class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_button' } + = f.submit s_('ProtectedBranch|Protect'), class: 'btn-success gl-button btn', disabled: true, data: { qa_selector: 'protect_button' } diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml index 1d3e3fb11ae..c2a5efa7b7c 100644 --- a/app/views/projects/protected_branches/shared/_index.html.haml +++ b/app/views/projects/protected_branches/shared/_index.html.haml @@ -2,9 +2,9 @@ %section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only Protected branches - %button.btn.js-settings-toggle.qa-expand-protected-branches{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle.qa-expand-protected-branches{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p Keep stable branches secure, and force developers to use merge requests. #{link_to "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 67eadd39ed6..aab4d366605 100644 --- a/app/views/projects/protected_tags/shared/_index.html.haml +++ b/app/views/projects/protected_tags/shared/_index.html.haml @@ -2,9 +2,9 @@ %section.settings.no-animate#js-protected-tags-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_tag_settings_content' } } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only Protected tags - %button.btn.js-settings-toggle{ type: 'button' } + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p Limit access to creating and updating tags. #{link_to "What are protected tags?", help_page_path("user/project/protected_tags")} diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index a2009b96c0d..bbef5150a62 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -15,7 +15,6 @@ "expiration_policy_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'expiration-policy'), "garbage_collection_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'container-registry-garbage-collection'), "run_cleanup_policies_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'run-the-cleanup-policy-now'), - "cleanup_policies_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'how-the-cleanup-policy-works'), "project_path": @project.full_path, "gid_prefix": container_repository_gid_prefix, "is_admin": current_user&.admin.to_s, diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml index 41159df1435..7f5acbbe890 100644 --- a/app/views/projects/runners/_runner.html.haml +++ b/app/views/projects/runners/_runner.html.haml @@ -40,5 +40,5 @@ - if runner.tags.present? %p - runner.tags.map(&:name).sort.each do |tag| - %span.badge.badge-primary + %span.badge.gl-badge.sm.badge-pill.badge-primary = tag diff --git a/app/views/projects/security/configuration/show.html.haml b/app/views/projects/security/configuration/show.html.haml index fe47ce327c2..4d6feb9de6d 100644 --- a/app/views/projects/security/configuration/show.html.haml +++ b/app/views/projects/security/configuration/show.html.haml @@ -1,4 +1,4 @@ - breadcrumb_title _("Security Configuration") - page_title _("Security Configuration") -#js-security-configuration-static{ data: {project_path: @project.full_path} } +#js-security-configuration-static{ data: { project_path: @project.full_path, upgrade_path: security_upgrade_path } } diff --git a/app/views/projects/services/prometheus/_configuration_banner.html.haml b/app/views/projects/services/prometheus/_configuration_banner.html.haml index 717df405fa7..9b8da857398 100644 --- a/app/views/projects/services/prometheus/_configuration_banner.html.haml +++ b/app/views/projects/services/prometheus/_configuration_banner.html.haml @@ -3,7 +3,7 @@ - if service.manual_configuration? .info-well - = s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration below') + = s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration.') - else .container-fluid .row @@ -13,14 +13,14 @@ = image_tag 'illustrations/monitoring/getting_started.svg' .col-sm-10 %p.text-success.gl-mt-3 - = s_('PrometheusService|Prometheus is being automatically managed on your clusters') + = s_('PrometheusService|GitLab is managing Prometheus on your clusters.') = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn gl-button' - else .col-sm-2 = image_tag 'illustrations/monitoring/loading.svg' .col-sm-10 %p.gl-mt-3 - = s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments') + = s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments.') = link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn gl-button btn-success' %hr diff --git a/app/views/projects/services/prometheus/_help.html.haml b/app/views/projects/services/prometheus/_help.html.haml index c5b3fd31efa..04bd800c47a 100644 --- a/app/views/projects/services/prometheus/_help.html.haml +++ b/app/views/projects/services/prometheus/_help.html.haml @@ -4,4 +4,4 @@ %h4.gl-mb-3 = s_('PrometheusService|Manual configuration') %p - = s_('PrometheusService|Select the Active checkbox to override the Auto Configuration with custom settings. If unchecked, Auto Configuration settings are used.') + = s_('PrometheusService|Auto configuration settings are used unless you override their values here.') diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index 3b03e213983..d1a95886115 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -1,13 +1,12 @@ -= form_for [@project], remote: true, html: { multipart: true, class: "edit-project js-general-settings-form" }, authenticity_token: true do |f| += form_for [@project], html: { multipart: true, class: "edit-project js-general-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-general-settings' } - = form_errors(@project) %fieldset .row .form-group.col-md-5 = f.label :name, class: 'label-bold', for: 'project_name_edit' do = _('Project name') - = f.text_field :name, class: 'form-control gl-form-input qa-project-name-field', id: "project_name_edit" + = f.text_field :name, class: 'form-control gl-form-input', id: "project_name_edit", data: { qa_selector: 'project_name_field' } .form-group.col-md-7 = f.label :id, class: 'label-bold' do @@ -40,4 +39,4 @@ %hr = link_to _('Remove avatar'), project_avatar_path(@project), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link' - = f.submit _('Save changes'), class: "gl-button btn btn-success gl-mt-6 qa-save-naming-topics-avatar-button" + = f.submit _('Save changes'), class: "gl-button btn btn-success gl-mt-6", data: { qa_selector: 'save_naming_topics_avatar_button' } diff --git a/app/views/projects/settings/ci_cd/_badge.html.haml b/app/views/projects/settings/ci_cd/_badge.html.haml index 2c3e6387972..38d8c8d26e1 100644 --- a/app/views/projects/settings/ci_cd/_badge.html.haml +++ b/app/views/projects/settings/ci_cd/_badge.html.haml @@ -12,21 +12,21 @@ = render 'shared/ref_switcher', destination: 'badges', align_right: true .card-body .row - .col-md-2.text-center + .col-md-2.gl-text-center Markdown .col-md-10.code.js-syntax-highlight = highlight_badge('.md', badge.to_markdown, language: 'markdown') .row %hr .row - .col-md-2.text-center + .col-md-2.gl-text-center HTML .col-md-10.code.js-syntax-highlight = highlight_badge('.html', badge.to_html, language: 'html') .row %hr .row - .col-md-2.text-center + .col-md-2.gl-text-center AsciiDoc .col-md-10.code.js-syntax-highlight = highlight_badge('.adoc', badge.to_asciidoc) diff --git a/app/views/projects/settings/ci_cd/_form.html.haml b/app/views/projects/settings/ci_cd/_form.html.haml index e0c4a3d624e..3b0073848a6 100644 --- a/app/views/projects/settings/ci_cd/_form.html.haml +++ b/app/views/projects/settings/ci_cd/_form.html.haml @@ -96,7 +96,7 @@ = html_escape(_('The regular expression used to find test coverage output in the job log. For example, use %{regex} for Simplecov (Ruby). Leave blank to disable.')) % { regex: '<code>\(\d+.\d+%\)</code>'.html_safe } = link_to sprite_icon('question-o'), help_page_path('ci/pipelines/settings', anchor: 'test-coverage-parsing'), target: '_blank' - = f.submit _('Save changes'), class: "btn btn-success", data: { qa_selector: 'save_general_pipelines_changes_button' } + = f.submit _('Save changes'), class: "btn gl-button btn-success", data: { qa_selector: 'save_general_pipelines_changes_button' } %hr diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 51abb8ed791..cca980b5359 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -1,13 +1,15 @@ - @content_class = "limit-container-width" unless fluid_layout -- page_title _("CI / CD Settings") -- page_title _("CI / CD") +- page_title _("CI/CD Settings") +- page_title _("CI/CD") - expanded = expanded_by_default? - general_expanded = @project.errors.empty? ? expanded : true +- enable_search_settings locals: { container_class: 'gl-my-5' } + %section.settings#js-general-pipeline-settings.no-animate{ class: ('expanded' if general_expanded), data: { qa_selector: 'general_pipelines_settings_content' } } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("General pipelines") %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') @@ -18,7 +20,7 @@ %section.settings#autodevops-settings.no-animate{ class: ('expanded' if expanded), data: { qa_selector: 'autodevops_settings_content' } } .settings-header - %h4 + %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' } = expanded ? _('Collapse') : _('Expand') @@ -35,7 +37,7 @@ %section.settings.no-animate#js-runners-settings{ class: ('expanded' if expanded || params[:expand_runners]), data: { qa_selector: 'runners_settings_content' } } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Runners") %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') @@ -48,7 +50,7 @@ - if Gitlab::CurrentSettings.current_application_settings.keep_latest_artifact? %section.settings.no-animate#js-artifacts-settings{ class: ('expanded' if expanded) } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Artifacts") %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') @@ -65,7 +67,7 @@ %section.settings.no-animate#js-pipeline-triggers{ class: ('expanded' if expanded) } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Pipeline triggers") %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') @@ -78,7 +80,7 @@ - if settings_container_registry_expiration_policy_available?(@project) %section.settings.no-animate#js-registry-policies{ class: ('expanded' if expanded) } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Clean up image tags") %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') @@ -93,7 +95,7 @@ - if can?(current_user, :create_freeze_period, @project) %section.settings.no-animate#js-deploy-freeze-settings{ class: ('expanded' if expanded) } .settings-header - %h4 + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = _("Deploy freezes") %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') diff --git a/app/views/projects/settings/operations/_configuration_banner.html.haml b/app/views/projects/settings/operations/_configuration_banner.html.haml index 69bbd0edac7..888625689f1 100644 --- a/app/views/projects/settings/operations/_configuration_banner.html.haml +++ b/app/views/projects/settings/operations/_configuration_banner.html.haml @@ -3,7 +3,7 @@ - if service.manual_configuration? .info-well.p-2.mt-2 - = s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration below') + = s_('PrometheusService|To enable the installation of Prometheus on your clusters, deactivate the manual configuration.') - else .container-fluid .row @@ -13,12 +13,12 @@ = image_tag 'illustrations/monitoring/getting_started.svg' .col-sm-10 %p.text-success.gl-mt-3 - = s_('PrometheusService|Prometheus is being automatically managed on your clusters') + = s_('PrometheusService|GitLab manages Prometheus on your clusters.') = link_to s_('PrometheusService|Manage clusters'), project_clusters_path(project), class: 'btn' - else .col-sm-2 = image_tag 'illustrations/monitoring/loading.svg' .col-sm-10 %p.gl-mt-3 - = s_('PrometheusService|Automatically deploy and configure Prometheus on your clusters to monitor your project’s environments') + = s_('PrometheusService|Monitor your project’s environments by deploying and configuring Prometheus on your clusters.') = link_to s_('PrometheusService|Install Prometheus on clusters'), project_clusters_path(project), class: 'btn btn-success' diff --git a/app/views/projects/settings/operations/_prometheus.html.haml b/app/views/projects/settings/operations/_prometheus.html.haml index 7ccc829662d..ccf5b5dc75f 100644 --- a/app/views/projects/settings/operations/_prometheus.html.haml +++ b/app/views/projects/settings/operations/_prometheus.html.haml @@ -14,4 +14,4 @@ %b.gl-mb-3 = s_('PrometheusService|Manual configuration') %p - = s_('PrometheusService|Select the Active checkbox to override the Auto Configuration with custom settings. If unchecked, Auto Configuration settings are used.') + = s_('PrometheusService|Auto configuration settings are used unless you override their values here.') diff --git a/app/views/projects/settings/operations/show.html.haml b/app/views/projects/settings/operations/show.html.haml index 73722a5a789..5ba796f5720 100644 --- a/app/views/projects/settings/operations/show.html.haml +++ b/app/views/projects/settings/operations/show.html.haml @@ -2,6 +2,8 @@ - page_title _('Operations Settings') - breadcrumb_title _('Operations Settings') +- enable_search_settings locals: { container_class: 'gl-my-5' } + = render 'projects/settings/operations/alert_management' = render 'projects/settings/operations/incidents' = render 'projects/settings/operations/error_tracking' diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index 24fc137fd29..8ac42ce3f81 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -3,6 +3,8 @@ - @content_class = "limit-container-width" unless fluid_layout - deploy_token_description = s_('DeployTokens|Deploy tokens allow access to packages, your repository, and registry images.') +- enable_search_settings locals: { container_class: 'gl-my-5' } + = render "projects/default_branch/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 e1774c955bc..40faf91eadf 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -6,9 +6,6 @@ = content_for :meta_tags do = auto_discovery_link_tag(:atom, project_path(@project, rss_url_options), title: "#{@project.name} activity") -= content_for :invite_members_sidebar do - = render partial: 'projects/invite_members_link' - = render partial: 'flash_messages', locals: { project: @project } = render "projects/last_push" diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index 61b357831fd..1072d5bce06 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -2,7 +2,7 @@ - release = @releases.find { |release| release.tag == tag.name } - commit_status = @tag_pipeline_statuses[tag.name] unless @tag_pipeline_statuses.nil? -%li.flex-row.allow-wrap.js-tag-list +%li.flex-row.js-tag-list{ class: "gl-white-space-normal!" } .row-main-content = sprite_icon('tag') = link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name' diff --git a/app/views/projects/tree/_tree_header.html.haml b/app/views/projects/tree/_tree_header.html.haml index 6d33fbb535e..340f9811f9a 100644 --- a/app/views/projects/tree/_tree_header.html.haml +++ b/app/views/projects/tree/_tree_header.html.haml @@ -7,7 +7,7 @@ .tree-controls .d-block.d-sm-flex.flex-wrap.align-items-start.gl-children-ml-sm-3< = render_if_exists 'projects/tree/lock_link' - #js-tree-history-link.d-inline-block{ data: { history_link: project_commits_path(@project, @ref) } } + #js-tree-history-link{ data: { history_link: project_commits_path(@project, @ref) } } = render 'projects/find_file_link' = render 'shared/web_ide_button', blob: nil diff --git a/app/views/projects/update.js.haml b/app/views/projects/update.js.haml deleted file mode 100644 index c5eecc900b2..00000000000 --- a/app/views/projects/update.js.haml +++ /dev/null @@ -1,10 +0,0 @@ -- if @project.valid? - :plain - location.href = "#{edit_project_path(@project, anchor: params[:update_section])}"; - location.reload(); -- else - :plain - $(".flash-container").html("#{escape_javascript(render('errors'))}"); - $('.save-project-loader').hide(); - $('.project-edit-container').show(); - $('.edit-project .js-btn-success-general-project-settings').enable(); diff --git a/app/views/search/results/_issuable.html.haml b/app/views/search/results/_issuable.html.haml index 8aad4848aa2..cb8bab7d0de 100644 --- a/app/views/search/results/_issuable.html.haml +++ b/app/views/search/results/_issuable.html.haml @@ -5,6 +5,6 @@ = link_to issuable_path(issuable), data: { track_event: 'click_text', track_label: "#{issuable.class.name.downcase}_title", track_property: 'search_result' }, class: 'gl-w-full' do %span.term.str-truncated.gl-font-weight-bold.gl-ml-2= issuable.title .gl-text-gray-500.gl-my-3 - = sprintf(s_(' %{project_name}#%{issuable_iid} · opened %{issuable_created} by %{author} · updated %{issuable_updated}'), { project_name: issuable.project.full_name, issuable_iid: issuable.iid, issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), issuable_updated: time_ago_with_tooltip(issuable.updated_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe + = sprintf(s_(' %{project_name}#%{issuable_iid} · created %{issuable_created} by %{author} · updated %{issuable_updated}'), { project_name: issuable.project.full_name, issuable_iid: issuable.iid, issuable_created: time_ago_with_tooltip(issuable.created_at, placement: 'bottom'), issuable_updated: time_ago_with_tooltip(issuable.updated_at, placement: 'bottom'), author: link_to_member(@project, issuable.author, avatar: false) }).html_safe .description.term.col-sm-10.gl-px-0 = highlight_and_truncate_issuable(issuable, @search_term, @search_highlight) diff --git a/app/views/shared/_confirm_fork_modal.html.haml b/app/views/shared/_confirm_fork_modal.html.haml index 1390d821899..b692dffce37 100644 --- a/app/views/shared/_confirm_fork_modal.html.haml +++ b/app/views/shared/_confirm_fork_modal.html.haml @@ -8,5 +8,5 @@ .modal-body.p-3 %p= _("You're not allowed to %{tag_start}edit%{tag_end} files in this project directly. Please fork this project, make your changes there, and submit a merge request.") % { tag_start: '', tag_end: ''} .modal-footer - = link_to _('Cancel'), '#', class: "btn btn-cancel", "data-dismiss" => "modal" - = link_to _('Fork project'), fork_path, class: 'btn btn-success', data: { qa_selector: 'fork_project_button' }, method: :post + = link_to _('Cancel'), '#', class: "gl-button btn btn-default btn-cancel", "data-dismiss" => "modal" + = link_to _('Fork project'), fork_path, class: 'gl-button btn btn-confirm', data: { qa_selector: 'fork_project_button' }, method: :post diff --git a/app/views/shared/_group_form.html.haml b/app/views/shared/_group_form.html.haml index c3fac5cd464..eea0c5f37de 100644 --- a/app/views/shared/_group_form.html.haml +++ b/app/views/shared/_group_form.html.haml @@ -39,7 +39,7 @@ .gl-alert-body = _('Changing group URL can have unintended side effects.') = succeed '.' do - = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'changing-a-groups-path'), target: '_blank', class: 'gl-link' + = link_to _('Learn more'), help_page_path('user/group/index', anchor: 'change-a-groups-path'), target: '_blank', class: 'gl-link' - if @group.persisted? .row diff --git a/app/views/shared/_mobile_clone_panel.html.haml b/app/views/shared/_mobile_clone_panel.html.haml index 2854b115506..3edfd502f13 100644 --- a/app/views/shared/_mobile_clone_panel.html.haml +++ b/app/views/shared/_mobile_clone_panel.html.haml @@ -3,8 +3,8 @@ - http_copy_label = _('Copy %{http_label} clone URL') % { http_label: gitlab_config.protocol.upcase } .btn-group.mobile-git-clone.js-mobile-git-clone.btn-block - = clipboard_button(button_text: default_clone_label, text: default_url_to_repo(project), hide_button_icon: true, class: "btn-primary flex-fill bold justify-content-center input-group-text clone-dropdown-btn js-clone-dropdown-label") - %button.btn.btn-primary.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } } + = clipboard_button(button_text: default_clone_label, text: default_url_to_repo(project), hide_button_icon: true, class: "gl-button btn btn-confirm flex-fill input-group-text clone-dropdown-btn js-clone-dropdown-label") + %button.gl-button.btn.btn-confirm.btn-icon.dropdown-toggle.js-dropdown-toggle.flex-grow-0.d-flex-center.w-auto.ml-0{ type: "button", data: { toggle: "dropdown" } } = sprite_icon("chevron-down", css_class: "dropdown-btn-icon icon") %ul.dropdown-menu.dropdown-menu-selectable.dropdown-menu-right.clone-options-dropdown{ data: { dropdown: true } } - if ssh_enabled? diff --git a/app/views/shared/_new_commit_form.html.haml b/app/views/shared/_new_commit_form.html.haml index 62ba89e2576..5641c67e462 100644 --- a/app/views/shared/_new_commit_form.html.haml +++ b/app/views/shared/_new_commit_form.html.haml @@ -3,8 +3,11 @@ = render 'shared/commit_message_container', placeholder: placeholder -- if @project.empty_repo? - = hidden_field_tag 'branch_name', @ref +- if project.empty_repo? + - ref = local_assigns[:ref] || @ref + - branch_name_class = project.empty_repo_upload_experiment? ? 'js-branch-name' : nil + + = hidden_field_tag 'branch_name', ref, class: branch_name_class - else - if can?(current_user, :push_code, @project) .form-group.row.branch diff --git a/app/views/shared/_new_project_item_select.html.haml b/app/views/shared/_new_project_item_select.html.haml index b327b6f7ee8..3817ff8a56d 100644 --- a/app/views/shared/_new_project_item_select.html.haml +++ b/app/views/shared/_new_project_item_select.html.haml @@ -1,7 +1,7 @@ - if any_projects?(@projects) .project-item-select-holder.btn-group.gl-ml-auto.gl-mr-auto.gl-py-3.gl-relative.gl-display-flex.gl-overflow-hidden - %a.btn.gl-button.btn-success.new-project-item-link.block-truncated.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] }, class: "gl-m-0!" } + %a.btn.gl-button.btn-confirm.new-project-item-link.block-truncated.qa-new-project-item-link{ href: '', data: { label: local_assigns[:label], type: local_assigns[:type] }, class: "gl-m-0!" } = loading_icon(color: 'light') = project_select_tag :project_path, class: "project-item-select gl-absolute! gl-visibility-hidden", data: { include_groups: local_assigns[:include_groups], order_by: 'last_activity_at', relative_path: local_assigns[:path], with_shared: local_assigns[:with_shared], include_projects_in_subgroups: local_assigns[:include_projects_in_subgroups] }, with_feature_enabled: local_assigns[:with_feature_enabled] - %button.btn.dropdown-toggle.btn-success.btn-md.gl-button.gl-dropdown-toggle.dropdown-toggle-split.new-project-item-select-button.qa-new-project-item-select-button.gl-p-0.gl-w-100{ class: "gl-m-0!", 'aria-label': _('Toggle project select') } + %button.btn.dropdown-toggle.btn-confirm.btn-md.gl-button.gl-dropdown-toggle.dropdown-toggle-split.new-project-item-select-button.qa-new-project-item-select-button.gl-p-0.gl-w-100{ class: "gl-m-0!", 'aria-label': _('Toggle project select') } = sprite_icon('chevron-down') diff --git a/app/views/shared/_recaptcha_form.html.haml b/app/views/shared/_recaptcha_form.html.haml index aa9e9a34c90..f524747dea0 100644 --- a/app/views/shared/_recaptcha_form.html.haml +++ b/app/views/shared/_recaptcha_form.html.haml @@ -20,4 +20,4 @@ - if has_submit .row-content-block.footer-block - = f.submit _("Submit %{humanized_resource_name}") % { humanized_resource_name: humanized_resource_name }, class: 'btn btn-success' + = f.submit _("Submit %{humanized_resource_name}") % { humanized_resource_name: humanized_resource_name }, class: 'gl-button btn btn-confirm' diff --git a/app/views/shared/access_tokens/_form.html.haml b/app/views/shared/access_tokens/_form.html.haml index 089643f4748..9709ad8428e 100644 --- a/app/views/shared/access_tokens/_form.html.haml +++ b/app/views/shared/access_tokens/_form.html.haml @@ -29,5 +29,9 @@ = f.label :scopes, _('Scopes'), class: 'label-bold' = render 'shared/tokens/scopes_form', prefix: prefix, token: token, scopes: scopes + - if prefix == :personal_access_token && Feature.enabled?(:personal_access_tokens_scoped_to_projects, current_user) + .js-access-tokens-projects + %input{ type: 'hidden', name: 'temporary-name', id: 'temporary-id' } + .gl-mt-3 - = f.submit _('Create %{type}') % { type: type }, class: 'gl-button btn btn-success', data: { qa_selector: 'create_token_button' } + = f.submit _('Create %{type}') % { type: type }, class: 'gl-button btn btn-confirm', data: { qa_selector: 'create_token_button' } diff --git a/app/views/shared/boards/_show.html.haml b/app/views/shared/boards/_show.html.haml index ababbdc7eb9..8c0893adaaa 100644 --- a/app/views/shared/boards/_show.html.haml +++ b/app/views/shared/boards/_show.html.haml @@ -2,7 +2,7 @@ - group = local_assigns.fetch(:group, false) -# TODO: Move group_id and can_admin_list to the board store See: https://gitlab.com/gitlab-org/gitlab/-/issues/213082 -- can_admin_list = can?(current_user, :admin_list, current_board_parent) == true +- can_admin_list = can?(current_user, :admin_issue_board_list, current_board_parent) == true - @no_breadcrumb_container = true - @no_container = true - @content_class = "issue-boards-content js-focus-mode-board" diff --git a/app/views/shared/boards/_switcher.html.haml b/app/views/shared/boards/_switcher.html.haml index 58e877f20fe..18e0ca20cf7 100644 --- a/app/views/shared/boards/_switcher.html.haml +++ b/app/views/shared/boards/_switcher.html.haml @@ -7,7 +7,7 @@ milestone_path: milestones_filter_path(milestone_filter_opts), board_base_url: board_base_url, has_missing_boards: (!multiple_boards_available? && current_board_parent.boards.size > 1).to_s, - can_admin_board: can?(current_user, :admin_board, parent).to_s, + can_admin_board: can?(current_user, :admin_issue_board, parent).to_s, multiple_issue_boards_available: parent.multiple_issue_boards_available?.to_s, labels_path: labels_filter_path_with_defaults(only_group_labels: true, include_descendant_groups: true), labels_web_url: parent.is_a?(Project) ? project_labels_path(@project) : group_labels_path(@group), diff --git a/app/views/shared/boards/components/_sidebar.html.haml b/app/views/shared/boards/components/_sidebar.html.haml index 3daa13fb488..59dd571604b 100644 --- a/app/views/shared/boards/components/_sidebar.html.haml +++ b/app/views/shared/boards/components/_sidebar.html.haml @@ -25,7 +25,3 @@ = render "shared/boards/components/sidebar/labels" = render_if_exists "shared/boards/components/sidebar/weight" = render "shared/boards/components/sidebar/notifications" - %remove-btn{ ":issue" => "issue", - ":issue-update" => "issue.sidebarInfoEndpoint", - ":list" => "list", - "v-if" => "canRemove" } diff --git a/app/views/shared/deploy_keys/_index.html.haml b/app/views/shared/deploy_keys/_index.html.haml index 5d9c2cd25b4..be6fe94e497 100644 --- a/app/views/shared/deploy_keys/_index.html.haml +++ b/app/views/shared/deploy_keys/_index.html.haml @@ -1,8 +1,8 @@ - expanded = expanded_by_default? %section.qa-deploy-keys-settings.settings.no-animate#js-deploy-keys-settings{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_keys_settings_content' } } .settings-header - %h4= _('Deploy keys') - %button.btn.js-settings-toggle{ type: 'button' } + %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' %p - link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/deploy_keys/index') } diff --git a/app/views/shared/deploy_keys/_project_group_form.html.haml b/app/views/shared/deploy_keys/_project_group_form.html.haml index bad25086d9f..25357ccdc65 100644 --- a/app/views/shared/deploy_keys/_project_group_form.html.haml +++ b/app/views/shared/deploy_keys/_project_group_form.html.haml @@ -21,4 +21,4 @@ = _('Allow this key to push to this repository') .form-group.row - = f.submit _("Add key"), class: "btn-success btn" + = f.submit _("Add key"), class: "btn gl-button btn-confirm" diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index 052d68baf71..2ddfcf43756 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -48,4 +48,4 @@ .text-secondary= s_('DeployTokens|Allows write access to the package registry.') .gl-mt-3 - = f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-success qa-create-deploy-token' + = f.submit s_('DeployTokens|Create deploy token'), class: 'btn gl-button btn-confirm qa-create-deploy-token' diff --git a/app/views/shared/deploy_tokens/_index.html.haml b/app/views/shared/deploy_tokens/_index.html.haml index e64b8634cf5..9d1a24d4c24 100644 --- a/app/views/shared/deploy_tokens/_index.html.haml +++ b/app/views/shared/deploy_tokens/_index.html.haml @@ -2,8 +2,8 @@ %section.qa-deploy-tokens-settings.settings.no-animate#js-deploy-tokens{ class: ('expanded' if expanded), data: { qa_selector: 'deploy_tokens_settings_content' } } .settings-header - %h4= s_('DeployTokens|Deploy tokens') - %button.gl-button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= s_('DeployTokens|Deploy tokens') + %button.btn.gl-button.btn-default.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p = description diff --git a/app/views/shared/empty_states/_deploy_keys.html.haml b/app/views/shared/empty_states/_deploy_keys.html.haml index 6fca64d805b..6c615de9c56 100644 --- a/app/views/shared/empty_states/_deploy_keys.html.haml +++ b/app/views/shared/empty_states/_deploy_keys.html.haml @@ -6,4 +6,4 @@ .text-content.gl-mx-auto.gl-my-0.gl-p-5 %h4.h4= _('Deploy Keys') %p= _('Deploy keys grant read/write access to all repositories in your instance') - = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'btn btn-success btn-md gl-button' + = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'gl-button btn btn-confirm btn-md' diff --git a/app/views/shared/empty_states/_issues.html.haml b/app/views/shared/empty_states/_issues.html.haml index 997bc7b8a98..8ccf14463c7 100644 --- a/app/views/shared/empty_states/_issues.html.haml +++ b/app/views/shared/empty_states/_issues.html.haml @@ -6,6 +6,8 @@ - opened_issues_count = issuables_count_for_state(:issues, :opened) - is_opened_state = params[:state] == 'opened' - is_closed_state = params[:state] == 'closed' +- issuable_type = 'issues' +- can_edit = can?(current_user, :admin_project, @project) .row.empty-state .col-12 @@ -20,7 +22,7 @@ = _("To widen your search, change or remove filters above") - if show_new_issue_link?(@project) .text-center - = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success" + = link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm" - elsif is_opened_state && opened_issues_count == 0 && closed_issues_count > 0 %h4.text-center = _("There are no open issues") @@ -28,7 +30,7 @@ = _("To keep this project going, create a new issue") - if show_new_issue_link?(@project) .text-center - = link_to _("New issue"), new_project_issue_path(@project), class: "btn btn-success" + = link_to _("New issue"), new_project_issue_path(@project), class: "gl-button btn btn-confirm" - elsif is_closed_state && opened_issues_count > 0 && closed_issues_count == 0 %h4.text-center = _("There are no closed issues") @@ -42,10 +44,10 @@ - if project_select_button = render 'shared/new_project_item_select', path: 'issues/new', label: _('New issue'), type: :issues, with_feature_enabled: 'issues' - else - = link_to _('New issue'), button_path, class: 'btn gl-button btn-success', id: 'new_issue_link' + = link_to _('New issue'), button_path, class: 'gl-button btn btn-confirm', id: 'new_issue_link' - if show_import_button - = render 'projects/issues/import_csv/button', type: :text + .js-csv-import-export-buttons{ data: { show_import_button: show_import_button.to_s, issuable_type: issuable_type, import_csv_issues_path: import_csv_namespace_project_issues_path, can_edit: can_edit.to_s, project_import_jira_path: project_import_jira_path(@project), max_attachment_size: number_to_human_size(Gitlab::CurrentSettings.max_attachment_size.megabytes), container_class: 'gl-display-inline-flex gl-vertical-align-middle', show_label: 'true' } } %hr %p.gl-text-center.gl-mb-0 %strong @@ -62,7 +64,4 @@ %p = _("The Issue Tracker is the place to add things that need to be improved or solved in a project. You can register or sign in to create issues for this project.") .text-center - = link_to _('Register / Sign In'), new_user_session_path, class: 'btn btn-success' - -- if show_import_button - = render 'projects/issues/import_csv/modal' + = link_to _('Register / Sign In'), new_user_session_path, class: 'gl-button btn btn-confirm' diff --git a/app/views/shared/empty_states/_labels.html.haml b/app/views/shared/empty_states/_labels.html.haml index a739103641e..4e5e04ba4d4 100644 --- a/app/views/shared/empty_states/_labels.html.haml +++ b/app/views/shared/empty_states/_labels.html.haml @@ -8,7 +8,7 @@ %p= _("You can also star a label to make it a priority label.") .text-center - if can?(current_user, :admin_label, @project) - = link_to _('New label'), new_project_label_path(@project), class: 'btn btn-success qa-label-create-new', title: _('New label'), id: 'new_label_link' - = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn btn-success btn-inverted', title: _('Generate a default set of labels'), id: 'generate_labels_link' + = link_to _('New label'), new_project_label_path(@project), class: 'btn gl-button btn-confirm qa-label-create-new', title: _('New label'), id: 'new_label_link' + = link_to _('Generate a default set of labels'), generate_project_labels_path(@project), method: :post, class: 'btn gl-button btn-confirm-secondary', title: _('Generate a default set of labels'), id: 'generate_labels_link' - if can?(current_user, :admin_label, @group) - = link_to _('New label'), new_group_label_path(@group), class: 'btn btn-success', title: _('New label'), id: 'new_label_link' + = link_to _('New label'), new_group_label_path(@group), class: 'btn gl-button btn-confirm', title: _('New label'), id: 'new_label_link' diff --git a/app/views/shared/empty_states/_merge_requests.html.haml b/app/views/shared/empty_states/_merge_requests.html.haml index 837c3afc796..879447f16ae 100644 --- a/app/views/shared/empty_states/_merge_requests.html.haml +++ b/app/views/shared/empty_states/_merge_requests.html.haml @@ -20,7 +20,7 @@ = _("To widen your search, change or remove filters above") .text-center - if can_create_merge_request - = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request") + = link_to _("New merge request"), project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request") - elsif is_opened_state && opened_merged_count == 0 && closed_merged_count > 0 %h4.text-center = _("There are no open merge requests") @@ -28,7 +28,7 @@ = _("To keep this project going, create a new merge request") .text-center - if can_create_merge_request - = link_to _("New merge request"), project_new_merge_request_path(@project), class: "btn btn-success", title: _("New merge request") + = link_to _("New merge request"), project_new_merge_request_path(@project), class: "gl-button btn btn-confirm", title: _("New merge request") - elsif is_closed_state && opened_merged_count > 0 && closed_merged_count == 0 %h4.text-center = _("There are no closed merge requests") @@ -42,4 +42,4 @@ - if project_select_button = render 'shared/new_project_item_select', path: 'merge_requests/new', label: _('New merge request'), type: :merge_requests, with_feature_enabled: 'merge_requests' - else - = link_to _('New merge request'), button_path, class: 'btn btn-success', title: _('New merge request'), id: 'new_merge_request_link' + = link_to _('New merge request'), button_path, class: 'gl-button btn btn-confirm', title: _('New merge request'), id: 'new_merge_request_link' diff --git a/app/views/shared/empty_states/_profile_tabs.html.haml b/app/views/shared/empty_states/_profile_tabs.html.haml index abcf9740200..42a845846d1 100644 --- a/app/views/shared/empty_states/_profile_tabs.html.haml +++ b/app/views/shared/empty_states/_profile_tabs.html.haml @@ -13,9 +13,9 @@ %p= current_user_empty_message_description - if secondary_button_link.present? - = link_to secondary_button_label, secondary_button_link, class: 'gl-button btn btn-success btn-inverted' + = link_to secondary_button_label, secondary_button_link, class: 'gl-button btn btn-confirm btn-inverted' - if primary_button_link.present? - = link_to primary_button_label, primary_button_link, class: 'gl-button btn btn-success' + = link_to primary_button_label, primary_button_link, class: 'gl-button btn btn-confirm' - else %h5= visitor_empty_message diff --git a/app/views/shared/empty_states/_snippets.html.haml b/app/views/shared/empty_states/_snippets.html.haml index 105efcc3c88..20ca7954479 100644 --- a/app/views/shared/empty_states/_snippets.html.haml +++ b/app/views/shared/empty_states/_snippets.html.haml @@ -12,7 +12,7 @@ = s_('SnippetsEmptyState|Store, share, and embed small pieces of code and text.') .mt-2< - if button_path - = link_to s_('SnippetsEmptyState|New snippet'), button_path, class: 'btn gl-button btn-success', title: s_('SnippetsEmptyState|New snippet'), id: 'new_snippet_link', data: { qa_selector: 'create_first_snippet_link' } + = link_to s_('SnippetsEmptyState|New snippet'), button_path, class: 'btn gl-button btn-confirm', title: s_('SnippetsEmptyState|New snippet'), id: 'new_snippet_link', data: { qa_selector: 'create_first_snippet_link' } = link_to s_('SnippetsEmptyState|Documentation'), help_page_path('user/snippets.md'), class: 'btn gl-button btn-default', title: s_('SnippetsEmptyState|Documentation') - else %h4.text-center= s_('SnippetsEmptyState|There are no snippets to show.') diff --git a/app/views/shared/empty_states/_wikis.html.haml b/app/views/shared/empty_states/_wikis.html.haml index 4150406a4ea..0bddffa881a 100644 --- a/app/views/shared/empty_states/_wikis.html.haml +++ b/app/views/shared/empty_states/_wikis.html.haml @@ -3,7 +3,7 @@ - if can?(current_user, :create_wiki, @wiki.container) - create_path = wiki_page_path(@wiki, params[:id], view: 'create') - - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn gl-button btn-success qa-create-first-page-link', title: s_('WikiEmpty|Create your first page') + - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn gl-button btn-confirm qa-create-first-page-link', title: s_('WikiEmpty|Create your first page') = render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do %h4.text-left @@ -18,7 +18,7 @@ - elsif @project && can?(current_user, :read_issue, @project) - issues_link = link_to s_('WikiEmptyIssueMessage|issue tracker'), project_issues_path(@project) - - new_issue_link = link_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), class: 'btn gl-button btn-success', title: s_('WikiEmptyIssueMessage|Suggest wiki improvement') + - new_issue_link = link_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), class: 'btn gl-button btn-confirm', title: s_('WikiEmptyIssueMessage|Suggest wiki improvement') = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do %h4 diff --git a/app/views/shared/form_elements/_apply_template_warning.html.haml b/app/views/shared/form_elements/_apply_template_warning.html.haml index 73be0c741dc..61c0e5c42f4 100644 --- a/app/views/shared/form_elements/_apply_template_warning.html.haml +++ b/app/views/shared/form_elements/_apply_template_warning.html.haml @@ -7,7 +7,7 @@ %p = _("Applying a template will replace the existing issue description. Any changes you have made will be lost.") - %button.js-override-template.btn.btn-warning.mr-2{ type: 'button' } + %button.js-override-template.btn.gl-button.btn-confirm.mr-2{ type: 'button' } = _("Apply template") - %button.js-close-btn.js-cancel-btn.btn.btn-inverted{ type: 'button' } + %button.js-close-btn.js-cancel-btn.btn.gl-button.btn-default{ type: 'button' } = _("Cancel") diff --git a/app/views/shared/gitpod/_enable_gitpod_modal.html.haml b/app/views/shared/gitpod/_enable_gitpod_modal.html.haml index a6bd1d10e43..dacfbf63db8 100644 --- a/app/views/shared/gitpod/_enable_gitpod_modal.html.haml +++ b/app/views/shared/gitpod/_enable_gitpod_modal.html.haml @@ -8,5 +8,5 @@ .modal-body.p-3 %p= (_("To use Gitpod you must first enable the feature in the integrations section of your %{user_prefs}.") % { user_prefs: link_to(_('user preferences'), profile_preferences_path(anchor: 'gitpod')) }).html_safe .modal-footer - = link_to _('Cancel'), '#', class: "btn btn-cancel", "data-dismiss" => "modal" - = link_to _('Enable Gitpod'), profile_path(user: { gitpod_enabled: true}), class: 'btn btn-success', method: :put + = link_to _('Cancel'), '#', class: "gl-button btn btn-default btn-cancel", "data-dismiss" => "modal" + = link_to _('Enable Gitpod'), profile_path(user: { gitpod_enabled: true}), class: 'gl-button btn btn-confirm', method: :put diff --git a/app/views/shared/groups/_empty_state.html.haml b/app/views/shared/groups/_empty_state.html.haml index 1d3bc1d6959..506954c53ca 100644 --- a/app/views/shared/groups/_empty_state.html.haml +++ b/app/views/shared/groups/_empty_state.html.haml @@ -9,5 +9,5 @@ - if invite_group_members?(@group) = link_to _('Invite your team'), group_group_members_path(@group), - class: 'gl-button btn btn-success-secondary', + class: 'gl-button btn btn-confirm-secondary', data: { track_event: 'click_invite_team_group_empty_state', track_label: 'invite_team_group_empty_state' } diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 2a91ffbdbaa..41b7d7e9e1b 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -64,17 +64,17 @@ .row-content-block{ class: (is_footer ? "footer-block" : "middle-block") } .float-right - if issuable.new_record? - = link_to 'Cancel', polymorphic_path([@project, issuable.class]), class: 'gl-button btn btn-cancel' + = link_to _('Cancel'), polymorphic_path([@project, issuable.class]), class: 'gl-button btn btn-cancel' - else - if can?(current_user, :"destroy_#{issuable.to_ability_name}", @project) = link_to 'Delete', polymorphic_path([@project, issuable], params: { destroy_confirm: true }), data: { confirm: "#{issuable.human_class_name} will be removed! Are you sure?" }, method: :delete, class: 'btn btn-danger btn-grouped' - = link_to 'Cancel', polymorphic_path([@project, issuable]), class: 'gl-button btn btn-grouped btn-cancel' + = link_to _('Cancel'), polymorphic_path([@project, issuable]), class: 'gl-button btn btn-grouped btn-default btn-cancel' %span.gl-mr-3 - if issuable.new_record? - = form.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'gl-button btn btn-success qa-issuable-create-button' + = form.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'gl-button btn btn-confirm', data: { qa_selector: 'issuable_create_button' } - else - = form.submit 'Save changes', class: 'gl-button btn btn-success' + = form.submit 'Save changes', class: 'gl-button btn btn-confirm' - if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path) .inline.gl-mt-3 diff --git a/app/views/shared/issuable/_label_page_create.html.haml b/app/views/shared/issuable/_label_page_create.html.haml index 005b76180fd..cf7e6cf8365 100644 --- a/app/views/shared/issuable/_label_page_create.html.haml +++ b/app/views/shared/issuable/_label_page_create.html.haml @@ -19,7 +19,7 @@ %input.js-add-list{ type: "checkbox", name: "add_list", checked: add_list } %span= _('Add list') .clearfix - %button.gl-button.btn.btn-success.float-left.js-new-label-btn{ type: "button" } + %button.gl-button.btn.btn-confirm.float-left.js-new-label-btn{ type: "button" } = _('Create') %button.gl-button.btn.btn-default.float-right.js-cancel-label-btn{ type: "button" } = _('Cancel') diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml index c715cd8f736..a3d6a2c8e04 100644 --- a/app/views/shared/issuable/_nav.html.haml +++ b/app/views/shared/issuable/_nav.html.haml @@ -4,7 +4,7 @@ %ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs %li{ class: active_when(params[:state] == 'opened') }> - = link_to page_filter_path(state: 'opened'), id: 'state-opened', title: _("Filter by %{page_context_word} that are currently opened.") % { page_context_word: page_context_word }, data: { state: 'opened' } do + = link_to page_filter_path(state: 'opened'), id: 'state-opened', title: _("Filter by %{page_context_word} that are currently open.") % { page_context_word: page_context_word }, data: { state: 'opened' } do #{issuables_state_counter_text(type, :opened, display_count)} - if type == :merge_requests diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index d1e74cc771e..f5b2868aa6c 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -5,7 +5,10 @@ - placeholder = local_assigns[:placeholder] || _('Search or filter results...') - is_not_boards_modal_or_productivity_analytics = type != :boards_modal && type != :productivity_analytics - block_css_class = is_not_boards_modal_or_productivity_analytics ? 'row-content-block second-block' : '' -- user_can_admin_list = board && can?(current_user, :admin_list, board.resource_parent) +- if board && board.to_type == "EpicBoard" + - user_can_admin_list = can?(current_user, :admin_epic_board_list, board.resource_parent) +- elsif board + - user_can_admin_list = can?(current_user, :admin_issue_board_list, board.resource_parent) .issues-filters{ class: ("w-100" if type == :boards_modal) } .issues-details-filters.filtered-search-block.d-flex.flex-column.flex-lg-row{ class: block_css_class, "v-pre" => type == :boards_modal } @@ -18,191 +21,194 @@ - if @can_bulk_update .check-all-holder.d-none.d-sm-block.hidden = check_box_tag "check-all-issues", nil, false, class: "check-all-issues left" - .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row - .filtered-search-box - - if type != :boards_modal && type != :boards - - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline") - = dropdown_tag(text, - options: { wrapper_class: "filtered-search-history-dropdown-wrapper", - toggle_class: "btn filtered-search-history-dropdown-toggle-button", - dropdown_class: "filtered-search-history-dropdown", - content_class: "filtered-search-history-dropdown-content" }) do - .js-filtered-search-history-dropdown{ data: { full_path: search_history_storage_prefix } } - .filtered-search-box-input-container.droplab-dropdown - .scroll-container - %ul.tokens-container.list-unstyled - %li.input-token - %input.form-control.filtered-search{ search_filter_input_options(type, placeholder) } - #js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item{ data: {hint: "#{'{{hint}}'}", tag: "#{'{{tag}}'}", action: "#{'{{hint === \'search\' ? \'submit\' : \'\' }}'}" } } - %button.btn.btn-link{ type: 'button' } - -# Encapsulate static class name `{{icon}}` inside #{} to bypass - -# haml lint's ClassAttributeWithStaticValue - %svg - %use{ 'xlink:href': "#{'{{icon}}'}" } - %span.js-filter-hint - {{formattedKey}} - #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } } - %li.filter-dropdown-item{ data: { value: "{{ title }}" } } - %button.btn.btn-link{ type: 'button' } - {{ title }} - %span.btn-helptext - {{ help }} - #js-dropdown-author.filtered-search-input-dropdown-menu.dropdown-menu - - if current_user - %ul{ data: { dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: current_user - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: User.new(username: '{{username}}', name: '{{name}}'), - avatar: { lazy: true, url: '{{avatar_url}}' } - #js-dropdown-assignee.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore + - if Feature.enabled?(:boards_filtered_search, @group) + #js-board-filtered-search + - else + .issues-other-filters.filtered-search-wrapper.d-flex.flex-column.flex-md-row + .filtered-search-box + - if type != :boards_modal && type != :boards + - text = tag.span(sprite_icon('history'), class: "d-md-none") + tag.span(_('Recent searches'), class: "d-none d-md-inline") + = dropdown_tag(text, + options: { wrapper_class: "filtered-search-history-dropdown-wrapper", + toggle_class: "btn filtered-search-history-dropdown-toggle-button", + dropdown_class: "filtered-search-history-dropdown", + content_class: "filtered-search-history-dropdown-content" }) do + .js-filtered-search-history-dropdown{ data: { full_path: search_history_storage_prefix } } + .filtered-search-box-input-container.droplab-dropdown + .scroll-container + %ul.tokens-container.list-unstyled + %li.input-token + %input.form-control.filtered-search{ search_filter_input_options(type, placeholder) } + #js-dropdown-hint.filtered-search-input-dropdown-menu.dropdown-menu.hint-dropdown + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item{ data: {hint: "#{'{{hint}}'}", tag: "#{'{{tag}}'}", action: "#{'{{hint === \'search\' ? \'submit\' : \'\' }}'}" } } + %button.btn.btn-link{ type: 'button' } + -# Encapsulate static class name `{{icon}}` inside #{} to bypass + -# haml lint's ClassAttributeWithStaticValue + %svg + %use{ 'xlink:href': "#{'{{icon}}'}" } + %span.js-filter-hint + {{formattedKey}} + #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } } + %li.filter-dropdown-item{ data: { value: "{{ title }}" } } + %button.btn.btn-link{ type: 'button' } + {{ title }} + %span.btn-helptext + {{ help }} + #js-dropdown-author.filtered-search-input-dropdown-menu.dropdown-menu - if current_user + %ul{ data: { dropdown: true } } + = render 'shared/issuable/user_dropdown_item', + user: current_user + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } = render 'shared/issuable/user_dropdown_item', - user: current_user - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: User.new(username: '{{username}}', name: '{{name}}'), - avatar: { lazy: true, url: '{{avatar_url}}' } - #js-dropdown-reviewer.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - - if current_user + user: User.new(username: '{{username}}', name: '{{name}}'), + avatar: { lazy: true, url: '{{avatar_url}}' } + #js-dropdown-assignee.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + - if current_user + = render 'shared/issuable/user_dropdown_item', + user: current_user + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + = render 'shared/issuable/user_dropdown_item', + user: User.new(username: '{{username}}', name: '{{name}}'), + avatar: { lazy: true, url: '{{avatar_url}}' } + #js-dropdown-reviewer.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + - if current_user + = render 'shared/issuable/user_dropdown_item', + user: current_user + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } = render 'shared/issuable/user_dropdown_item', - user: current_user - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - = render 'shared/issuable/user_dropdown_item', - user: User.new(username: '{{username}}', name: '{{name}}'), - avatar: { lazy: true, url: '{{avatar_url}}' } - = render_if_exists 'shared/issuable/approver_dropdown' - = render_if_exists 'shared/issuable/approved_by_dropdown' - #js-dropdown-milestone.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.filter-dropdown-item{ data: { value: 'Upcoming' } } - %button.btn.btn-link{ type: 'button' } - = _('Upcoming') - %li.filter-dropdown-item{ data: { value: 'Started' } } - %button.btn.btn-link{ type: 'button' } - = _('Started') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link.js-data-value{ type: 'button' } - {{title}} - = render_if_exists 'shared/issuable/filter_iteration', type: type - #js-dropdown-release.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link.js-data-value{ type: 'button' } - {{title}} - #js-dropdown-label.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link{ type: 'button' } - %span.dropdown-label-box{ style: 'background: {{color}}' } - %span.label-title.js-data-value + user: User.new(username: '{{username}}', name: '{{name}}'), + avatar: { lazy: true, url: '{{avatar_url}}' } + = render_if_exists 'shared/issuable/approver_dropdown' + = render_if_exists 'shared/issuable/approved_by_dropdown' + #js-dropdown-milestone.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.filter-dropdown-item{ data: { value: 'Upcoming' } } + %button.btn.btn-link{ type: 'button' } + = _('Upcoming') + %li.filter-dropdown-item{ data: { value: 'Started' } } + %button.btn.btn-link{ type: 'button' } + = _('Started') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link.js-data-value{ type: 'button' } + {{title}} + = render_if_exists 'shared/issuable/filter_iteration', type: type + #js-dropdown-release.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link.js-data-value{ type: 'button' } {{title}} - #js-dropdown-my-reaction.filtered-search-input-dropdown-menu.dropdown-menu - %ul{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'None' } } - %button.btn.btn-link{ type: 'button' } - = _('None') - %li.filter-dropdown-item{ data: { value: 'Any' } } - %button.btn.btn-link{ type: 'button' } - = _('Any') - %li.divider.droplab-item-ignore - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link{ type: 'button' } - %gl-emoji - %span.js-data-value.gl-ml-3 - {{name}} - #js-dropdown-wip.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('Yes') - %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('No') - #js-dropdown-confidential.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dropdown: true } } - %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('Yes') - %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } - %button.btn.btn-link{ type: 'button' } - = _('No') - - unless disable_target_branch - #js-dropdown-target-branch.filtered-search-input-dropdown-menu.dropdown-menu + #js-dropdown-label.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link{ type: 'button' } + %span.dropdown-label-box{ style: 'background: {{color}}' } + %span.label-title.js-data-value + {{title}} + #js-dropdown-my-reaction.filtered-search-input-dropdown-menu.dropdown-menu + %ul{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'None' } } + %button.btn.btn-link{ type: 'button' } + = _('None') + %li.filter-dropdown-item{ data: { value: 'Any' } } + %button.btn.btn-link{ type: 'button' } + = _('Any') + %li.divider.droplab-item-ignore + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link{ type: 'button' } + %gl-emoji + %span.js-data-value.gl-ml-3 + {{name}} + #js-dropdown-wip.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('Yes') + %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('No') + #js-dropdown-confidential.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dropdown: true } } + %li.filter-dropdown-item{ data: { value: 'yes', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('Yes') + %li.filter-dropdown-item{ data: { value: 'no', capitalize: true } } + %button.btn.btn-link{ type: 'button' } + = _('No') + - unless disable_target_branch + #js-dropdown-target-branch.filtered-search-input-dropdown-menu.dropdown-menu + %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } + %li.filter-dropdown-item + %button.btn.btn-link.js-data-value.monospace + {{title}} + #js-dropdown-environment.filtered-search-input-dropdown-menu.dropdown-menu %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %li.filter-dropdown-item - %button.btn.btn-link.js-data-value.monospace + %button.btn.btn-link.js-data-value{ type: 'button' } {{title}} - #js-dropdown-environment.filtered-search-input-dropdown-menu.dropdown-menu - %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } - %li.filter-dropdown-item - %button.btn.btn-link.js-data-value{ type: 'button' } - {{title}} - = render_if_exists 'shared/issuable/filter_weight', type: type + = render_if_exists 'shared/issuable/filter_weight', type: type - = render_if_exists 'shared/issuable/filter_epic', type: type + = render_if_exists 'shared/issuable/filter_epic', type: type - %button.clear-search.hidden{ type: 'button' } - = sprite_icon('close', size: 16, css_class: 'clear-search-icon') + %button.clear-search.hidden{ type: 'button' } + = sprite_icon('close', size: 16, css_class: 'clear-search-icon') .filter-dropdown-container.d-flex.flex-column.flex-md-row - if type == :boards #js-board-labels-toggle - if current_user #js-board-epics-swimlanes-toggle - .js-board-config{ data: { can_admin_list: user_can_admin_list, has_scope: board.scoped? } } + .js-board-config{ data: { can_admin_list: user_can_admin_list.to_s, has_scope: board.scoped?.to_s } } - if user_can_admin_list - - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) + - if Feature.enabled?(:board_new_list, board.resource_parent, default_enabled: :yaml) || board.to_type == "EpicBoard" .js-create-column-trigger{ data: board_list_data } - else = render 'shared/issuable/board_create_list_dropdown', board: board - if @project - #js-add-issues-btn{ data: { can_admin_list: can?(current_user, :admin_list, @project) } } + #js-add-issues-btn{ data: { can_admin_list: can?(current_user, :admin_issue_board_list, @project) } } #js-toggle-focus-btn - elsif is_not_boards_modal_or_productivity_analytics && show_sorting_dropdown = render 'shared/issuable/sort_dropdown' diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index f26f4adc19a..7a1bb9dd3ca 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -34,7 +34,7 @@ - if issuable_sidebar[:supports_milestone] - milestone = issuable_sidebar[:milestone] || {} - .block.milestone{ data: { qa_selector: 'milestone_block' } } + .block.milestone{ class: 'gl-border-b-0!', data: { qa_selector: 'milestone_block' } } .sidebar-collapsed-icon.has-tooltip{ title: sidebar_milestone_tooltip_label(milestone), data: { container: 'body', html: 'true', placement: 'left', boundary: 'viewport' } } = sprite_icon('clock') %span.milestone-title.collapse-truncated-title @@ -58,8 +58,10 @@ .selectbox.hide-collapsed = f.hidden_field 'milestone_id', value: milestone[:id], id: nil = dropdown_tag('Milestone', options: { title: _('Assign milestone'), toggle_class: 'js-milestone-select js-extra-options', filter: true, dropdown_class: 'dropdown-menu-selectable', placeholder: _('Search milestones'), data: { show_no: true, field_name: "#{issuable_type}[milestone_id]", project_id: issuable_sidebar[:project_id], issuable_id: issuable_sidebar[:id], ability_name: issuable_type, issue_update: issuable_sidebar[:issuable_json_path], use_id: true, default_no: true, selected: milestone[:title], null_default: true, display: 'static' }}) - - if @project.group.present? && issuable_sidebar[:supports_iterations] - = 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 @project.group.present? && issuable_sidebar[:supports_iterations] + .block{ class: 'gl-pt-0!' } + = 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[:supports_time_tracking] #issuable-time-tracker.block @@ -118,6 +120,8 @@ %script#js-confidential-issue-data{ type: "application/json" }= { is_confidential: issuable_sidebar[:confidential], is_editable: can_edit_issuable }.to_json.html_safe #js-confidential-entry-point + = render_if_exists 'shared/issuable/sidebar_cve_id_request', issuable_sidebar: issuable_sidebar + %script#js-lock-issue-data{ type: "application/json" }= { is_locked: !!issuable_sidebar[:discussion_locked], is_editable: can_edit_issuable }.to_json.html_safe #js-lock-entry-point @@ -126,17 +130,8 @@ - if signed_in .js-sidebar-subscriptions-entry-point - - project_ref = issuable_sidebar[:reference] .block.with-sub-blocks - .project-reference.sub-block - .sidebar-collapsed-icon.dont-change-state - = clipboard_button(text: project_ref, title: _('Copy reference'), placement: "left", boundary: 'viewport') - .cross-project-reference.hide-collapsed - %span - = _('Reference:') - %cite{ title: project_ref } - = project_ref - = clipboard_button(text: project_ref, title: _('Copy reference'), placement: "left", boundary: 'viewport') + #js-reference-entry-point - if issuable_type == 'merge_request' .sidebar-source-branch.sub-block .sidebar-collapsed-icon.dont-change-state @@ -163,7 +158,7 @@ = dropdown_content = dropdown_loading = dropdown_footer add_content_class: true do - %button.gl-button.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true } + %button.gl-button.btn.btn-confirm.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true } = _('Move') = loading_icon(css_class: 'gl-vertical-align-text-bottom sidebar-move-issue-confirmation-loading-icon') diff --git a/app/views/shared/issuable/_sidebar_assignees.html.haml b/app/views/shared/issuable/_sidebar_assignees.html.haml index 2b6920ed80f..26986c913f0 100644 --- a/app/views/shared/issuable/_sidebar_assignees.html.haml +++ b/app/views/shared/issuable/_sidebar_assignees.html.haml @@ -43,6 +43,9 @@ - options[:dropdown_class] += ' dropdown-extended-height' - options[:footer_content] = true - options[:wrapper_class] = 'js-sidebar-assignee-dropdown' + - options[:toggle_class] += ' js-invite-members-track' + - data['track-event'] = show_invite_members_track_event + - options[:data].merge!(data) - invite_text = _('Invite Members') - track_label = 'edit_assignee' diff --git a/app/views/shared/issuable/_sidebar_reviewers.html.haml b/app/views/shared/issuable/_sidebar_reviewers.html.haml index 0142c87aeb0..1a8f1a2639f 100644 --- a/app/views/shared/issuable/_sidebar_reviewers.html.haml +++ b/app/views/shared/issuable/_sidebar_reviewers.html.haml @@ -39,17 +39,4 @@ - data['max-select'] = dropdown_options[:data][:'max-select'] if dropdown_options[:data][:'max-select'] - options[:data].merge!(data) - - if experiment_enabled?(:invite_members_version_a) && can_import_members? - - options[:dropdown_class] += ' dropdown-extended-height' - - options[:footer_content] = true - - options[:wrapper_class] = 'js-sidebar-reviewer-dropdown' - - = dropdown_tag(title, options: options) do - %ul.dropdown-footer-list - %li - = link_to _('Invite Members'), - project_project_members_path(@project), - title: _('Invite Members'), - data: { 'is-link': true, 'track-event': 'click_invite_members', 'track-label': 'edit_reviewer' } - - else - = dropdown_tag(title, options: options) + = dropdown_tag(title, options: options) diff --git a/app/views/shared/issuable/csv_export/_button.html.haml b/app/views/shared/issuable/csv_export/_button.html.haml deleted file mode 100644 index 8134b7eb161..00000000000 --- a/app/views/shared/issuable/csv_export/_button.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -- if current_user - %button.csv_download_link.btn.gl-button.btn-default.btn-icon.has-tooltip{ title: _('Export as CSV'), - data: { toggle: 'modal', target: ".#{issuable_type}-export-modal", qa_selector: 'export_as_csv_button' } } - = sprite_icon('export') diff --git a/app/views/shared/issuable/csv_export/_modal.html.haml b/app/views/shared/issuable/csv_export/_modal.html.haml deleted file mode 100644 index 4a4c6b90cd9..00000000000 --- a/app/views/shared/issuable/csv_export/_modal.html.haml +++ /dev/null @@ -1,29 +0,0 @@ -- class_name = "#{issuable_type.dasherize}-export-modal" -- if current_user - .modal.issuable-export-modal{ class: class_name } - .modal-dialog - .modal-content{ data: { qa_selector: "export_issuable_modal" } } - .modal-header - %h3 - = _("Export %{issuable_type}" % { issuable_type: issuable_type.humanize(capitalize: false) }) - .svg-content.import-export-svg-container - = image_tag 'illustrations/export-import.svg', role: "presentation", class: 'illustration' - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - = sprite_icon('close', css_class: 'gl-icon') - .modal-body - - issuable_count = issuables_count_for_state(issuable_type.to_sym, params[:state]) - - unless issuable_count == -1 # The count timed out - .modal-subheader - = sprite_icon('check', css_class: 'gl-icon gl-color-green-400') - %strong.gl-ml-3 - - if issuable_type.eql?('merge_requests') - = n_("%{count} merge request selected", "%{count} merge requests selected", issuable_count) % { count: issuable_count } - - else - = n_("%{count} issue selected", "%{count} issues selected", issuable_count) % { count: issuable_count } - .modal-text - = html_escape(_('The CSV export will be created in the background. Once finished, it will be sent to %{strong_open}%{email}%{strong_close} in an attachment.')) % { email: @current_user.notification_email, strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } - .modal-footer - - if issuable_type.eql?('merge_requests') - = link_to _("Export merge requests"), export_csv_project_merge_requests_path(@project, request.query_parameters), method: :post, class: 'btn gl-button btn-success', data: { track_label: "export_merge_requests_csv", track_event: "click_button", track_value: "" } - - else - = link_to _('Export issues'), export_csv_project_issues_path(@project, request.query_parameters), method: :post, class: 'btn gl-button btn-success', data: { track_label: "export_issues_csv", track_event: "click_button", track_value: "", qa_selector: "export_issues_button" } diff --git a/app/views/shared/labels/_form.html.haml b/app/views/shared/labels/_form.html.haml index 2df6c3a6afd..604aac9237c 100644 --- a/app/views/shared/labels/_form.html.haml +++ b/app/views/shared/labels/_form.html.haml @@ -28,7 +28,7 @@ = render_suggested_colors .form-actions - if @label.persisted? - = f.submit 'Save changes', class: 'btn gl-button btn-success js-save-button' + = f.submit 'Save changes', class: 'btn gl-button btn-confirm js-save-button' - else - = f.submit 'Create label', class: 'btn gl-button btn-success js-save-button qa-label-create-button' - = link_to 'Cancel', back_path, class: 'btn gl-button btn-cancel' + = 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' diff --git a/app/views/shared/labels/_nav.html.haml b/app/views/shared/labels/_nav.html.haml index 6d1d422f227..a0225e35c90 100644 --- a/app/views/shared/labels/_nav.html.haml +++ b/app/views/shared/labels/_nav.html.haml @@ -19,6 +19,6 @@ = sprite_icon('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-success qa-label-create-new" + = link_to _('New label'), new_project_label_path(@project), class: "btn gl-button btn-confirm qa-label-create-new" - if labels_or_filters && can_admin_label && @group - = link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-success qa-label-create-new" + = link_to _('New label'), new_group_label_path(@group), class: "btn gl-button btn-confirm qa-label-create-new" diff --git a/app/views/shared/members/_invite_group.html.haml b/app/views/shared/members/_invite_group.html.haml index 5e3a6918ab2..d59f2950df6 100644 --- a/app/views/shared/members/_invite_group.html.haml +++ b/app/views/shared/members/_invite_group.html.haml @@ -23,4 +23,4 @@ .clearable-input = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date-groups', placeholder: _('Expiration date'), id: 'expires_at_groups' = sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input gl-text-gray-200') - = submit_tag _("Invite"), class: "btn btn-success", data: { qa_selector: 'invite_group_button' } + = submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-3", data: { qa_selector: 'invite_group_button' } diff --git a/app/views/shared/members/_invite_member.html.haml b/app/views/shared/members/_invite_member.html.haml index 0302b2fc3cf..ad0ba6dcedf 100644 --- a/app/views/shared/members/_invite_member.html.haml +++ b/app/views/shared/members/_invite_member.html.haml @@ -23,6 +23,6 @@ .clearable-input = text_field_tag :expires_at, nil, class: 'form-control js-access-expiration-date', placeholder: 'Expiration date' = sprite_icon('close', size: 16, css_class: 'clear-icon js-clear-input gl-text-gray-200') - = submit_tag _("Invite"), class: "gl-button btn btn-success", data: { qa_selector: 'invite_member_button' } + = submit_tag _("Invite"), class: "gl-button btn btn-confirm gl-mr-3", data: { qa_selector: 'invite_member_button' } - if can_import_members = link_to _("Import"), import_path, class: "gl-button btn btn-default", title: _("Import members from another project") diff --git a/app/views/shared/members/_member.html.haml b/app/views/shared/members/_member.html.haml index c76051a25b2..0ba3e539357 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -107,7 +107,7 @@ - if member.can_approve? = link_to polymorphic_path([:approve_access_request, member]), method: :post, - class: "btn btn-success btn-icon gl-button align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", + class: "btn btn-confirm btn-icon gl-button align-self-center m-0 mb-2 #{'mb-sm-0 ml-sm-2' unless force_mobile_view}", title: _('Grant access') do %span{ class: ('d-block d-sm-none' unless force_mobile_view) } = _('Grant access') diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 4301bf01858..f52bf1551f4 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -25,7 +25,11 @@ • - if total_count > recent_releases.count • - = link_to n_('%{count} more release', '%{count} more releases', more_count) % { count: more_count }, project_releases_path(milestone.project) + - more_text = n_('%{count} more release', '%{count} more releases', more_count) % { count: more_count } + - if milestone.project_milestone? + = link_to more_text, project_releases_path(milestone.project) + - else + = more_text %div = render('shared/milestone_expired', milestone: milestone) - if milestone.group_milestone? diff --git a/app/views/shared/notifications/_button.html.haml b/app/views/shared/notifications/_button.html.haml deleted file mode 100644 index e12531b8a8d..00000000000 --- a/app/views/shared/notifications/_button.html.haml +++ /dev/null @@ -1,37 +0,0 @@ -- btn_class = local_assigns.fetch(:btn_class, '') -- emails_disabled = local_assigns.fetch(:emails_disabled, false) - -- if notification_setting - - if emails_disabled - - button_title = notification_description(:owner_disabled) - - aria_label = button_title - - btn_class << " disabled" - - else - - button_title = _("Notification setting") - - aria_label = _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) } - - .js-notification-dropdown.notification-dropdown.mr-md-2.home-panel-action-button.dropdown.inline - = form_for notification_setting, remote: true, html: { class: "inline notification-form" } do |f| - = hidden_setting_source_input(notification_setting) - = f.hidden_field :level, class: "notification_setting_level" - .js-notification-toggle-btns - %div{ class: ("btn-group" if notification_setting.custom?) } - - if notification_setting.custom? - %button.dropdown-new.btn.btn-default.btn-icon.gl-button.has-tooltip.notifications-btn.text-left#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } - = sprite_icon("notifications", css_class: "js-notification-loading") - = notification_title(notification_setting.level) - %button.btn.dropdown-toggle.gl-display-flex.gl-align-items-center{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } - = sprite_icon('chevron-down') - .sr-only Toggle dropdown - - else - %button.dropdown-new.btn.btn-default.btn-icon.gl-button.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => aria_label, data: { container: "body", toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } - .float-left - = sprite_icon("notifications", css_class: "js-notification-loading") - = notification_title(notification_setting.level) - .float-right - = sprite_icon("chevron-down") - - = render "shared/notifications/notification_dropdown", notification_setting: notification_setting - - = content_for :scripts_body do - = render "shared/notifications/custom_notifications", notification_setting: notification_setting diff --git a/app/views/shared/notifications/_custom_notifications.html.haml b/app/views/shared/notifications/_custom_notifications.html.haml deleted file mode 100644 index 946e3c67dcf..00000000000 --- a/app/views/shared/notifications/_custom_notifications.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -- hide_label = local_assigns.fetch(:hide_label, false) - -.modal.fade{ tabindex: "-1", role: "dialog", id: notifications_menu_identifier("modal", notification_setting), "aria-labelledby": "custom-notifications-title" } - .modal-dialog - .modal-content - .modal-header - %h4#custom-notifications-title.modal-title - #{ _('Custom notification events') } - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true } × - - .modal-body - .container-fluid - = form_for notification_setting, html: { class: "custom-notifications-form" } do |f| - = hidden_setting_source_input(notification_setting) - = hidden_field_tag("hide_label", true) if hide_label - .row - .col-lg-4 - %h4.gl-mt-0= _('Notification events') - %p - - notification_link = link_to _('notification emails'), help_page_path('user/profile/notifications'), target: '_blank' - - paragraph = _('Custom notification levels are the same as participating levels. With custom notification levels you will also receive notifications for select events. To find out more, check out %{notification_link}.') % { notification_link: notification_link.html_safe } - #{ paragraph.html_safe } - .col-lg-8 - - notification_setting.email_events.each_with_index do |event, index| - - field_id = "#{notifications_menu_identifier("modal", notification_setting)}_notification_setting[#{event}]" - .form-group - .form-check{ class: ("gl-mt-0" if index == 0) } - = check_box("notification_setting", event, id: field_id, class: "js-custom-notification-event form-check-input", checked: notification_setting.public_send(event)) - %label.form-check-label{ for: field_id } - %strong - = notification_event_name(event) - %span.spinner.is-loading.gl-vertical-align-middle.gl-display-none - = sprite_icon('check', css_class: 'is-done gl-display-none gl-vertical-align-middle gl-text-green-600') diff --git a/app/views/shared/notifications/_new_button.html.haml b/app/views/shared/notifications/_new_button.html.haml deleted file mode 100644 index 4b008601783..00000000000 --- a/app/views/shared/notifications/_new_button.html.haml +++ /dev/null @@ -1,35 +0,0 @@ -- btn_class = local_assigns.fetch(:btn_class, '') -- dropdown_container_class = local_assigns.fetch(:dropdown_container_class, '') -- emails_disabled = local_assigns.fetch(:emails_disabled, false) - -- if notification_setting - - if emails_disabled - - button_title = notification_description(:owner_disabled) - - btn_class << " disabled" - - else - - button_title = _("Notification setting - %{notification_title}") % { notification_title: notification_title(notification_setting.level) } - - .js-notification-dropdown.notification-dropdown.home-panel-action-button.gl-mt-3.dropdown.inline{ class: dropdown_container_class } - = form_for notification_setting, remote: true, html: { class: "notification-form no-label" } do |f| - = hidden_setting_source_input(notification_setting) - = hidden_field_tag "hide_label", true - = f.hidden_field :level, class: "notification_setting_level" - .js-notification-toggle-btns - %div{ class: ("btn-group" if notification_setting.custom?) } - - if notification_setting.custom? - %button.dropdown-new.btn.gl-button.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => button_title, data: { container: "body", placement: 'top', toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), display: 'static' } } - = notification_setting_icon(notification_setting) - %span.js-notification-loading.fa.hidden - %button.btn.gl-button.btn-default.dropdown-toggle{ data: { toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" }, class: "#{btn_class}" } - = sprite_icon("chevron-down", css_class: "icon mr-0") - .sr-only Toggle dropdown - - else - %button.dropdown-new.btn.gl-button.btn-default.has-tooltip.notifications-btn#notifications-button{ type: "button", title: button_title, class: "#{btn_class}", "aria-label" => button_title, data: { container: "body", placement: 'top', toggle: "dropdown", target: notifications_menu_identifier("dropdown", notification_setting), flip: "false" } } - = notification_setting_icon(notification_setting) - %span.js-notification-loading.fa.hidden - = sprite_icon("chevron-down", css_class: "icon") - - = render "shared/notifications/notification_dropdown", notification_setting: notification_setting - - = content_for :scripts_body do - = render "shared/notifications/custom_notifications", notification_setting: notification_setting, hide_label: true diff --git a/app/views/shared/notifications/_notification_dropdown.html.haml b/app/views/shared/notifications/_notification_dropdown.html.haml deleted file mode 100644 index a6ef2d51171..00000000000 --- a/app/views/shared/notifications/_notification_dropdown.html.haml +++ /dev/null @@ -1,12 +0,0 @@ -%ul.dropdown-menu.dropdown-menu-no-wrap.dropdown-menu-selectable.dropdown-menu-large{ role: "menu", class: [notifications_menu_identifier("dropdown", notification_setting)] } - - NotificationSetting.levels.each_key do |level| - - next if level == "custom" - - next if level == "global" && notification_setting.source.nil? - - = notification_list_item(level, notification_setting) - - %li.divider - %li - %a.update-notification{ href: "#", role: "button", class: ("is-active" if notification_setting.custom?), data: { toggle: "modal", target: "#" + notifications_menu_identifier("modal", notification_setting), notification_level: "custom", notification_title: "Custom" } } - %strong.dropdown-menu-inner-title= s_('NotificationSetting|Custom') - %span.dropdown-menu-inner-content= notification_description("custom") diff --git a/app/views/shared/projects/_list.html.haml b/app/views/shared/projects/_list.html.haml index c0c009f2a86..6fae6a15567 100644 --- a/app/views/shared/projects/_list.html.haml +++ b/app/views/shared/projects/_list.html.haml @@ -2,9 +2,6 @@ - avatar = true unless local_assigns[:avatar] == false - use_creator_avatar = false unless local_assigns[:use_creator_avatar] == true - stars = true unless local_assigns[:stars] == false -- forks = true unless local_assigns[:forks] == false -- merge_requests = true unless local_assigns[:merge_requests] == false -- issues = true unless local_assigns[:issues] == false - pipeline_status = true unless local_assigns[:pipeline_status] == false - skip_namespace = false unless local_assigns[:skip_namespace] == true - user = local_assigns[:user] @@ -40,8 +37,9 @@ - css_class = (i >= projects_limit) || project.pending_delete? ? 'hide' : nil = render "shared/projects/project", project: project, skip_namespace: skip_namespace, avatar: avatar, stars: stars, css_class: css_class, use_creator_avatar: use_creator_avatar, - forks: forks, show_last_commit_as_description: show_last_commit_as_description, user: user, merge_requests: merge_requests, - issues: issues, pipeline_status: pipeline_status, compact_mode: compact_mode + forks: project.forking_enabled?, show_last_commit_as_description: show_last_commit_as_description, user: user, + merge_requests: project.merge_requests_enabled?, issues: project.issues_enabled?, + pipeline_status: pipeline_status, compact_mode: compact_mode = paginate_collection(projects, remote: remote) unless skip_pagination - else - if @contributed_projects diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 115d0c9a7c5..a33cd7c3b53 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -12,9 +12,10 @@ - css_class += " no-description" if project.description.blank? && !show_last_commit_as_description - cache_key = project_list_cache_key(project, pipeline_status: pipeline_status) - updated_tooltip = time_ago_with_tooltip(project.last_activity_date) -- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) && project.last_pipeline.present? +- show_pipeline_status_icon = pipeline_status && can?(current_user, :read_cross_project) && project.pipeline_status.has_status? && can?(current_user, :read_build, project) +- last_pipeline = project.last_pipeline if show_pipeline_status_icon - css_controls_class = compact_mode ? [] : ["flex-lg-row", "justify-content-lg-between"] -- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon +- css_controls_class << "with-pipeline-status" if show_pipeline_status_icon && last_pipeline.present? - avatar_container_class = project.creator && use_creator_avatar ? '' : 'rect-avatar' %li.project-row.d-flex{ class: css_class } @@ -68,10 +69,10 @@ .controls.d-flex.flex-sm-column.align-items-center.align-items-sm-end.flex-wrap.flex-shrink-0.text-secondary{ class: css_controls_class.join(" ") } .icon-container.d-flex.align-items-center - - if show_pipeline_status_icon + - if show_pipeline_status_icon && last_pipeline.present? - pipeline_path = pipelines_project_commit_path(project.pipeline_status.project, project.pipeline_status.sha, ref: project.pipeline_status.ref) %span.icon-wrapper.pipeline-status - = render 'ci/status/icon', status: project.last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path + = render 'ci/status/icon', status: last_pipeline.detailed_status(current_user), tooltip_placement: 'top', path: pipeline_path = render_if_exists 'shared/projects/archived', project: project - if stars diff --git a/app/views/shared/projects/_search_bar.html.haml b/app/views/shared/projects/_search_bar.html.haml index a745da32110..6c3a6ce809f 100644 --- a/app/views/shared/projects/_search_bar.html.haml +++ b/app/views/shared/projects/_search_bar.html.haml @@ -13,7 +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.btn-secondary{ type: 'submit', form: 'project-filter-form' } + %button.btn.gl-button.btn-icon.btn-secondary{ type: 'submit', form: 'project-filter-form' } = sprite_icon('search', css_class: 'search-icon ') .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 diff --git a/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml index d1b32df7139..75d6d88fbc3 100644 --- a/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml +++ b/app/views/shared/projects/protected_branches/_update_protected_branch.html.haml @@ -33,3 +33,6 @@ %p.small = _('Members of %{group} can also push to this branch: %{branch}') % { group: (group_push_access_levels.size > 1 ? 'these groups' : 'this group'), branch: group_push_access_levels.map(&:humanize).to_sentence } +- if ::Feature.enabled?(:allow_force_push_to_protected_branches, @project) + %td + = render "shared/buttons/project_feature_toggle", is_checked: protected_branch.allow_force_push, label: s_("ProtectedBranch|Toggle allow force push"), class_list: "js-force-push-toggle project-feature-toggle", data: { qa_selector: 'force_push_toggle_button', qa_branch_name: protected_branch.name } diff --git a/app/views/shared/snippets/_snippet.html.haml b/app/views/shared/snippets/_snippet.html.haml index 5f0ecb2ee79..52cf0248f21 100644 --- a/app/views/shared/snippets/_snippet.html.haml +++ b/app/views/shared/snippets/_snippet.html.haml @@ -10,6 +10,8 @@ %ul.controls %li + = snippet_file_count(snippet) + %li = link_to gitlab_snippet_path(snippet, anchor: 'notes'), class: ('no-comments' if notes_count == 0) do = sprite_icon('comments', css_class: 'gl-vertical-align-text-bottom') = notes_count diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml index 5fd22665633..d91e3c73c49 100644 --- a/app/views/shared/wikis/_form.html.haml +++ b/app/views/shared/wikis/_form.html.haml @@ -70,10 +70,10 @@ .form-actions - if @page && @page.persisted? - = f.submit _("Save changes"), class: 'btn gl-button btn-success qa-save-changes-button js-wiki-btn-submit', disabled: 'true' + = f.submit _("Save changes"), class: 'btn gl-button btn-confirm qa-save-changes-button js-wiki-btn-submit', disabled: 'true' .float-right = link_to _("Cancel"), wiki_page_path(@wiki, @page), class: 'btn gl-button btn-cancel btn-default' - else - = f.submit s_("Wiki|Create page"), class: 'btn-success gl-button btn qa-create-page-button rspec-create-page-button js-wiki-btn-submit', disabled: 'true' + = f.submit s_("Wiki|Create page"), class: 'btn-confirm gl-button btn qa-create-page-button rspec-create-page-button js-wiki-btn-submit', disabled: 'true' .float-right = link_to _("Cancel"), wiki_path(@wiki), class: 'btn gl-button btn-cancel btn-default' diff --git a/app/views/shared/wikis/_main_links.html.haml b/app/views/shared/wikis/_main_links.html.haml index 8568c36559a..02794950895 100644 --- a/app/views/shared/wikis/_main_links.html.haml +++ b/app/views/shared/wikis/_main_links.html.haml @@ -2,5 +2,5 @@ = link_to wiki_page_path(@wiki, @page, action: :history), class: "btn gl-button", role: "button", data: { qa_selector: 'page_history_button' } do = s_("Wiki|Page history") - if can?(current_user, :create_wiki, @wiki.container) - = link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-success btn-inverted", role: "button", data: { qa_selector: 'new_page_button' } do + = link_to wiki_path(@wiki, action: :new), class: "btn gl-button btn-confirm-secondary", role: "button", data: { qa_selector: 'new_page_button' } do = s_("Wiki|New page") diff --git a/app/views/shared/wikis/_sidebar_wiki_page.html.haml b/app/views/shared/wikis/_sidebar_wiki_page.html.haml index 4259633280a..38a7e6fc813 100644 --- a/app/views/shared/wikis/_sidebar_wiki_page.html.haml +++ b/app/views/shared/wikis/_sidebar_wiki_page.html.haml @@ -1,3 +1,3 @@ %li{ class: active_when(params[:id] == wiki_page.slug) } - = link_to wiki_page_path(@wiki, wiki_page), data: { qa_selector: 'wiki_page_link', qa_page_name: wiki_page.slug } do + = link_to wiki_page_path(@wiki, wiki_page), data: { qa_selector: 'wiki_page_link', qa_page_name: wiki_page.human_title } do = wiki_page.human_title diff --git a/app/views/shared/wikis/edit.html.haml b/app/views/shared/wikis/edit.html.haml index c2b0e474c03..4bdeee3996f 100644 --- a/app/views/shared/wikis/edit.html.haml +++ b/app/views/shared/wikis/edit.html.haml @@ -1,7 +1,8 @@ - wiki_page_title @page, @page.persisted? ? _('Edit') : _('New') - add_page_specific_style 'page_bundles/wiki' -= wiki_page_errors(@error) +- if @error + #js-wiki-error{ data: { error: @error, wiki_page_path: wiki_page_path(@wiki, @page) } } .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index cdaa739a7b3..51483df19d7 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -26,13 +26,6 @@ = link_to new_abuse_report_path(user_id: @user.id, ref_url: request.referrer), class: link_classes + 'btn gl-button btn-default btn-icon', title: s_('UserProfile|Report abuse'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do = sprite_icon('error') - - if current_user && current_user.id != @user.id - - if current_user.following?(@user) - = link_to user_unfollow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do - = _('Unfollow') - - else - = link_to user_follow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do - = _('Follow') - if can?(current_user, :read_user_profile, @user) = link_to user_path(@user, rss_url_options), class: link_classes + 'btn gl-button btn-default btn-icon has-tooltip', title: s_('UserProfile|Subscribe'), data: { toggle: 'tooltip', placement: 'bottom', container: 'body' } do @@ -41,6 +34,13 @@ = link_to [:admin, @user], class: link_classes + 'btn gl-button btn-default btn-icon', title: s_('UserProfile|View user in admin area'), data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('user') + - if current_user && current_user.id != @user.id + - if current_user.following?(@user) + = link_to user_unfollow_path(@user, :json) , class: link_classes + 'btn gl-button btn-default', method: :post do + = _('Unfollow') + - else + = link_to user_follow_path(@user, :json) , class: link_classes + 'btn gl-button btn-confirm', method: :post do + = _('Follow') .profile-header{ class: [('with-no-profile-tabs' if profile_tabs.empty?)] } .avatar-holder |