diff options
Diffstat (limited to 'app/views')
165 files changed, 828 insertions, 709 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml index ae0da214fb7..c3d7fac6df7 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -12,7 +12,9 @@ = _('(removed)') %td %strong.subheading.d-block.d-sm-none - = _('Reported by %{reporter}') % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } + = _('Reported by %{reporter}').html_safe % { reporter: reporter ? link_to(reporter.name, reporter) : _('(removed)') } + .light.gl-display-none.gl-display-sm-block + = link_to(reporter.name, reporter) .light.small = time_ago_with_tooltip(abuse_report.created_at) %td diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index 1baec07fa25..7f78cce4575 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -1,4 +1,3 @@ -- return unless Gitlab::Gitpod.feature_available? - expanded = integration_expanded?('gitpod_') %section.settings.no-animate#js-gitpod-settings{ class: ('expanded' if expanded) } diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml index b06070d15d4..11ffe3f56e3 100644 --- a/app/views/admin/application_settings/_ip_limits.html.haml +++ b/app/views/admin/application_settings/_ip_limits.html.haml @@ -49,5 +49,12 @@ .form-group = f.label :throttle_authenticated_web_period_in_seconds, 'Authenticated web rate limit period in seconds', class: 'label-bold' = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control' + %hr + %h5 + = _('Response text') + .form-group + = f.label :rate_limiting_response_text, class: 'label-bold' do + = _('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', rows: 5 = f.submit 'Save changes', class: "gl-button btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml index 2f2d42e297e..92477dff3d8 100644 --- a/app/views/admin/application_settings/_signup.html.haml +++ b/app/views/admin/application_settings/_signup.html.haml @@ -4,7 +4,7 @@ %fieldset .form-group .form-check - = f.check_box :signup_enabled, class: 'form-check-input' + = f.check_box :signup_enabled, class: 'form-check-input', data: { qa_selector: 'signup_enabled_checkbox' } = f.label :signup_enabled, class: 'form-check-label' do Sign-up enabled .form-text.text-muted diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml index b54f1d7c829..2b871d3693c 100644 --- a/app/views/admin/application_settings/_spam.html.haml +++ b/app/views/admin/application_settings/_spam.html.haml @@ -30,6 +30,14 @@ .form-group .form-check + = f.check_box :invisible_captcha_enabled, class: 'form-check-input' + = f.label :invisible_captcha_enabled, class: 'form-check-label' do + = _('Enable Invisible Captcha during sign up') + %span.form-text.text-muted + = _('Helps prevent bots from creating accounts.') + + .form-group + .form-check = f.check_box :akismet_enabled, class: 'form-check-input' = f.label :akismet_enabled, class: 'form-check-label' do Enable Akismet diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 2ba7dcefd44..fe83d4b807c 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -33,7 +33,7 @@ %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/product_analytics/usage_ping', anchor: 'disable-usage-ping') + - deactivating_usage_ping_path = help_page_path('development/usage_ping', 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 } diff --git a/app/views/admin/application_settings/reporting.html.haml b/app/views/admin/application_settings/reporting.html.haml index c60e44b3864..6ea139844d4 100644 --- a/app/views/admin/application_settings/reporting.html.haml +++ b/app/views/admin/application_settings/reporting.html.haml @@ -11,7 +11,7 @@ %p - recaptcha_v2_link_url = 'https://developers.google.com/recaptcha/docs/versions' - recaptcha_v2_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: recaptcha_v2_link_url } - = _('Enable reCAPTCHA or Akismet and set IP limits. For reCAPTCHA, we currently only support %{recaptcha_v2_link_start}v2%{recaptcha_v2_link_end}').html_safe % { recaptcha_v2_link_start: recaptcha_v2_link_start, recaptcha_v2_link_end: '</a>'.html_safe } + = _('Enable reCAPTCHA, Invisible Captcha, Akismet and set IP limits. For reCAPTCHA, we currently only support %{recaptcha_v2_link_start}v2%{recaptcha_v2_link_end}').html_safe % { recaptcha_v2_link_start: recaptcha_v2_link_start, recaptcha_v2_link_end: '</a>'.html_safe } .settings-content = render 'spam' diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index bbb47e29bb9..9ba72caa88e 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -4,5 +4,5 @@ %p.light GitLab uses #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing %hr -.card +.card.gl-rounded-0 %iframe{ src: sidekiq_path, width: '100%', height: 970, style: "border: 0" } diff --git a/app/views/admin/dev_ops_report/_report.html.haml b/app/views/admin/dev_ops_report/_report.html.haml index 24c805d273a..5faadd15ef8 100644 --- a/app/views/admin/dev_ops_report/_report.html.haml +++ b/app/views/admin/dev_ops_report/_report.html.haml @@ -4,7 +4,7 @@ = 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/product_analytics/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') } } - elsif @metric.blank? = render 'no_data' - else diff --git a/app/views/admin/dev_ops_report/show.html.haml b/app/views/admin/dev_ops_report/show.html.haml index 75398f3aa21..c16ef7af76d 100644 --- a/app/views/admin/dev_ops_report/show.html.haml +++ b/app/views/admin/dev_ops_report/show.html.haml @@ -3,7 +3,7 @@ .container .gl-mt-3 - - if Gitlab.ee? && Feature.enabled?(:devops_adoption_feature, default_enabled: true) && License.feature_available?(:devops_adoption) + - if show_adoption? = render_if_exists 'admin/dev_ops_report/devops_tabs' - else = render 'report' diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 386df99717b..b949d08718a 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -80,8 +80,9 @@ = storage_counter(project.statistics.storage_size) %span.float-right.light %span.monospace= project.full_path + '.git' - .card-footer - = paginate @projects, param_name: 'projects_page', theme: 'gitlab' + - unless @projects.size < Kaminari.config.default_per_page + .card-footer + = paginate @projects, param_name: 'projects_page', theme: 'gitlab' - shared_projects = @group.shared_projects.sort_by(&:name) - unless shared_projects.empty? @@ -134,5 +135,6 @@ group: @group, show_controls: false, current_user_is_group_owner: current_user_is_group_owner } - .card-footer - = paginate @members, param_name: 'members_page', theme: 'gitlab' + - unless @members.size < Kaminari.config.default_per_page + .card-footer + = paginate @members, param_name: 'members_page', theme: 'gitlab' diff --git a/app/views/admin/hooks/_form.html.haml b/app/views/admin/hooks/_form.html.haml index 5bc5404fada..e6abd8ff85a 100644 --- a/app/views/admin/hooks/_form.html.haml +++ b/app/views/admin/hooks/_form.html.haml @@ -1,52 +1,33 @@ = form_errors(hook) .form-group - = form.label :url, 'URL', class: 'label-bold' + = form.label :url, _('URL'), class: 'label-bold' = form.text_field :url, class: 'form-control' .form-group - = form.label :token, 'Secret Token', class: 'label-bold' + = form.label :token, _('Secret Token'), class: 'label-bold' = form.text_field :token, class: 'form-control' - %p.form-text.text-muted - Use this token to validate received payloads + %p.form-text.text-muted= _('Use this token to validate received payloads') .form-group - = form.label :url, 'Trigger', class: 'label-bold' - %ul.list-unstyled - %li - .form-text.text-muted - System hook will be triggered on set of events like creating project - or adding ssh key. But you can also enable extra triggers like Push events. - - .gl-mt-3 - = form.check_box :repository_update_events, class: 'float-left' - .gl-ml-6 - = form.label :repository_update_events, class: 'list-label' do - %strong Repository update events - %p.light - This URL will be triggered when repository is updated - %li - = form.check_box :push_events, class: 'float-left' - .gl-ml-6 - = form.label :push_events, class: 'list-label' do - %strong Push events - %p.light - This URL will be triggered for each branch updated to the repository - %li - = form.check_box :tag_push_events, class: 'float-left' - .gl-ml-6 - = form.label :tag_push_events, class: 'list-label' do - %strong Tag push events - %p.light - This URL will be triggered when a new tag is pushed to the repository - %li - = form.check_box :merge_requests_events, class: 'float-left' - .gl-ml-6 - = form.label :merge_requests_events, class: 'list-label' do - %strong Merge request events - %p.light - This URL will be triggered when a merge request is created/updated/merged + = form.label :url, _('Trigger'), class: 'label-bold' + .form-text.text-secondary.gl-mb-5= _('System hook will be triggered on set of events like creating project or adding ssh key. But you can also enable extra triggers like Push events.') + %fieldset.form-group.form-check + = form.check_box :repository_update_events, class: 'form-check-input' + = form.label :repository_update_events, _('Repository update events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered when repository is updated') + %fieldset.form-group.form-check + = form.check_box :push_events, class: 'form-check-input' + = form.label :push_events, _('Push events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered for each branch updated to the repository') + %fieldset.form-group.form-check + = form.check_box :tag_push_events, class: 'form-check-input' + = form.label :tag_push_events, _('Tag push events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered when a new tag is pushed to the repository') + %fieldset.form-group.form-check + = form.check_box :merge_requests_events, class: 'form-check-input' + = form.label :merge_requests_events, _('Merge request events'), class: 'label-bold form-check-label' + .text-secondary= _('This URL will be triggered when a merge request is created/updated/merged') .form-group - = form.label :enable_ssl_verification, 'SSL verification', class: 'label-bold checkbox' + = form.label :enable_ssl_verification, _('SSL verification'), class: 'label-bold checkbox' .form-check = form.check_box :enable_ssl_verification, class: 'form-check-input' - = form.label :enable_ssl_verification, class: 'form-check-label' do - %strong Enable SSL verification + = form.label :enable_ssl_verification, _('Enable SSL verification'), class: 'label-bold form-check-label' diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index 8eaf84c8df9..ce377eeea54 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -1,3 +1,5 @@ +- add_page_specific_style 'page_bundles/ci_status' + - breadcrumb_title _("Jobs") - page_title _("Jobs") diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 3d3b8c28a17..9f19d3f5d4e 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -5,34 +5,34 @@ .col-sm-6 .bs-callout %p - = (_"A 'Runner' is a process which runs a job. You can set up as many Runners as you need.") + = (_"Runners are processes that pick up and execute CI/CD jobs for GitLab.") %br - = _('Runners can be placed on separate users, servers, even on your local machine.') + = _('You can register runners as separate users, on separate servers, and on your local machine. Register as many runners as you want.') %br %div - %span= _('Each Runner can be in one of the following states and/or belong to one of the following types:') + %span= _('Runners can be:') %ul %li - %span.badge.badge-success shared + %span.badge.badge-pill.gl-badge.sm.badge-success shared \- - = _('Runner runs jobs from all unassigned projects') + = _('Runs jobs from all unassigned projects.') %li - %span.badge.badge-success group + %span.badge.badge-pill.gl-badge.sm.badge-success group \- - = _('Runner runs jobs from all unassigned projects in its group') + = _('Runs jobs from all unassigned projects in its group.') %li - %span.badge.badge-info specific + %span.badge.badge-pill.gl-badge.sm.badge-info specific \- - = _('Runner runs jobs from assigned projects') + = _('Runs jobs from assigned projects.') %li - %span.badge.badge-warning locked + %span.badge.badge-pill.gl-badge.sm.badge-warning locked \- - = _('Runner cannot be assigned to other projects') + = _('Cannot be assigned to other projects.') %li - %span.badge.badge-danger paused + %span.badge.badge-pill.gl-badge.sm.badge-danger paused \- - = _('Runner will not receive any new jobs') + = _('Not available to run jobs.') .col-sm-6 .bs-callout diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml index 06925964dc5..aca50de3852 100644 --- a/app/views/admin/runners/show.html.haml +++ b/app/views/admin/runners/show.html.haml @@ -1,3 +1,5 @@ +- add_page_specific_style 'page_bundles/ci_status' + = content_for :title do %h3.project-title Runner ##{@runner.id} @@ -15,17 +17,17 @@ - if @runner.instance_type? .bs-callout.bs-callout-success - %h4 This Runner will process jobs from ALL UNASSIGNED projects + %h4= _('This runner processes jobs for all unassigned projects.') %p - If you want Runners to build only specific projects, enable them in the table below. - Keep in mind that this is a one way transition. + = _('If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.') - elsif @runner.group_type? .bs-callout.bs-callout-success - %h4 This runner will process jobs from all projects in its group and subgroups + %h4= _('This runner processes jobs for all projects in its group and subgroups.') - else .bs-callout.bs-callout-info - %h4 This Runner will process jobs only from ASSIGNED projects - %p You can't make this a shared Runner. + %h4= _('This runner processes jobs for assigned projects only.') + %p + = _('You cannot make this a shared runner.') %hr .gl-mb-6 @@ -33,12 +35,12 @@ .row .col-md-6 - %h4 Restrict projects for this Runner + %h4= _('Restrict projects for this runner') - if @runner.projects.any? %table.table.assigned-projects %thead %tr - %th Assigned projects + %th= _('Assigned projects') - @runner.runner_projects.each do |runner_project| - project = runner_project.project - if project @@ -55,7 +57,7 @@ %table.table.unassigned-projects %thead %tr - %th Project + %th= _('Project') %th %tr @@ -78,15 +80,15 @@ = paginate_without_count @projects .col-md-6 - %h4 Recent jobs served by this Runner + %h4= _('Recent jobs served by this runner') %table.table.ci-table.runner-builds %thead %tr - %th Job - %th Status - %th Project - %th Commit - %th Finished at + %th= _('Job') + %th= _('Status') + %th= _('Project') + %th= _('Commit') + %th= _('Finished at') - @builds.each do |build| - project = build.project diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml index ca6efe9b095..7a34972dfbf 100644 --- a/app/views/admin/system_info/show.html.haml +++ b/app/views/admin/system_info/show.html.haml @@ -3,29 +3,41 @@ .gl-mt-3 .row .col-sm - .bg-light.light-well - %h4= _('CPU') + .bg-light.info-well.p-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('pod', size: 18, css_class: 'pod-icon gl-mr-3') + = _('CPU') .data - if @cpus %h2= _('%{cores} cores') % { cores: @cpus.length } - else = sprite_icon('warning-solid', css_class: 'text-warning') = _('Unable to collect CPU info') - .bg-light.light-well.gl-mt-3 - %h4= _('Memory Usage') + .bg-light.info-well.p-3.gl-mt-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('status-health', size: 18, css_class: 'pod-icon gl-mr-3') + = _('Memory Usage') .data - if @memory %h2 #{number_to_human_size(@memory.active_bytes)} / #{number_to_human_size(@memory.total_bytes)} - else = sprite_icon('warning-solid', css_class: 'text-warning') = _('Unable to collect memory info') - .bg-light.light-well.gl-mt-3 - %h4= _('Uptime') + .bg-light.info-well.p-3.gl-mt-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('clock', size: 18, css_class: 'pod-icon gl-mr-3') + = _('Uptime') .data %h2= distance_of_time_in_words_to_now(Rails.application.config.booted_at) .col-sm - .bg-light.light-well - %h4= _('Disk Usage') + .bg-light.info-well.p-3 + %h4.page-title.d-flex + .gl-display-flex.gl-align-items-center.gl-justify-content-center + = sprite_icon('disk', size: 18, css_class: 'pod-icon gl-mr-3') + = _('Disk Usage') .data %ul - @disks.each do |disk| diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index 5d91ba1a1ca..4da70a504f7 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -1,7 +1,7 @@ %fieldset %legend= _('Admin notes') .form-group.row - .col-sm-2.col-form-label.text-right + .col-sm-2.col-form-label = f.label :note, s_('AdminNote|Note') .col-sm-10 = f.text_area :note, class: 'form-control' diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index b86abb893a9..cef16b1881e 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -44,6 +44,7 @@ %small.badge.badge-pill= limited_counter_with_delimiter(User.without_projects) .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' .filtered-search-block.row-content-block.border-top-0 @@ -51,7 +52,7 @@ - if params[:filter].present? = hidden_field_tag "filter", h(params[:filter]) .search-holder - .search-field-holder + .search-field-holder.gl-mb-4 = search_field_tag :search_query, params[:search_query], placeholder: s_('AdminUsers|Search by name, email or username'), class: 'form-control search-text-input js-search-input', spellcheck: false, data: { qa_selector: 'user_search_field' } - if @sort.present? = hidden_field_tag :sort, @sort diff --git a/app/views/ci/runner/_how_to_setup_runner.html.haml b/app/views/ci/runner/_how_to_setup_runner.html.haml index 4ea3b0f0fb9..fc3d5360f9b 100644 --- a/app/views/ci/runner/_how_to_setup_runner.html.haml +++ b/app/views/ci/runner/_how_to_setup_runner.html.haml @@ -1,21 +1,23 @@ -- link = link_to _("Install GitLab Runner"), 'https://docs.gitlab.com/runner/install/', target: '_blank' +- link = link_to _("Install GitLab Runner and ensure it's running."), 'https://docs.gitlab.com/runner/install/', target: '_blank' .gl-mb-3 - %h4= _("Set up a %{type} Runner manually") % { type: type } + %h5= _("Set up a %{type} runner manually") % { type: type } %ol %li = link.html_safe %li - = _("Specify the following URL during the Runner setup:") + = _("Register the runner with this URL:") + %br %code#coordinator_address= root_url(only_path: false) = clipboard_button(target: '#coordinator_address', title: _("Copy URL"), class: "btn-transparent btn-clipboard") - %li - = _("Use the following registration token during setup:") + %br + %br + = _("And this registration token:") + %br %code#registration_token= registration_token = clipboard_button(target: '#registration_token', title: _("Copy token"), class: "btn-transparent btn-clipboard") - .gl-mt-3.gl-mb-3 - = button_to _("Reset runners registration token"), reset_token_url, - method: :put, class: 'gl-button btn btn-default', - data: { confirm: _("Are you sure you want to reset registration token?") } - %li - = _("Start the Runner!") + +.gl-mt-3.gl-mb-3 += button_to _("Reset registration token"), reset_token_url, +method: :put, class: 'gl-button btn btn-default', +data: { confirm: _("Are you sure you want to reset the registration token?") } diff --git a/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml b/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml index 343abf6099e..7140c0f4e7c 100644 --- a/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml +++ b/app/views/ci/runner/_how_to_setup_runner_automatically.html.haml @@ -1,22 +1,21 @@ -.gl-mb-3 - %h4= _('Set up a %{type} Runner automatically') % { type: type } +%h5= _('Set up a %{type} runner automatically') % { type: type } %p - - link_to_help_page = link_to(_('Learn more about Kubernetes'), + - link_to_help_page = link_to(_('Learn more.'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') - = _('You can easily install a Runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page } + = _('Register a runner on a Kubernetes cluster. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page } %ol %li - = _('Click the button below to begin the install process by navigating to the Kubernetes page') + = _('Click the button below.') %li - = _('Select an existing Kubernetes cluster or create a new one') + = _('Select an existing Kubernetes cluster or create a new one.') %li - = _('From the Kubernetes cluster details view, install Runner from the applications list') + = _('From the Kubernetes cluster details view, applications list, install GitLab Runner.') -= link_to _('Install Runner on Kubernetes'), += link_to _('Install GitLab Runner on Kubernetes'), clusters_path, class: 'gl-button btn btn-info' diff --git a/app/views/ci/variables/_index.html.haml b/app/views/ci/variables/_index.html.haml index 660fd1a48a7..3f6d60c2620 100644 --- a/app/views/ci/variables/_index.html.haml +++ b/app/views/ci/variables/_index.html.haml @@ -21,7 +21,7 @@ } } - if !@group && @project.group - .settings-header.border-top.prepend-top-20 + .settings-header.border-top.gl-mt-6 = render 'ci/group_variables/header' .settings-content.pr-0 = render 'ci/group_variables/index' diff --git a/app/views/clusters/clusters/gcp/_form.html.haml b/app/views/clusters/clusters/gcp/_form.html.haml index 573b96caae5..50e3d29f974 100644 --- a/app/views/clusters/clusters/gcp/_form.html.haml +++ b/app/views/clusters/clusters/gcp/_form.html.haml @@ -1,4 +1,3 @@ -= javascript_include_tag 'https://apis.google.com/js/api.js' - external_link_icon = sprite_icon('external-link') - zones_link_url = 'https://cloud.google.com/compute/docs/regions-zones/regions-zones' - machine_type_link_url = 'https://cloud.google.com/compute/docs/machine-types' diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml index ff33fb46db8..74e336723ba 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -2,7 +2,6 @@ - page_title _('Kubernetes Cluster') - active_tab = local_assigns.fetch(:active_tab, 'create') - provider = params[:provider] -= javascript_include_tag 'https://apis.google.com/js/api.js' = render_gcp_signup_offer diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index c34e457dbd9..bf61d0bd1f0 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -65,7 +65,7 @@ data: { data: todo_actions_options, default_label: 'Action' } }) .filter-item.sort-filter .dropdown - %button.dropdown-menu-toggle.dropdown-menu-toggle-sort{ type: 'button', 'data-toggle' => 'dropdown' } + %button.dropdown-menu-toggle.dropdown-menu-toggle-sort{ type: 'button', class: 'gl-xs-w-full!', 'data-toggle' => 'dropdown' } %span.light - if @sort.present? = sort_options_hash[@sort] diff --git a/app/views/devise/shared/_footer.html.haml b/app/views/devise/shared/_footer.html.haml new file mode 100644 index 00000000000..ca1adb48543 --- /dev/null +++ b/app/views/devise/shared/_footer.html.haml @@ -0,0 +1,8 @@ +%hr.footer-fixed +.container.footer-container + .footer-links + - unless public_visibility_restricted? + = link_to _("Explore"), explore_root_path + = link_to _("Help"), help_path + = link_to _("About GitLab"), "https://about.gitlab.com/" += footer_message diff --git a/app/views/devise/shared/_signup_box.html.haml b/app/views/devise/shared/_signup_box.html.haml index 3c4cbbbc3bd..acbf3b398b0 100644 --- a/app/views/devise/shared/_signup_box.html.haml +++ b/app/views/devise/shared/_signup_box.html.haml @@ -10,7 +10,7 @@ = form_for(resource, as: "new_#{resource_name}", url: url, html: { class: 'new_user gl-show-field-errors', 'aria-live' => 'assertive' }) do |f| .devise-errors = render 'devise/shared/error_messages', resource: resource - - if Feature.enabled?(:invisible_captcha) + - if Gitlab::CurrentSettings.invisible_captcha_enabled = invisible_captcha .name.form-row .col.form-group diff --git a/app/views/doorkeeper/authorizations/new.html.haml b/app/views/doorkeeper/authorizations/new.html.haml index b5bfbc7bd1c..d89c4bf0161 100644 --- a/app/views/doorkeeper/authorizations/new.html.haml +++ b/app/views/doorkeeper/authorizations/new.html.haml @@ -38,6 +38,8 @@ = hidden_field_tag :response_type, @pre_auth.response_type = hidden_field_tag :scope, @pre_auth.scope = 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 _("Deny"), class: "gl-button btn btn-danger" = form_tag oauth_authorization_path, method: :post, class: 'inline' do = hidden_field_tag :client_id, @pre_auth.client.uid @@ -46,4 +48,6 @@ = hidden_field_tag :response_type, @pre_auth.response_type = hidden_field_tag :scope, @pre_auth.scope = 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' } diff --git a/app/views/events/event/_push.html.haml b/app/views/events/event/_push.html.haml index 4c1ee5fd3b7..d6662e1fc31 100644 --- a/app/views/events/event/_push.html.haml +++ b/app/views/events/event/_push.html.haml @@ -9,7 +9,7 @@ - many_refs = event.ref_count.to_i > 1 %span.event-type.d-inline-block.gl-mr-2.pushed= many_refs ? "#{event.action_name} #{event.ref_count} #{event.ref_type.pluralize}" : "#{event.action_name} #{event.ref_type}" - unless many_refs - %span.gl-mr-2 + %span.gl-mr-2.text-truncate - commits_link = project_commits_path(project, event.ref_name) - should_link = event.tag? ? project.repository.tag_exists?(event.ref_name) : project.repository.branch_exists?(event.ref_name) = link_to_if should_link, event.ref_name, commits_link, class: 'ref-name' diff --git a/app/views/explore/projects/_projects.html.haml b/app/views/explore/projects/_projects.html.haml index b2154f71082..a55dfb110f0 100644 --- a/app/views/explore/projects/_projects.html.haml +++ b/app/views/explore/projects/_projects.html.haml @@ -2,4 +2,4 @@ .nothing-here-block %h5= _('Enter at least three characters to search') - else - = render 'shared/projects/list', projects: projects, user: current_user, explore_page: true, pipeline_status: Feature.enabled?(:dashboard_pipeline_status, default_enabled: true) + = render 'shared/projects/list', projects: projects, user: current_user, explore_page: true, pipeline_status: Feature.enabled?(:explore_pipeline_status, type: :ops) diff --git a/app/views/groups/_invite_members_modal.html.haml b/app/views/groups/_invite_members_modal.html.haml index 3aae81cef8d..bd53f73230e 100644 --- a/app/views/groups/_invite_members_modal.html.haml +++ b/app/views/groups/_invite_members_modal.html.haml @@ -1,7 +1,7 @@ - if invite_members_allowed?(group) .js-invite-members-modal{ data: { id: group.id, name: group.name, - is_project: false, + is_project: 'false', access_levels: GroupMember.access_level_roles.to_json, default_access_level: Gitlab::Access::GUEST, help_link: help_page_url('user/permissions') } } diff --git a/app/views/groups/edit.html.haml b/app/views/groups/edit.html.haml index 33cd90ce5d3..229e04a371a 100644 --- a/app/views/groups/edit.html.haml +++ b/app/views/groups/edit.html.haml @@ -35,8 +35,8 @@ %button.btn.gl-button.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - = s_('GroupSettings|Customize your group badges.') - = link_to s_('GroupSettings|Learn more about badges.'), help_page_path('user/project/badges') + = s_('GroupSettings|Customize this group\'s badges.') + = link_to s_('GroupSettings|What are badges?'), help_page_path('user/project/badges') .settings-content = render 'shared/badges/badge_settings' diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index a1527a74898..ab3998be009 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -3,136 +3,80 @@ - show_invited_members = can_manage_members && @invited_members.exists? - show_access_requests = can_manage_members && @requesters.exists? - invited_active = params[:search_invited].present? || params[:invited_members_page].present? -- vue_members_list_enabled = Feature.enabled?(:vue_group_members_list, @group, default_enabled: true) -- filtered_search_enabled = Feature.enabled?(:group_members_filtered_search, @group, default_enabled: true) -- current_user_is_group_owner = @group && @group.has_owner?(current_user) - -- form_item_label_css_class = 'label-bold gl-mr-2 gl-mb-0 gl-py-2 align-self-md-center' .js-remove-member-modal -.project-members-page.gl-mt-3 - %h4 - = _('Group members') - %hr - - if can_manage_members - %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } - %li.nav-tab{ role: 'presentation' } - %a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _('Invite member') - %li.nav-tab{ role: 'presentation' } - %a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _('Invite group') - .tab-content.gitlab-tab-content - .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } - = render_invite_member_for_group(@group, @group_member.access_level) - .tab-pane{ id: 'invite-group-pane', role: 'tabpanel' } - = render 'shared/members/invite_group', submit_url: group_group_links_path(@group), access_levels: GroupMember.access_level_roles, default_access_level: @group_member.access_level, group_link_field: 'shared_with_group_id', group_access_field: 'shared_group_access' +.row.gl-mt-3 + .col-lg-12 + .gl-display-flex.gl-flex-wrap + - if can_manage_members + .gl-w-half.gl-xs-w-full + %h4 + = _('Group members') + %p + = html_escape(_('You can invite a new member to %{strong_start}%{group_name}%{strong_end}.')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } + - if invite_members_allowed?(@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') } } + = render_if_exists 'groups/invite_members_modal', group: @group + - if can_manage_members && !invite_members_allowed?(@group) + %hr.gl-mt-4 + %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } + %li.nav-tab{ role: 'presentation' } + %a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _('Invite member') + %li.nav-tab{ role: 'presentation' } + %a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _('Invite group') + .tab-content.gitlab-tab-content + .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } + = render_invite_member_for_group(@group, @group_member.access_level) + .tab-pane{ id: 'invite-group-pane', role: 'tabpanel' } + = render 'shared/members/invite_group', submit_url: group_group_links_path(@group), access_levels: GroupMember.access_level_roles, default_access_level: @group_member.access_level, group_link_field: 'shared_with_group_id', group_access_field: 'shared_group_access' - = render_if_exists 'groups/group_members/ldap_sync' + = render_if_exists 'groups/group_members/ldap_sync' - %ul.nav-links.mobile-separator.nav.nav-tabs - %li.nav-item - = link_to '#tab-members', class: ['nav-link', ('active' unless invited_active)], data: { toggle: 'tab' } do - %span - = _('Members') - %span.badge.badge-pill= @members.total_count - - if @group.shared_with_group_links.any? - %li.nav-item - = link_to '#tab-groups', class: ['nav-link'] , data: { toggle: 'tab', qa_selector: 'groups_list_tab' } do - %span - = _('Groups') - %span.badge.badge-pill= @group.shared_with_group_links.count - - if show_invited_members + %ul.nav-links.mobile-separator.nav.nav-tabs %li.nav-item - = link_to '#tab-invited-members', class: ['nav-link', ('active' if invited_active)], data: { toggle: 'tab' } do + = link_to '#tab-members', class: ['nav-link', ('active' unless invited_active)], data: { toggle: 'tab' } do %span - = _('Invited') - %span.badge.badge-pill= @invited_members.total_count - - if show_access_requests - %li.nav-item - = link_to '#tab-access-requests', class: 'nav-link', data: { toggle: 'tab' } do - %span - = _('Access requests') - %span.badge.badge-pill= @requesters.count - .tab-content - #tab-members.tab-pane{ class: ('active' unless invited_active) } - .card.card-without-border - - unless filtered_search_enabled - = render 'groups/group_members/tab_pane/header' do - = render 'groups/group_members/tab_pane/title' do - = html_escape(_('Members with access to %{strong_start}%{group_name}%{strong_end}')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - = form_tag group_group_members_path(@group), 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' - - if can_manage_members - = render 'groups/group_members/tab_pane/form_item' do - = label_tag '2fa', _('2FA'), class: form_item_label_css_class - = render 'shared/members/filter_2fa_dropdown' - = render 'groups/group_members/tab_pane/form_item' do - = label_tag :sort_by, _('Sort by'), class: form_item_label_css_class - = render 'shared/members/sort_dropdown' - - if vue_members_list_enabled - .js-group-members-list{ data: group_members_list_data_attributes(@group, @members) } + = _('Members') + %span.badge.badge-pill= @members.total_count + - if @group.shared_with_group_links.any? + %li.nav-item + = link_to '#tab-groups', class: ['nav-link'] , data: { toggle: 'tab', qa_selector: 'groups_list_tab' } do + %span + = _('Groups') + %span.badge.badge-pill= @group.shared_with_group_links.count + - if show_invited_members + %li.nav-item + = link_to '#tab-invited-members', class: ['nav-link', ('active' if invited_active)], data: { toggle: 'tab' } do + %span + = _('Invited') + %span.badge.badge-pill= @invited_members.total_count + - if show_access_requests + %li.nav-item + = link_to '#tab-access-requests', class: 'nav-link', data: { toggle: 'tab' } do + %span + = _('Access requests') + %span.badge.badge-pill= @requesters.count + .tab-content + #tab-members.tab-pane{ class: ('active' unless invited_active) } + .js-group-members-list{ data: group_members_list_data_attributes(@group, @members) } + .loading + .spinner.spinner-md + = paginate @members, theme: 'gitlab', params: { invited_members_page: nil, search_invited: nil } + - if @group.shared_with_group_links.any? + #tab-groups.tab-pane + .js-group-linked-list{ data: linked_groups_list_data_attributes(@group) } + .loading + .spinner.spinner-md + - if show_invited_members + #tab-invited-members.tab-pane{ class: ('active' if invited_active) } + .js-group-invited-members-list{ data: group_members_list_data_attributes(@group, @invited_members) } .loading .spinner.spinner-md - - else - %ul.content-list.members-list{ data: { qa_selector: 'members_list' } } - = render partial: 'shared/members/member', - collection: @members, as: :member, - locals: { membership_source: @group, - group: @group, - current_user_is_group_owner: current_user_is_group_owner } - = paginate @members, theme: 'gitlab', params: { invited_members_page: nil, search_invited: nil } - - if @group.shared_with_group_links.any? - #tab-groups.tab-pane - .card.card-without-border - - unless filtered_search_enabled - = render 'groups/group_members/tab_pane/header' do - = render 'groups/group_members/tab_pane/title' do - = html_escape(_('Groups with access to %{strong_start}%{group_name}%{strong_end}')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - - if vue_members_list_enabled - .js-group-linked-list{ data: linked_groups_list_data_attributes(@group) } - .loading - .spinner.spinner-md - - else - %ul.content-list.members-list{ data: { qa_selector: 'groups_list' } } - - @group.shared_with_group_links.each do |group_link| - = render 'shared/members/group', group_link: group_link, can_admin_member: can_manage_members, group_link_path: group_group_link_path(@group, group_link) - - if show_invited_members - #tab-invited-members.tab-pane{ class: ('active' if invited_active) } - .card.card-without-border - - unless filtered_search_enabled - = render 'groups/group_members/tab_pane/header' do - = render 'groups/group_members/tab_pane/title' do - = html_escape(_('Members invited to %{strong_start}%{group_name}%{strong_end}')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - = form_tag group_group_members_path(@group), method: :get, class: 'user-search-form', data: { testid: 'user-search-form' } do - = render 'shared/members/search_field', name: 'search_invited' - - if vue_members_list_enabled - .js-group-invited-members-list{ data: group_members_list_data_attributes(@group, @invited_members) } - .loading - .spinner.spinner-md - - else - %ul.content-list.members-list - = render partial: 'shared/members/member', - collection: @invited_members, as: :member, - locals: { membership_source: @group, - group: @group, - current_user_is_group_owner: current_user_is_group_owner } = paginate @invited_members, param_name: 'invited_members_page', theme: 'gitlab', params: { page: nil } - - if show_access_requests - #tab-access-requests.tab-pane - .card.card-without-border - - unless filtered_search_enabled - = render 'groups/group_members/tab_pane/header' do - = render 'groups/group_members/tab_pane/title' do - = html_escape(_('Users requesting access to %{strong_start}%{group_name}%{strong_end}')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - - if vue_members_list_enabled - .js-group-access-requests-list{ data: group_members_list_data_attributes(@group, @requesters) } - .loading - .spinner.spinner-md - - else - %ul.content-list.members-list - = render partial: 'shared/members/member', - collection: @requesters, as: :member, - locals: { membership_source: @group, - group: @group, - current_user_is_group_owner: current_user_is_group_owner } + - if show_access_requests + #tab-access-requests.tab-pane + .js-group-access-requests-list{ data: group_members_list_data_attributes(@group, @requesters) } + .loading + .spinner.spinner-md diff --git a/app/views/groups/registry/repositories/index.html.haml b/app/views/groups/registry/repositories/index.html.haml index e26b8317c1c..6d0a3e03019 100644 --- a/app/views/groups/registry/repositories/index.html.haml +++ b/app/views/groups/registry/repositories/index.html.haml @@ -1,21 +1,20 @@ - page_title _("Container Registry") - @content_class = "limit-container-width" unless fluid_layout +- add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @group.full_path, first: 10, name: nil, isGroupPage: true} ) %section - .row.registry-placeholder.prepend-bottom-10 - .col-12 - #js-container-registry{ data: { endpoint: group_container_registries_path(@group), - "help_page_path" => help_page_path('user/packages/container_registry/index'), - "two_factor_auth_help_link" => help_page_path('user/profile/account/two_factor_authentication'), - "personal_access_tokens_help_link" => help_page_path('user/profile/personal_access_tokens'), - "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), - "containers_error_image" => image_path('illustrations/docker-error-state.svg'), - "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, - "gid_prefix": container_repository_gid_prefix, - character_error: @character_error.to_s } } + #js-container-registry{ data: { endpoint: group_container_registries_path(@group), + "help_page_path" => help_page_path('user/packages/container_registry/index'), + "two_factor_auth_help_link" => help_page_path('user/profile/account/two_factor_authentication'), + "personal_access_tokens_help_link" => help_page_path('user/profile/personal_access_tokens'), + "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), + "containers_error_image" => image_path('illustrations/docker-error-state.svg'), + "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, + "gid_prefix": container_repository_gid_prefix, + character_error: @character_error.to_s } } diff --git a/app/views/groups/runners/_group_runners.html.haml b/app/views/groups/runners/_group_runners.html.haml index 554240b7aef..944ef3435c1 100644 --- a/app/views/groups/runners/_group_runners.html.haml +++ b/app/views/groups/runners/_group_runners.html.haml @@ -1,11 +1,11 @@ -- link = link_to _('Runners API'), help_page_path('api/runners.md') +- link = link_to _('Runner API'), help_page_path('api/runners.md') -%h3 - = _('Group Runners') +%h4 + = _('Group runners') -.bs-callout.bs-callout-warning - = _('GitLab Group Runners can execute code for all the projects in this group.') - = _('They can be managed using the %{link}.').html_safe % { link: link } +%p + = _('These runners are shared across projects in this group.') + = _('Group runners can be managed with the %{link}.').html_safe % { link: link } -# Proper policies should be implemented per -# https://gitlab.com/gitlab-org/gitlab-foss/issues/45894 @@ -18,3 +18,4 @@ locals: { registration_token: @group.runners_token, type: 'group', reset_token_url: reset_registration_token_group_settings_ci_cd_path } + %br diff --git a/app/views/groups/runners/_index.html.haml b/app/views/groups/runners/_index.html.haml index b342b589d93..7cbc709ecf8 100644 --- a/app/views/groups/runners/_index.html.haml +++ b/app/views/groups/runners/_index.html.haml @@ -2,8 +2,6 @@ %hr -%p.lead - = _('To start serving your jobs you can add Runners to your group') .row .col-sm-6 = render 'groups/runners/group_runners' @@ -11,7 +9,7 @@ = render 'groups/runners/shared_runners' %h4.underlined-title - = _('Available Runners: %{runners}').html_safe % { runners: limited_counter_with_delimiter(@all_group_runners) } + = _('Available runners: %{runners}').html_safe % { runners: limited_counter_with_delimiter(@all_group_runners) } -# haml-lint:disable NoPlainNodes .row diff --git a/app/views/groups/settings/_two_factor_auth.html.haml b/app/views/groups/settings/_two_factor_auth.html.haml index d2d4c27c826..fac3df5237f 100644 --- a/app/views/groups/settings/_two_factor_auth.html.haml +++ b/app/views/groups/settings/_two_factor_auth.html.haml @@ -18,6 +18,6 @@ - unless group.has_parent? .form-group .form-check - = f.check_box :allow_mfa_for_subgroups, class: 'form-check-input', checked: group.namespace_settings.allow_mfa_for_subgroups + = f.check_box :allow_mfa_for_subgroups, class: 'form-check-input', checked: group.namespace_settings&.allow_mfa_for_subgroups = f.label :allow_mfa_for_subgroups, class: 'form-check-label' do = _('Allow subgroups to set up their own two-factor authentication rules') 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 2b5019222f8..8f1ce11ce40 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 @@ -10,6 +10,6 @@ %strong= s_('GroupSettings|Default to Auto DevOps pipeline for all projects within this group') %span.badge.badge-info#auto-devops-badge= badge_for_auto_devops_scope(group) .form-text.text-muted - = s_('GroupSettings|The Auto DevOps pipeline will run if no alternative CI configuration file is found.') - = link_to _('More information'), help_page_path('topics/autodevops/index.md'), target: '_blank' + = 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 btn-success gl-mt-5' diff --git a/app/views/groups/settings/ci_cd/show.html.haml b/app/views/groups/settings/ci_cd/show.html.haml index 5b5f357dbec..4a0a92fa91f 100644 --- a/app/views/groups/settings/ci_cd/show.html.haml +++ b/app/views/groups/settings/ci_cd/show.html.haml @@ -31,8 +31,8 @@ %button.btn.gl-button.btn-default.js-settings-toggle{ type: "button" } = expanded ? _('Collapse') : _('Expand') %p - = _("Runners are processes that pick up and execute jobs for GitLab. Here you can register and see your Runners for this project.") - = link_to s_('More information'), help_page_path('ci/runners/README') + = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") + = link_to s_('How do I configure runners?'), help_page_path('ci/runners/README') .settings-content = render 'groups/runners/index' @@ -47,7 +47,7 @@ - quickstart_url = help_page_path('topics/autodevops/quick_start_guide') - auto_devops_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: auto_devops_url } - quickstart_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: quickstart_url } - = s_('AutoDevOps|Auto DevOps can automatically build, test, and deploy applications based on predefined continuous integration and delivery configuration. %{auto_devops_start}Learn more about Auto DevOps%{auto_devops_end} or use our %{quickstart_start}quick start guide%{quickstart_end} to get started right away.').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe, quickstart_start: quickstart_start, quickstart_end: '</a>'.html_safe } + = s_('AutoDevOps|%{auto_devops_start}Automate building, testing, and deploying%{auto_devops_end} your applications based on your continuous integration and delivery configuration. %{quickstart_start}How do I get started?%{quickstart_end}').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe, quickstart_start: quickstart_start, quickstart_end: '</a>'.html_safe } .settings-content = render 'groups/settings/ci_cd/auto_devops_form', group: @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 new file mode 100644 index 00000000000..33719d56af1 --- /dev/null +++ b/app/views/groups/settings/packages_and_registries/index.html.haml @@ -0,0 +1,5 @@ +- breadcrumb_title _('Packages & Registries') +- page_title _('Packages & Registries') +- @content_class = 'limit-container-width' unless fluid_layout + +%section#js-packages-and-registries-settings diff --git a/app/views/jira_connect/subscriptions/index.html.haml b/app/views/jira_connect/subscriptions/index.html.haml index b826a1b6fc6..ed765f80b74 100644 --- a/app/views/jira_connect/subscriptions/index.html.haml +++ b/app/views/jira_connect/subscriptions/index.html.haml @@ -9,10 +9,9 @@ = link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in' .jira-connect-app - %h1 - GitLab for Jira Configuration - - if current_user.blank? && @subscriptions.empty? + %h1 + GitLab for Jira Configuration %h2.heading-with-border Sign in to GitLab.com to get started. .gl-mt-5 @@ -21,17 +20,18 @@ .gl-mt-5 %p Note: this integration only works with accounts on GitLab.com (SaaS). - else - .js-jira-connect-app + .js-jira-connect-app{ data: jira_connect_app_data } - %form#add-subscription-form.subscription-form{ action: jira_connect_subscriptions_path } - .ak-field-group - %label - GitLab namespace + - 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 + .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 @@ -49,6 +49,7 @@ - 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: diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index bdd506ab3be..7aa57331c51 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -43,8 +43,6 @@ = stylesheet_link_tag_defer "application" = yield :page_specific_styles = stylesheet_link_tag_defer "application_utilities" - - unless use_startup_css? - = stylesheet_link_tag_defer "themes/#{user_application_theme_css_filename}" if user_application_theme_css_filename = stylesheet_link_tag "disable_animations", media: "all" if Rails.env.test? || Gitlab.config.gitlab['disable_animations'] = stylesheet_link_tag_defer "highlight/themes/#{user_color_scheme}" diff --git a/app/views/layouts/_startup_css.haml b/app/views/layouts/_startup_css.haml index 2f674f79b2f..35b91c8d35e 100644 --- a/app/views/layouts/_startup_css.haml +++ b/app/views/layouts/_startup_css.haml @@ -1,5 +1,3 @@ -- return unless use_startup_css? - - startup_filename = current_path?("sessions#new") ? 'signin' : user_application_theme == 'gl-dark' ? 'dark' : 'general' %style{ type: "text/css" } diff --git a/app/views/layouts/_startup_css_activation.haml b/app/views/layouts/_startup_css_activation.haml index 5fb53385acc..7dfb9cd1530 100644 --- a/app/views/layouts/_startup_css_activation.haml +++ b/app/views/layouts/_startup_css_activation.haml @@ -1,5 +1,3 @@ -- return unless use_startup_css? - = javascript_tag do :plain document.querySelectorAll('link[media="print"]').forEach(linkTag => { diff --git a/app/views/layouts/devise.html.haml b/app/views/layouts/devise.html.haml index 5daee24cb51..ef61a04c288 100644 --- a/app/views/layouts/devise.html.haml +++ b/app/views/layouts/devise.html.haml @@ -38,12 +38,4 @@ .col-sm-5.order-1.order-sm-12.new-session-forms-container = yield - %hr.footer-fixed - .container.footer-container - .footer-links - - if !public_visibility_restricted? - = link_to _("Explore"), explore_root_path - = link_to _("Help"), help_path - = link_to _("About GitLab"), "https://about.gitlab.com/" - - = footer_message + = render 'devise/shared/footer', footer_message: footer_message diff --git a/app/views/layouts/devise_empty.html.haml b/app/views/layouts/devise_empty.html.haml index 6ac80a5aba3..b5649be8917 100644 --- a/app/views/layouts/devise_empty.html.haml +++ b/app/views/layouts/devise_empty.html.haml @@ -1,5 +1,5 @@ !!! 5 -%html{ lang: "en", class: system_message_class } +%html.devise-layout-html{ lang: "en", class: system_message_class } = render "layouts/head" %body.ui-indigo.login-page.application.navless{ class: "#{client_class_list}" } = header_message @@ -11,11 +11,4 @@ = render "layouts/flash" = yield - %hr - .container - .footer-links - - if !public_visibility_restricted? - = link_to _("Explore"), explore_root_path - = link_to _("Help"), help_path - = link_to _("About GitLab"), "https://about.gitlab.com/" - = footer_message + = render 'devise/shared/footer', footer_message: footer_message diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 70ab0a56581..f7e93182ca2 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -16,7 +16,7 @@ = logo_text - if Gitlab.com_and_canary? = link_to 'https://next.gitlab.com', class: 'canary-badge bg-transparent', target: :_blank do - %span.color-label.has-tooltip.badge.badge-pill.green-badge + %span.gl-badge.gl-bg-green-500.gl-text-white.gl-rounded-pill.gl-font-weight-bold.gl-py-1 = _('Next') - if current_user @@ -47,17 +47,36 @@ %span.badge.badge-pill.issues-count.green-badge{ class: ('hidden' if issues_count == 0) } = number_with_delimiter(issues_count) - if header_link?(:merge_requests) - = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter" }) do - = link_to assigned_mrs_dashboard_path, title: _('Merge requests'), class: 'dashboard-shortcuts-merge_requests', aria: { label: _('Merge requests') }, - data: { qa_selector: 'merge_requests_shortcut_button', toggle: 'tooltip', placement: 'bottom', + - reviewers_enabled = merge_request_reviewers_enabled? + = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter #{reviewers_enabled ? 'dropdown' : ''}" }) do + = link_to assigned_mrs_dashboard_path, class: 'dashboard-shortcuts-merge_requests', title: _('Merge requests'), aria: { label: _('Merge requests') }, + data: { qa_selector: 'merge_requests_shortcut_button', + toggle: reviewers_enabled ? "dropdown" : "tooltip", + placement: 'bottom', track_label: 'main_navigation', track_event: 'click_merge_link', track_property: 'navigation', container: 'body' } do = sprite_icon('git-merge') - - merge_requests_count = assigned_issuables_count(:merge_requests) - %span.badge.badge-pill.merge-requests-count{ class: ('hidden' if merge_requests_count == 0) } - = number_with_delimiter(merge_requests_count) + %span.badge.badge-pill.merge-requests-count.js-merge-requests-count{ class: ('hidden' if user_merge_requests_counts[:total] == 0) } + = number_with_delimiter(user_merge_requests_counts[:total]) + - if reviewers_enabled + = sprite_icon('chevron-down', css_class: 'caret-down gl-mx-0!') + - if reviewers_enabled + .dropdown-menu.dropdown-menu-right + %ul + %li.dropdown-header + = _('Merge requests') + %li + = link_to assigned_mrs_dashboard_path, class: 'gl-display-flex! gl-align-items-center' do + = _('Assigned to you') + %span.badge.gl-badge.badge-pill.badge-muted.merge-request-badge.gl-ml-auto.js-assigned-mr-count{ class: "" } + = user_merge_requests_counts[:assigned] + %li + = link_to reviewer_mrs_dashboard_path, class: 'gl-display-flex! gl-align-items-center' do + = _('Review requests for you') + %span.badge.gl-badge.badge-pill.badge-muted.merge-request-badge.gl-ml-auto.js-reviewer-mr-count{ class: "" } + = user_merge_requests_counts[:review_requested] - if header_link?(:todos) = nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do = link_to dashboard_todos_path, title: _('To-Do List'), aria: { label: _('To-Do List') }, class: 'shortcuts-todos', diff --git a/app/views/layouts/header/_group_invite_members_new_dropdown_item.html.haml b/app/views/layouts/header/_group_invite_members_new_dropdown_item.html.haml new file mode 100644 index 00000000000..cb74c77dff8 --- /dev/null +++ b/app/views/layouts/header/_group_invite_members_new_dropdown_item.html.haml @@ -0,0 +1,3 @@ +- return unless Gitlab::Experimentation.active?(:invite_members_new_dropdown) && can?(current_user, :admin_group_member, @group) + +%li= dropdown_invite_members_link(@group) diff --git a/app/views/layouts/header/_new_dropdown.haml b/app/views/layouts/header/_new_dropdown.haml index 2c5cd7e96c7..1fc9831d271 100644 --- a/app/views/layouts/header/_new_dropdown.haml +++ b/app/views/layouts/header/_new_dropdown.haml @@ -2,7 +2,7 @@ = link_to new_project_path, class: "header-new-dropdown-toggle has-tooltip qa-new-menu-toggle", id: "js-onboarding-new-project-link", title: _("New..."), ref: 'tooltip', aria: { label: _("New...") }, data: { toggle: 'dropdown', placement: 'bottom', container: 'body', display: 'static' } do = sprite_icon('plus-square') = sprite_icon('chevron-down', css_class: 'caret-down') - .dropdown-menu.dropdown-menu-right + .dropdown-menu.dropdown-menu-right.dropdown-extended-height %ul - if @group&.persisted? - create_group_project = can?(current_user, :create_projects, @group) @@ -16,6 +16,7 @@ - if create_group_subgroup %li= link_to _('New subgroup'), new_group_path(parent_id: @group.id) = render_if_exists 'layouts/header/create_epic_new_dropdown_item' + = render 'layouts/header/group_invite_members_new_dropdown_item' %li.divider %li.dropdown-bold-header GitLab @@ -33,6 +34,7 @@ %li= link_to _('New merge request'), project_new_merge_request_path(merge_project) - if create_project_snippet %li= link_to _('New snippet'), new_project_snippet_path(@project) + = render 'layouts/header/project_invite_members_new_dropdown_item' %li.divider %li.dropdown-bold-header GitLab - if current_user.can_create_project? diff --git a/app/views/layouts/header/_project_invite_members_new_dropdown_item.html.haml b/app/views/layouts/header/_project_invite_members_new_dropdown_item.html.haml new file mode 100644 index 00000000000..2cb67e857e3 --- /dev/null +++ b/app/views/layouts/header/_project_invite_members_new_dropdown_item.html.haml @@ -0,0 +1,3 @@ +- return unless Gitlab::Experimentation.active?(:invite_members_new_dropdown) && can_import_members? + +%li= dropdown_invite_members_link(@project) diff --git a/app/views/layouts/jira_connect.html.haml b/app/views/layouts/jira_connect.html.haml index 0d4ecfc5a10..d996b3387a3 100644 --- a/app/views/layouts/jira_connect.html.haml +++ b/app/views/layouts/jira_connect.html.haml @@ -3,8 +3,9 @@ %meta{ content: "text/html; charset=utf-8", "http-equiv" => "Content-Type" } %title GitLab - = 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' + - 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' diff --git a/app/views/layouts/nav/_breadcrumbs.html.haml b/app/views/layouts/nav/_breadcrumbs.html.haml index 43f1011a85b..dd2c5e2a19e 100644 --- a/app/views/layouts/nav/_breadcrumbs.html.haml +++ b/app/views/layouts/nav/_breadcrumbs.html.haml @@ -8,7 +8,7 @@ - if defined?(@left_sidebar) = button_tag class: 'toggle-mobile-nav', type: 'button' do %span.sr-only= _("Open sidebar") - = sprite_icon('hamburger') + = sprite_icon('hamburger', size: 18) .breadcrumbs-links.js-title-container{ data: { qa_selector: 'breadcrumb_links_content' } } %ul.list-unstyled.breadcrumbs-list.js-breadcrumbs-list - unless hide_top_links diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index efe8e57cadf..473a0d131b8 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -10,6 +10,8 @@ .sidebar-context-title = @group.name %ul.sidebar-top-level-items.qa-group-sidebar + = render_if_exists 'layouts/nav/sidebar/group_trial_status_widget', group: @group + - if group_sidebar_link?(:overview) - paths = group_overview_nav_link_paths = nav_link(path: paths, unless: -> { current_path?('groups/contribution_analytics#show') }, html_options: { class: 'home' }) do @@ -148,7 +150,7 @@ = sprite_icon('settings') %span.nav-item-name.qa-group-settings-item = _('Settings') - %ul.sidebar-sub-level-items.qa-group-sidebar-submenu + %ul.sidebar-sub-level-items.qa-group-sidebar-submenu{ data: { testid: 'group-settings-menu' } } = nav_link(path: %w[groups#projects groups#edit badges#index ci_cd#show], html_options: { class: "fly-out-top-item" } ) do = link_to edit_group_path(@group) do %strong.fly-out-top-item-name @@ -179,6 +181,12 @@ %span = _('CI / CD') + - if Feature.enabled?(:packages_and_registries_group_settings, @group) + = nav_link(controller: :packages_and_registries) do + = link_to group_settings_packages_and_registries_path(@group), title: _('Packages & Registries') do + %span + = _('Packages & Registries') + = render_if_exists "groups/ee/settings_nav" = render_if_exists "groups/ee/administration_nav" diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 5cadabd5f90..e02b8333c60 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -300,8 +300,8 @@ = link_to _('Auto DevOps'), help_page_path('topics/autodevops/index.md') %span= _('uses Kubernetes clusters to deploy your code!') %hr - %button.btn.btn-success.btn-sm.dismiss-feature-highlight{ type: 'button' } - %span= _("Got it!") + %button.gl-button.btn.btn-success.btn-sm.dismiss-feature-highlight{ type: 'button' } + %span.gl-mr-2= _("Got it!") = sprite_icon('thumb-up') - if project_nav_tab? :environments diff --git a/app/views/notify/_issuable_csv_export.html.haml b/app/views/notify/_issuable_csv_export.html.haml index 5a581811179..3b1fe90eaee 100644 --- a/app/views/notify/_issuable_csv_export.html.haml +++ b/app/views/notify/_issuable_csv_export.html.haml @@ -3,4 +3,4 @@ = _('Your CSV export of %{count} from project %{project_link} has been added to this email as an attachment.').html_safe % { count: pluralize(@written_count, type.to_s.titleize.downcase), project_link: project_link } - if @truncated %p - = _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, count: @count } + = _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of %{size_limit}. %{written_count} of %{count} %{issuables} have been included. Consider re-exporting with a narrower selection of %{issuables}.') % { written_count: @written_count, count: @count, issuables: type.to_s.pluralize, size_limit: @size_limit } diff --git a/app/views/notify/issue_due_email.html.haml b/app/views/notify/issue_due_email.html.haml index 08bc98ca05c..adb9da05694 100644 --- a/app/views/notify/issue_due_email.html.haml +++ b/app/views/notify/issue_due_email.html.haml @@ -1,5 +1,5 @@ %p.details - #{link_to @issue.author_name, user_url(@issue.author)}'s issue is due soon. + #{link_to @issue.author_name, user_url(@issue.author)}'s issue #{issue_reference_link(@issue)} is due soon. - if @issue.assignees.any? %p diff --git a/app/views/notify/issue_due_email.text.erb b/app/views/notify/issue_due_email.text.erb index ae50b703fe3..e5bfcc70355 100644 --- a/app/views/notify/issue_due_email.text.erb +++ b/app/views/notify/issue_due_email.text.erb @@ -1,6 +1,6 @@ The following issue is due on <%= @issue.due_date %>: -Issue <%= @issue.iid %>: <%= url_for(project_issue_url(@issue.project, @issue)) %> +Issue <%= @issue.iid %>: <%= issue_reference_link(@issue) %> Author: <%= @issue.author_name %> <%= assignees_label(@issue) %> diff --git a/app/views/notify/issues_csv_email.text.erb b/app/views/notify/issues_csv_email.text.erb index a1d2a4691bc..cf2910c4014 100644 --- a/app/views/notify/issues_csv_email.text.erb +++ b/app/views/notify/issues_csv_email.text.erb @@ -1,5 +1,5 @@ <%= _('Your CSV export of %{written_count} from project %{project_name} (%{project_url}) has been added to this email as an attachment.') % { written_count: pluralize(@written_count, 'issue'), project_name: @project.full_name, project_url: project_url(@project) } %> <% if @truncated %> - <%= _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{issues_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, issues_count: @issues_count} %> + <%= _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of %{size_limit}. %{written_count} of %{issues_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, issues_count: @issues_count, size_limit: @size_limit } %> <% end %> diff --git a/app/views/notify/member_expiration_date_updated_email.html.haml b/app/views/notify/member_expiration_date_updated_email.html.haml new file mode 100644 index 00000000000..6c4db22eeaa --- /dev/null +++ b/app/views/notify/member_expiration_date_updated_email.html.haml @@ -0,0 +1,6 @@ += email_default_heading(say_hi(@member.user)) + +%p + = group_membership_expiration_changed_text(@member, @member_source) +%p + = group_membership_expiration_changed_link(@member, @member_source, format: :html) diff --git a/app/views/notify/member_expiration_date_updated_email.text.erb b/app/views/notify/member_expiration_date_updated_email.text.erb new file mode 100644 index 00000000000..8b3a5a55e77 --- /dev/null +++ b/app/views/notify/member_expiration_date_updated_email.text.erb @@ -0,0 +1,5 @@ +<%= say_hi(@member.user) %> + +<%= group_membership_expiration_changed_text(@member, @member_source) %> + +<%= group_membership_expiration_changed_link(@member, @member_source) %> diff --git a/app/views/notify/merge_requests_csv_email.text.erb b/app/views/notify/merge_requests_csv_email.text.erb index 9ed971bbe9c..78d11dde69f 100644 --- a/app/views/notify/merge_requests_csv_email.text.erb +++ b/app/views/notify/merge_requests_csv_email.text.erb @@ -1,5 +1,5 @@ <%= _('Your CSV export of %{written_count} from project %{project_name} (%{project_url}) has been added to this email as an attachment.') % { written_count: pluralize(@written_count, 'merge request'), project_name: @project.full_name, project_url: project_url(@project) } %> <% if @truncated %> - <%= _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of 15MB. %{written_count} of %{merge_requests_count} issues have been included. Consider re-exporting with a narrower selection of issues.') % { written_count: @written_count, merge_requests_count: @merge_requests_count} %> + <%= _('This attachment has been truncated to avoid exceeding the maximum allowed attachment size of %{size_limit}. %{written_count} of %{merge_requests_count} merge requests have been included. Consider re-exporting with a narrower selection of merge requests.') % { written_count: @written_count, merge_requests_count: @merge_requests_count, size_limit: @size_limit} %> <% end %> diff --git a/app/views/notify/pipeline_failed_email.html.haml b/app/views/notify/pipeline_failed_email.html.haml index 575ec8c488e..4e8d8a20ef1 100644 --- a/app/views/notify/pipeline_failed_email.html.haml +++ b/app/views/notify/pipeline_failed_email.html.haml @@ -6,7 +6,7 @@ %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;vertical-align:middle;color:#ffffff;text-align:center;padding-right:5px;line-height:1;" } %img{ alt: "✖", height: "13", src: image_url('mailers/ci_pipeline_notif_v1/icon-x-red-inverted.gif'), style: "display:block;", width: "13" }/ %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;vertical-align:middle;color:#ffffff;text-align:center;" } - Your pipeline has failed. + Pipeline ##{@pipeline.id} has failed! %tr.spacer %td{ style: "font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;height:18px;font-size:18px;line-height:18px;" } diff --git a/app/views/notify/pipeline_failed_email.text.erb b/app/views/notify/pipeline_failed_email.text.erb index a30e331d892..2deca375db1 100644 --- a/app/views/notify/pipeline_failed_email.text.erb +++ b/app/views/notify/pipeline_failed_email.text.erb @@ -1,4 +1,4 @@ -Your pipeline has failed. +Pipeline #<%= @pipeline.id %> has failed! Project: <%= @project.name %> ( <%= project_url(@project) %> ) Branch: <%= @pipeline.source_ref %> ( <%= commits_url(@pipeline) %> ) diff --git a/app/views/notify/pipeline_fixed_email.html.haml b/app/views/notify/pipeline_fixed_email.html.haml index 05c0027a6fc..f2dbb3b20b7 100644 --- a/app/views/notify/pipeline_fixed_email.html.haml +++ b/app/views/notify/pipeline_fixed_email.html.haml @@ -1 +1 @@ -= render 'notify/successful_pipeline', title: 'Your pipeline has been fixed!' += render 'notify/successful_pipeline', title: "Pipeline has been fixed and ##{@pipeline.id} has passed!" diff --git a/app/views/notify/pipeline_fixed_email.text.erb b/app/views/notify/pipeline_fixed_email.text.erb index 75268531bdc..32334260a5e 100644 --- a/app/views/notify/pipeline_fixed_email.text.erb +++ b/app/views/notify/pipeline_fixed_email.text.erb @@ -1 +1 @@ -<%= render 'notify/successful_pipeline', title: 'Your pipeline has been fixed!' -%> +<%= render 'notify/successful_pipeline', title: "Pipeline has been fixed and ##{@pipeline.id} has passed!" -%> diff --git a/app/views/notify/pipeline_success_email.html.haml b/app/views/notify/pipeline_success_email.html.haml index c34e02b5fee..47832907663 100644 --- a/app/views/notify/pipeline_success_email.html.haml +++ b/app/views/notify/pipeline_success_email.html.haml @@ -1 +1 @@ -= render 'notify/successful_pipeline', title: 'Your pipeline has passed.' += render 'notify/successful_pipeline', title: "Pipeline ##{@pipeline.id} has passed!" diff --git a/app/views/notify/pipeline_success_email.text.erb b/app/views/notify/pipeline_success_email.text.erb index b554bffc908..83cdb72d252 100644 --- a/app/views/notify/pipeline_success_email.text.erb +++ b/app/views/notify/pipeline_success_email.text.erb @@ -1 +1 @@ -<%= render 'notify/successful_pipeline', title: 'Your pipeline has passed.' -%> +<%= render 'notify/successful_pipeline', title: "Pipeline ##{@pipeline.id} has passed!" -%> diff --git a/app/views/notify/provisioned_member_access_granted_email.erb b/app/views/notify/provisioned_member_access_granted_email.erb new file mode 100644 index 00000000000..485ee5a5242 --- /dev/null +++ b/app/views/notify/provisioned_member_access_granted_email.erb @@ -0,0 +1,14 @@ +<% source_link = member_source.web_url %> + +<%= _('An Enterprise User GitLab account has been created for you by your organization:') %> +<%= _('Username: %{username}') % { username: @user.username } %> +<%= _('Email: %{email}') % { email: @user.email } %> +<%= _('GitLab group: %{source_link}').html_safe % { source_link: source_link } %> + + +<%= _('By authenticating with an account tied to an Enterprise e-mail address, it is understood that this account is an Enterprise User. ') %> +<%= _('To ensure no loss of personal content, an Individual User should create a separate account under their own personal email address, not tied to the Enterprise email domain or name-space.') %> +<%- unless @user.confirmed? %> + <%= _('To get started, click the link below to confirm your account.') %> + <%= confirmation_url(@user, confirmation_token: @user.confirmation_token) %> +<%- end %> diff --git a/app/views/notify/provisioned_member_access_granted_email.haml b/app/views/notify/provisioned_member_access_granted_email.haml new file mode 100644 index 00000000000..2f2fd33145a --- /dev/null +++ b/app/views/notify/provisioned_member_access_granted_email.haml @@ -0,0 +1,24 @@ +- source_link = link_to(member_source.human_name, member_source.web_url, target: '_blank', rel: 'noopener noreferrer', class: :highlight) +- confirmation_link = confirmation_url(@user, confirmation_token: @user.confirmation_token) + +%tr + %td.text-content + %p + = _('An Enterprise User GitLab account has been created for you by your organization:') + %p + = _('Username: %{username}') % { username: @user.username } + %br + = _('Email: %{email}') % { email: @user.email } + %br + = _('GitLab group: %{source_link}').html_safe % { source_link: source_link } + +%tr + %td.text-content + %p + = _('By authenticating with an account tied to an Enterprise e-mail address, it is understood that this account is an Enterprise User. ') + = _('To ensure no loss of personal content, an Individual User should create a separate account under their own personal email address, not tied to the Enterprise email domain or name-space.') + - unless @user.confirmed? + %p + = _('To get started, click the link below to confirm your account.') + %p + = link_to 'Confirm your account', confirmation_link diff --git a/app/views/profiles/chat_names/index.html.haml b/app/views/profiles/chat_names/index.html.haml index e0b0f839455..782850afcda 100644 --- a/app/views/profiles/chat_names/index.html.haml +++ b/app/views/profiles/chat_names/index.html.haml @@ -9,7 +9,7 @@ = _('You can see your chat accounts.') .col-lg-8 - %h5 Active chat names (#{@chat_names.size}) + %h5.gl-mt-0 Active chat names (#{@chat_names.size}) - if @chat_names.present? .table-responsive diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index bf9f1336a4f..41699d6f01f 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -70,7 +70,7 @@ prepend: emoji_button, append: reset_message_button, placeholder: s_("Profiles|What's your status?") - - if Feature.enabled?(:set_user_availability_status, @user) + - if Feature.enabled?(:set_user_availability_status, @user, default_enabled: :yaml) .checkbox-icon-inline-wrapper = status_form.check_box :availability, { data: { testid: "user-availability-checkbox" }, label: s_("Profiles|Busy"), wrapper_class: 'gl-mr-0 gl-font-weight-bold' }, availability["busy"], availability["not_set"] .gl-text-gray-600.gl-ml-5= s_('Profiles|"Busy" will be shown next to your name') diff --git a/app/views/profiles/two_factor_auths/_codes.html.haml b/app/views/profiles/two_factor_auths/_codes.html.haml index 178a9d3f8b4..9f850842f58 100644 --- a/app/views/profiles/two_factor_auths/_codes.html.haml +++ b/app/views/profiles/two_factor_auths/_codes.html.haml @@ -1,18 +1,3 @@ - show_success_alert = local_assigns.fetch(:show_success_alert, nil) -- if Feature.enabled?(:vue_2fa_recovery_codes, current_user, default_enabled: true) - .js-2fa-recovery-codes{ data: { codes: @codes.to_json, profile_account_path: profile_account_path(two_factor_auth_enabled_successfully: show_success_alert) } } -- else - %p.slead - - lose_2fa_message = _('Should you ever lose your phone or access to your one time password secret, each of these recovery codes can be used one time each to regain access to your account. Please save them in a safe place, or you %{b_start}will%{b_end} lose access to your account.') % { b_start:'<b>', b_end:'</b>' } - = lose_2fa_message.html_safe - - .codes.card{ data: { qa_selector: 'codes_content' } } - %ul - - @codes.each do |code| - %li - %span.monospace{ data: { qa_selector: 'code_content' } }= code - - .d-flex - = link_to _('Proceed'), profile_account_path, class: 'gl-button btn btn-success gl-mr-3', data: { qa_selector: 'proceed_button' } - = link_to _('Download codes'), "data:text/plain;charset=utf-8,#{CGI.escape(@codes.join("\n"))}", download: "gitlab-recovery-codes.txt", class: 'gl-button btn btn-default' +.js-2fa-recovery-codes{ data: { codes: @codes.to_json, profile_account_path: profile_account_path(two_factor_auth_enabled_successfully: show_success_alert) } } diff --git a/app/views/profiles/two_factor_auths/create.html.haml b/app/views/profiles/two_factor_auths/create.html.haml index be4800024cf..606dda5ed55 100644 --- a/app/views/profiles/two_factor_auths/create.html.haml +++ b/app/views/profiles/two_factor_auths/create.html.haml @@ -1,8 +1,4 @@ - page_title _('Two-factor Authentication'), _('Account') - add_page_specific_style 'page_bundles/profile_two_factor_auth' -- unless Feature.enabled?(:vue_2fa_recovery_codes, current_user, default_enabled: true) - .gl-alert.gl-alert-success.gl-mb-5 - = _('Congratulations! You have enabled Two-factor Authentication!') - = render 'codes', show_success_alert: true diff --git a/app/views/projects/_export.html.haml b/app/views/projects/_export.html.haml index 5ec2dc57f96..86dfcda6d1b 100644 --- a/app/views/projects/_export.html.haml +++ b/app/views/projects/_export.html.haml @@ -2,7 +2,7 @@ - project = local_assigns.fetch(:project) -.sub-section +.sub-section{ data: { qa_selector: 'export_project_content' } } %h4= _('Export project') %p= _('Export this project with all its related data in order to move your project to a new GitLab instance. Once the export is finished, you can import the file from the "New Project" page.') diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index ebb0dd8b39f..3e1d08e646e 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -25,7 +25,7 @@ %span.access-request-links.gl-ml-3 = render 'shared/members/access_request_links', source: @project - if @project.tag_list.present? - %span.home-panel-topic-list.mt-2.w-100.d-inline-flex.gl-font-base.gl-font-weight-normal + %span.home-panel-topic-list.mt-2.w-100.d-inline-flex.gl-font-base.gl-font-weight-normal.gl-align-items-center = sprite_icon('tag', css_class: 'icon gl-relative gl-mr-2') - @project.topics_to_show.each do |topic| diff --git a/app/views/projects/_invite_members_modal.html.haml b/app/views/projects/_invite_members_modal.html.haml index ad95f39bbfa..e8f61336882 100644 --- a/app/views/projects/_invite_members_modal.html.haml +++ b/app/views/projects/_invite_members_modal.html.haml @@ -1,7 +1,7 @@ - if invite_members_allowed?(project.group) .js-invite-members-modal{ data: { id: project.id, name: project.name, - is_project: true, + is_project: 'true', access_levels: GroupMember.access_level_roles.to_json, default_access_level: Gitlab::Access::GUEST, help_link: help_page_url('user/permissions') } } diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index 3b2b3a2ba67..153235c37d2 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -2,17 +2,17 @@ %section.settings.js-service-desk-setting-wrapper.no-animate#js-service-desk{ class: ('expanded' if expanded) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Service Desk') - %button.btn.js-settings-toggle + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') - link_start = "<a href='#{help_page_path('user/project/service_desk')}' target='_blank' rel='noopener noreferrer'>".html_safe - %p= _('Enable/disable your service desk. %{link_start}Learn more about service desk%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + %p= _('Enable and disable Service Desk. Some additional configuration might be required. %{link_start}Learn more%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } .settings-content - if ::Gitlab::ServiceDesk.supported? .js-service-desk-setting-root{ data: { endpoint: project_service_desk_path(@project), enabled: "#{@project.service_desk_enabled}", incoming_email: (@project.service_desk_incoming_address if @project.service_desk_enabled), custom_email: (@project.service_desk_custom_address if @project.service_desk_enabled), - custom_email_enabled: "#{@project.service_desk_custom_address_enabled?}", + custom_email_enabled: "#{Gitlab::ServiceDeskEmail.enabled?}", selected_template: "#{@project.service_desk_setting&.issue_template_key}", outgoing_name: "#{@project.service_desk_setting&.outgoing_name}", project_key: "#{@project.service_desk_setting&.project_key}", diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml index 314211057f9..182164d2175 100644 --- a/app/views/projects/_visibility_modal.html.haml +++ b/app/views/projects/_visibility_modal.html.haml @@ -18,9 +18,9 @@ = _('Once you confirm and press "Reduce project visibility":') %ul %li - = ("Current forks will keep their visibility level but their fork relationship with this project will be %{strong_start}removed%{strong_end}.").html_safe % { strong_start: strong_start, strong_end: strong_end } + = _("Current forks will keep their visibility level.").html_safe %label{ for: "confirm_path_input" } - = ("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } } + = _("To confirm, type %{phrase_code}").html_safe % { phrase_code: '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: @project.full_path } } .form-group = text_field_tag 'confirm_path_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' .form-actions diff --git a/app/views/projects/alert_management/index.html.haml b/app/views/projects/alert_management/index.html.haml index 415820ac3ad..3bb489f2b69 100644 --- a/app/views/projects/alert_management/index.html.haml +++ b/app/views/projects/alert_management/index.html.haml @@ -1,3 +1,4 @@ - page_title _('Alerts') +- add_page_specific_style 'page_bundles/incident_management_list' #js-alert_management{ data: alert_management_data(@current_user, @project) } diff --git a/app/views/projects/blob/_template_selectors.html.haml b/app/views/projects/blob/_template_selectors.html.haml index b4962f4e78e..70a4202a5d0 100644 --- a/app/views/projects/blob/_template_selectors.html.haml +++ b/app/views/projects/blob/_template_selectors.html.haml @@ -11,5 +11,8 @@ = 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) + .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 = dropdown_tag(_("Apply a template"), options: { toggle_class: 'js-dockerfile-selector qa-dockerfile-dropdown', dropdown_class: 'dropdown-menu-selectable', filter: true, placeholder: "Filter", data: { data: dockerfile_names(@project) } } ) diff --git a/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml b/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml index 3326cded42a..d8d27c3330b 100644 --- a/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml +++ b/app/views/projects/blob/viewers/_gitlab_ci_yml.html.haml @@ -1,9 +1,9 @@ - if viewer.valid?(project: @project, sha: @commit.sha, user: @current_user) = sprite_icon('check') - This GitLab CI configuration is valid. + = s_('Pipelines|This GitLab CI configuration is valid.') - else = sprite_icon('warning-solid') - This GitLab CI configuration is invalid: + = s_('Pipelines|This GitLab CI configuration is invalid:') = viewer.validation_message(project: @project, sha: @commit.sha, user: @current_user) -= link_to 'Learn more', help_page_path('ci/yaml/README') += link_to _('Learn more'), help_page_path('ci/yaml/README') diff --git a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml index 379a6c3084a..b1c8e110493 100644 --- a/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml +++ b/app/views/projects/blob/viewers/_gitlab_ci_yml_loading.html.haml @@ -1,4 +1,4 @@ = loading_icon(css_class: "gl-vertical-align-text-bottom mr-1") -Validating GitLab CI configuration… += s_('Pipelines|Validating GitLab CI configuration…') -= link_to 'Learn more', help_page_path('ci/yaml/README') += link_to _('Learn more'), help_page_path('ci/yaml/README') diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 8f5fac1a40b..dc4172e2f09 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -4,7 +4,7 @@ %li{ class: "branch-item js-branch-item js-branch-#{branch.name}", data: { name: branch.name } } .branch-info .branch-title - = sprite_icon('fork', size: 12) + = sprite_icon('fork', size: 12, css_class: 'gl-flex-shrink-0') = link_to project_tree_path(@project, branch.name), class: 'item-title str-truncated-100 ref-name gl-ml-3 qa-branch-name' do = branch.name - if branch.name == @repository.root_ref diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index 24dfb59dc85..17314cd7c5a 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -2,9 +2,12 @@ - default_ref = params[:ref] || @project.default_branch - if @error - .alert.alert-danger - %button.close{ type: "button", "data-dismiss" => "alert" } × - = @error + .gl-alert.gl-alert-danger + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } + = sprite_icon('close', size: 16, css_class: 'gl-icon') + .gl-alert-body + = @error %h3.page-title New Branch %hr diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 8b4411776bc..017c804ced0 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -43,16 +43,16 @@ .label-container - if job.tags.any? - job.tags.each do |tag| - %span.badge.badge-primary + %span.badge.badge-pill.gl-badge.sm.badge-primary = tag - if job.try(:trigger_request) - %span.badge.badge-info= _('triggered') + %span.badge.badge-pill.gl-badge.sm.badge-info= _('triggered') - if job.try(:allow_failure) && !job.success? - %span.badge.badge-warning= _('allowed to fail') + %span.badge.badge-pill.gl-badge.sm.badge-warning= _('allowed to fail') - if job.schedulable? - %span.badge.badge-info= s_('DelayedJobs|delayed') + %span.badge.badge-pill.gl-badge.sm.badge-info= s_('DelayedJobs|delayed') - elsif job.action? - %span.badge.badge-info= _('manual') + %span.badge.badge-pill.gl-badge.sm.badge-info= _('manual') - if pipeline_link %td @@ -98,7 +98,7 @@ %td .gl-display-flex - - if can?(current_user, :read_build, job) && job.artifacts? + - if can?(current_user, :read_job_artifacts, job) && job.artifacts? = link_to download_project_job_artifacts_path(job.project, job), rel: 'nofollow', download: '', title: _('Download artifacts'), class: 'btn btn-build gl-button btn-icon btn-svg' do = sprite_icon('download') - if can?(current_user, :update_build, job) diff --git a/app/views/projects/ci/lints/show.html.haml b/app/views/projects/ci/lints/show.html.haml index feccea6cfc0..4463220e951 100644 --- a/app/views/projects/ci/lints/show.html.haml +++ b/app/views/projects/ci/lints/show.html.haml @@ -1,6 +1,6 @@ - page_title _("CI Lint") - page_description _("Validate your GitLab CI configuration file") -%h2.pt-3.pb-3= _("Validate your GitLab CI configuration") +%h4.pt-3.pb-3= _("Validate your GitLab CI configuration") #js-ci-lint{ data: { endpoint: project_ci_lint_path(@project), pipeline_simulation_help_page_path: help_page_path('ci/lint', anchor: 'pipeline-simulation') , lint_help_page_path: help_page_path('ci/lint', anchor: 'validate-basic-logic-and-syntax') } } diff --git a/app/views/projects/ci/pipeline_editor/show.html.haml b/app/views/projects/ci/pipeline_editor/show.html.haml index f1f8658fa3b..10aed15f380 100644 --- a/app/views/projects/ci/pipeline_editor/show.html.haml +++ b/app/views/projects/ci/pipeline_editor/show.html.haml @@ -1,8 +1,12 @@ - page_title s_('Pipelines|Pipeline Editor') #js-pipeline-editor{ data: { "ci-config-path": @project.ci_config_path_or_default, - "project-path" => @project.full_path, + "project-path" => @project.path, + "project-full-path" => @project.full_path, + "project-namespace" => @project.namespace.full_path, "default-branch" => @project.default_branch, - "commit-id" => @project.commit ? @project.commit.id : '', + "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/commit/_change.html.haml b/app/views/projects/commit/_change.html.haml index 11adc7fd64a..69b20fbc6d0 100644 --- a/app/views/projects/commit/_change.html.haml +++ b/app/views/projects/commit/_change.html.haml @@ -6,34 +6,20 @@ - revert_commit = _('Revert this commit') - description = s_('ChangeTypeAction|This will create a new commit in order to revert the existing changes.') - title = commit.merged_merge_request(current_user) ? revert_merge_request : revert_commit + + - if defined?(pajamas) + .js-revert-commit-modal{ data: { title: title, + endpoint: revert_namespace_project_commit_path(commit, namespace_id: @project.namespace.full_path, project_id: @project), + branch: @project.default_branch, + 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) } } + - else + = render "projects/commit/commit_modal", title: title, type: type, commit: commit, branch_label: branch_label, description: description, label: label + - when 'cherry-pick' - label = s_('ChangeTypeAction|Cherry-pick') - branch_label = s_('ChangeTypeActionLabel|Pick into branch') - title = commit.merged_merge_request(current_user) ? _('Cherry-pick this merge request') : _('Cherry-pick this commit') - -.modal{ id: "modal-#{type}-commit", tabindex: -1 } - .modal-dialog - .modal-content - .modal-header - %h3.page-title= title - %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } - %span{ "aria-hidden": true } × - .modal-body - - if description - %p= description - = form_tag [type.underscore, @project, commit], method: :post, remote: false, class: "js-#{type}-form js-requires-input" do - .form-group.branch - = label_tag 'start_branch', branch_label, class: 'label-bold' - - = hidden_field_tag :start_branch, @project.default_branch, id: 'start_branch' - = dropdown_tag(@project.default_branch, options: { title: s_("BranchSwitcherTitle|Switch branch"), filter: true, placeholder: s_("BranchSwitcherPlaceholder|Search branches"), toggle_class: 'js-project-refs-dropdown dynamic', dropdown_class: 'dropdown-menu-selectable', data: { field_name: "start_branch", selected: @project.default_branch, start_branch: @project.default_branch, refs_url: project_branches_path(@project), submit_form_on_click: false } }) - - - if can?(current_user, :push_code, @project) - = render 'shared/new_merge_request_checkbox' - - else - = hidden_field_tag 'create_merge_request', 1, id: nil - .form-actions - = submit_tag label, class: 'gl-button btn btn-success' - = link_to _("Cancel"), '#', class: "gl-button btn btn-cancel", "data-dismiss" => "modal" - - = render 'shared/projects/edit_information' + = render "projects/commit/commit_modal", title: title, type: type, commit: commit, branch_label: branch_label, description: description, label: label diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 6f2797654d0..e8d524daced 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -37,7 +37,7 @@ #{ _('Browse Files') } - if can_collaborate && !@commit.has_been_reverted?(current_user) %li.clearfix - = revert_commit_link(@commit, project_commit_path(@project, @commit.id), has_tooltip: false) + = revert_commit_link(@commit, project_commit_path(@project, @commit.id), pajamas: true) - if can_collaborate %li.clearfix = cherry_pick_commit_link(@commit, project_commit_path(@project, @commit.id), has_tooltip: false) diff --git a/app/views/projects/commit/_commit_modal.html.haml b/app/views/projects/commit/_commit_modal.html.haml new file mode 100644 index 00000000000..a82d77fdc91 --- /dev/null +++ b/app/views/projects/commit/_commit_modal.html.haml @@ -0,0 +1,26 @@ +.modal{ id: "modal-#{type}-commit", tabindex: -1 } + .modal-dialog + .modal-content + .modal-header + %h3.page-title= title + %button.close{ type: "button", "data-dismiss": "modal", "aria-label" => _('Close') } + %span{ "aria-hidden": true } × + .modal-body + - if description + %p= description + = form_tag [type.underscore, @project, commit], method: :post, remote: false, class: "js-#{type}-form js-requires-input" do + .form-group.branch + = label_tag 'start_branch', branch_label, class: 'label-bold' + + = hidden_field_tag :start_branch, @project.default_branch, id: 'start_branch' + = dropdown_tag(@project.default_branch, options: { title: s_("BranchSwitcherTitle|Switch branch"), filter: true, placeholder: s_("BranchSwitcherPlaceholder|Search branches"), toggle_class: 'js-project-refs-dropdown dynamic', dropdown_class: 'dropdown-menu-selectable', data: { field_name: "start_branch", selected: @project.default_branch, start_branch: @project.default_branch, refs_url: project_branches_path(@project), submit_form_on_click: false } }) + + - if can?(current_user, :push_code, @project) + = render 'shared/new_merge_request_checkbox' + - else + = hidden_field_tag 'create_merge_request', 1, id: nil + .form-actions + = submit_tag label, class: 'gl-button btn btn-success' + = link_to _("Cancel"), '#', class: "gl-button btn btn-cancel", "data-dismiss" => "modal" + + = render 'shared/projects/edit_information' diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml index 003a27f4c9a..e7b2e757ce4 100644 --- a/app/views/projects/commit/show.html.haml +++ b/app/views/projects/commit/show.html.haml @@ -17,5 +17,5 @@ .limited-width-notes = render "shared/notes/notes_with_form", :autocomplete => true - if can_collaborate_with_project?(@project) - - %w(revert cherry-pick).each do |type| - = render "projects/commit/change", type: type, commit: @commit, title: @commit.title + = render "projects/commit/change", type: 'revert', commit: @commit, pajamas: true + = render "projects/commit/change", type: 'cherry-pick', commit: @commit, title: @commit.title diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 387564f6408..cde8a5f69dd 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -3,17 +3,19 @@ - @content_class = "limit-container-width" unless fluid_layout - expanded = expanded_by_default? += render "shared/search_settings" + %section.settings.general-settings.no-animate.expanded#js-general-settings .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Naming, topics, avatar') - %button.btn.btn-default.js-settings-toggle{ type: 'button' }= _('Collapse') + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' }= _('Collapse') %p= _('Update your project name, topics, description, and avatar.') .settings-content= render 'projects/settings/general' %section.settings.sharing-permissions.no-animate#js-shared-permissions{ class: ('expanded' if expanded), data: { qa_selector: 'visibility_features_permissions_content' } } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Visibility, project features, permissions') - %button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') %p= _('Choose visibility level, enable/disable project features (issues, repository, wiki, snippets) and set permissions.') .settings-content @@ -28,7 +30,7 @@ %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)] } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Merge requests') - %button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') = render_if_exists 'projects/merge_request_settings_description_text' .settings-content @@ -46,11 +48,10 @@ .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only = s_('ProjectSettings|Badges') - %button.btn.btn-default.js-settings-toggle{ type: 'button' } - = expanded ? _('Collapse') : _('Expand') + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') %p - = s_('ProjectSettings|Customize your project badges.') - = link_to s_('ProjectSettings|Learn more about badges.'), help_page_path('user/project/badges') + = s_('ProjectSettings|Customize this project\'s badges.') + = link_to s_('ProjectSettings|What are badges?'), help_page_path('user/project/badges') .settings-content = render 'shared/badges/badge_settings' @@ -61,7 +62,7 @@ %section.qa-advanced-settings.settings.advanced-settings.no-animate#js-project-advanced-settings{ class: ('expanded' if expanded) } .settings-header %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Advanced') - %button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' }= expanded ? _('Collapse') : _('Expand') %p= _('Housekeeping, export, path, transfer, remove, archive.') .settings-content diff --git a/app/views/projects/environments/_metrics_button.html.haml b/app/views/projects/environments/_metrics_button.html.haml index 5a691676a68..65abaf44082 100644 --- a/app/views/projects/environments/_metrics_button.html.haml +++ b/app/views/projects/environments/_metrics_button.html.haml @@ -3,5 +3,5 @@ - return unless can?(current_user, :read_environment, environment) = link_to environment_metrics_path(environment), title: _('See metrics'), class: 'gl-button btn metrics-button' do - = sprite_icon('chart') + = sprite_icon('chart', css_class: 'gl-mr-2') = _("Monitoring") diff --git a/app/views/projects/incidents/index.html.haml b/app/views/projects/incidents/index.html.haml index a89e93618bc..c29ab11a720 100644 --- a/app/views/projects/incidents/index.html.haml +++ b/app/views/projects/incidents/index.html.haml @@ -1,3 +1,4 @@ - page_title _('Incidents') +- add_page_specific_style 'page_bundles/incident_management_list' #js-incidents{ data: incidents_data(@project, params) } diff --git a/app/views/projects/issues/_design_management.html.haml b/app/views/projects/issues/_design_management.html.haml index ad0605b10a8..a2ff9620c0c 100644 --- a/app/views/projects/issues/_design_management.html.haml +++ b/app/views/projects/issues/_design_management.html.haml @@ -3,7 +3,7 @@ - requirements_link_url = help_page_path('user/project/issues/design_management', anchor: 'requirements') - requirements_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: requirements_link_url } - link_end = '</a>'.html_safe -- enable_lfs_message = s_("DesignManagement|To upload designs, you'll need to enable LFS and have admin enable hashed storage. %{requirements_link_start}More information%{requirements_link_end}").html_safe % { requirements_link_start: requirements_link_start, requirements_link_end: link_end } +- enable_lfs_message = s_("DesignManagement|To upload designs, you'll need to enable LFS and have an admin enable hashed storage. %{requirements_link_start}More information%{requirements_link_end}").html_safe % { requirements_link_start: requirements_link_start, requirements_link_end: link_end } - if @project.design_management_enabled? - add_page_startup_graphql_call('design_management/get_design_list', { fullPath: @project.full_path, iid: @issue.iid.to_s, atVersion: nil }) diff --git a/app/views/projects/issues/import_csv/_button.html.haml b/app/views/projects/issues/import_csv/_button.html.haml index ea8f53f7342..e60460687a9 100644 --- a/app/views/projects/issues/import_csv/_button.html.haml +++ b/app/views/projects/issues/import_csv/_button.html.haml @@ -2,7 +2,7 @@ - can_edit = can?(current_user, :admin_project, @project) .dropdown.btn-group - %button.btn.rounded-right.text-center{ class: ('has-tooltip' if type == :icon), title: (_('Import issues') if type == :icon), + %button.btn.gl-button.rounded-right.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') diff --git a/app/views/projects/jobs/index.html.haml b/app/views/projects/jobs/index.html.haml index cd062fcf675..e14473708af 100644 --- a/app/views/projects/jobs/index.html.haml +++ b/app/views/projects/jobs/index.html.haml @@ -8,10 +8,11 @@ .nav-controls - if can?(current_user, :update_build, @project) - if !@repository.gitlab_ci_yml && !experiment_enabled?(:jobs_empty_state) - = link_to 'Get started with Pipelines', help_page_path('ci/quick_start/README'), class: 'btn gl-button btn-info js-empty-state-button' + = link_to s_('Pipelines|Get started with Pipelines'), help_page_path('ci/quick_start/README'), class: 'btn gl-button btn-info js-empty-state-button' = link_to project_ci_lint_path(@project), class: 'btn gl-button btn-default' do - %span CI lint + %span + = _('CI Lint') .content-list.builds-content-list = render "table", builds: @builds, project: @project diff --git a/app/views/projects/merge_requests/_mr_title.html.haml b/app/views/projects/merge_requests/_mr_title.html.haml index 1691a304e8b..6a42f33db7d 100644 --- a/app/views/projects/merge_requests/_mr_title.html.haml +++ b/app/views/projects/merge_requests/_mr_title.html.haml @@ -12,9 +12,9 @@ .detail-page-header.border-bottom-0.pt-0.pb-0 .detail-page-header-body - .issuable-status-box.status-box{ class: status_box_class(@merge_request) } - = sprite_icon(state_icon_name, css_class: 'd-block d-sm-none') - %span.d-none.d-sm-block + .issuable-status-box.status-box.js-mr-status-box{ class: status_box_class(@merge_request), data: { state: @merge_request.state } } + = sprite_icon(state_icon_name, css_class: 'gl-display-block gl-display-sm-none!') + %span.gl-display-none.gl-display-sm-block = state_human_name .issuable-meta diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index c70fc624dde..849cfac825f 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -57,6 +57,8 @@ = render "projects/merge_requests/awards_block" - if mr_action === "show" - add_page_startup_api_call discussions_path(@merge_request) + - add_page_startup_api_call widget_project_json_merge_request_path(@project, @merge_request, format: :json) + - add_page_startup_api_call cached_widget_project_json_merge_request_path(@project, @merge_request, format: :json) #js-vue-mr-discussions{ data: { notes_data: notes_data(@merge_request).to_json, noteable_data: serialize_issuable(@merge_request, serializer: 'noteable'), noteable_type: 'MergeRequest', @@ -88,7 +90,8 @@ dismiss_endpoint: user_callouts_path, show_suggest_popover: show_suggest_popover?.to_s, show_whitespace_default: @show_whitespace_default.to_s, - file_by_file_default: @file_by_file_default.to_s } + file_by_file_default: @file_by_file_default.to_s, + default_suggestion_commit_message: default_suggestion_commit_message } .mr-loading-status .loading.hide diff --git a/app/views/projects/mirrors/_instructions.html.haml b/app/views/projects/mirrors/_instructions.html.haml index 97b04acea31..a91751da0aa 100644 --- a/app/views/projects/mirrors/_instructions.html.haml +++ b/app/views/projects/mirrors/_instructions.html.haml @@ -3,12 +3,12 @@ %li = html_escape(_('The repository must be accessible over %{code_open}http://%{code_close}, %{code_open}https://%{code_close}, %{code_open}ssh://%{code_close} or %{code_open}git://%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - %li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, please provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } + %li= html_escape(_('When using the %{code_open}http://%{code_close} or %{code_open}https://%{code_close} protocols, provide the exact URL to the repository. HTTP redirects will not be followed.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li= html_escape(_('Include the username in the URL if required: %{code_open}https://username@gitlab.company.com/group/project.git%{code_close}.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li - minutes = Gitlab.config.gitlab_shell.git_timeout / 60 = _("The update action will time out after %{number_of_minutes} minutes. For big repositories, use a clone/push combination.") % { number_of_minutes: minutes } %li= mirror_lfs_sync_message %li - = _('This user will be the author of all events in the activity feed that are the result of an update, + = _('In case of pull mirroring, your user will be the author of all events in the activity feed that are the result of an update, like new branches being created or new commits being pushed to existing branches.') diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index 5b074ff8a28..98d35845b31 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -10,7 +10,7 @@ = 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.') - = link_to _('Read more'), help_page_path('user/project/repository/repository_mirroring.md'), target: '_blank' + = link_to _('How do I mirror repositories?'), help_page_path('user/project/repository/repository_mirroring'), target: '_blank', rel: 'noopener noreferrer' .settings-content - if mirror_settings_enabled @@ -21,7 +21,7 @@ .form-group.has-feedback = label_tag :url, _('Git repository URL'), class: 'label-light' - = text_field_tag :url, nil, class: 'form-control js-mirror-url js-repo-url qa-mirror-repository-url-input', placeholder: _('Input your repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password' + = text_field_tag :url, nil, class: 'form-control js-mirror-url js-repo-url qa-mirror-repository-url-input', placeholder: _('Input the remote repository URL'), required: true, pattern: "(#{protocols}):\/\/.+", autocomplete: 'new-password' = render 'projects/mirrors/instructions' @@ -29,8 +29,10 @@ .form-check.gl-mb-3 = check_box_tag :only_protected_branches, '1', false, class: 'js-mirror-protected form-check-input' - = label_tag :only_protected_branches, _('Only mirror protected branches'), class: 'form-check-label' - = link_to sprite_icon('question-o'), help_page_path('user/project/protected_branches'), target: '_blank' + = label_tag :only_protected_branches, _('Mirror only protected branches'), class: 'form-check-label' + .form-text.text-muted + = _('If enabled, only protected branches will be mirrored.') + = 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 diff --git a/app/views/projects/mirrors/_mirror_repos_push.html.haml b/app/views/projects/mirrors/_mirror_repos_push.html.haml index 03839146f3b..04f44f4748e 100644 --- a/app/views/projects/mirrors/_mirror_repos_push.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_push.html.haml @@ -10,4 +10,6 @@ .form-check.gl-mb-3 = check_box_tag :keep_divergent_refs, '1', false, class: 'js-mirror-keep-divergent-refs form-check-input' = label_tag :keep_divergent_refs, _('Keep divergent refs'), class: 'form-check-label' - = link_to sprite_icon('question-o'), help_page_path('user/project/repository/repository_mirroring', anchor: 'keep-divergent-refs'), target: '_blank' + .form-text.text-muted + = _('By default, if any ref (branch, tag, or commit) on the remote mirror has diverged from the local repository, the entire push will fail, and nothing will be updated. Choose this option to override this behavior. After the mirror is created, this can only be modified via the API.') + = link_to _('Learn more.'), help_page_path('user/project/repository/repository_mirroring', anchor: 'keep-divergent-refs'), target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index a407aa9ac13..6af185696b0 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? } } + .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 } } .row{ 'v-cloak': true } .col-lg-3.profile-settings-sidebar diff --git a/app/views/projects/pages/_destroy.haml b/app/views/projects/pages/_destroy.haml index 2714b5f221a..99efb0b98c6 100644 --- a/app/views/projects/pages/_destroy.haml +++ b/app/views/projects/pages/_destroy.haml @@ -5,10 +5,10 @@ = s_('GitLabPages|Remove pages') .errors-holder .card-body - %p + %p.gl-mb-0 = s_('GitLabPages|Removing pages will prevent them from being exposed to the outside world.') - .form-actions - = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-danger" + .card-footer + = link_to s_('GitLabPages|Remove pages'), project_pages_path(@project), data: { confirm: s_('GitLabPages|Are you sure?')}, method: :delete, class: "btn gl-button btn-danger" - else .nothing-here-block = s_('GitLabPages|Only project maintainers can remove pages') diff --git a/app/views/projects/pages/_use.html.haml b/app/views/projects/pages/_use.html.haml index ab44fd77e1e..e9ace8c72f1 100644 --- a/app/views/projects/pages/_use.html.haml +++ b/app/views/projects/pages/_use.html.haml @@ -3,7 +3,7 @@ .card-header.bg-info.text-white = s_('GitLabPages|Configure pages') .card-body - %p + %p.gl-mb-0 - link_start = "<a href='#{help_page_path('user/project/pages/index.md')}' target='_blank' rel='noopener noreferrer'>".html_safe - link_end = '</a>'.html_safe = s_('GitLabPages|Learn how to upload your static site and have it served by GitLab by following the %{link_start}documentation on GitLab Pages%{link_end}.').html_safe % { link_start: link_start, diff --git a/app/views/projects/pipeline_schedules/index.html.haml b/app/views/projects/pipeline_schedules/index.html.haml index a52a6138402..90417a852d5 100644 --- a/app/views/projects/pipeline_schedules/index.html.haml +++ b/app/views/projects/pipeline_schedules/index.html.haml @@ -16,5 +16,5 @@ %ul.content-list = render partial: "table" - else - .card.bg-light + .card.bg-light.gl-mt-3 .nothing-here-block= _("No schedules") diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index f77f22cc555..77aa537dfdb 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -21,24 +21,24 @@ .icon-container = sprite_icon('flag') - if @pipeline.child? - %span.js-pipeline-child.badge.badge-primary.has-tooltip{ title: s_("Pipelines|This is a child pipeline within the parent pipeline") } + %span.js-pipeline-child.badge.badge-pill.gl-badge.sm.badge-primary.has-tooltip{ title: s_("Pipelines|This is a child pipeline within the parent pipeline") } = s_('Pipelines|Child pipeline') = surround '(', ')' do = link_to s_('Pipelines|parent'), pipeline_path(@pipeline.triggered_by_pipeline), class: 'text-white text-underline' - if @pipeline.latest? - %span.js-pipeline-url-latest.badge.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") } + %span.js-pipeline-url-latest.badge.badge-pill.gl-badge.sm.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") } latest - if @pipeline.has_yaml_errors? - %span.js-pipeline-url-yaml.badge.badge-danger.has-tooltip{ title: @pipeline.yaml_errors } + %span.js-pipeline-url-yaml.badge.badge-pill.gl-badge.sm.badge-danger.has-tooltip{ title: @pipeline.yaml_errors } yaml invalid - if @pipeline.failure_reason? - %span.js-pipeline-url-failure.badge.badge-danger.has-tooltip{ title: @pipeline.failure_reason } + %span.js-pipeline-url-failure.badge.badge-pill.gl-badge.sm.badge-danger.has-tooltip{ title: @pipeline.failure_reason } error - if @pipeline.auto_devops_source? - popover_title_text = html_escape(_('This pipeline makes use of a predefined CI/CD configuration enabled by %{b_open}Auto DevOps.%{b_close}')) % { b_open: '<b>'.html_safe, b_close: '</b>'.html_safe } - popover_content_url = help_page_path('topics/autodevops/index.md') - popover_content_text = _('Learn more about Auto DevOps') - %a.js-pipeline-url-autodevops.badge.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body", + %a.js-pipeline-url-autodevops.badge.badge-pill.gl-badge.sm.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body", toggle: "popover", placement: "top", html: "true", @@ -48,10 +48,10 @@ } } Auto DevOps - if @pipeline.detached_merge_request_pipeline? - %span.js-pipeline-url-mergerequest.badge.badge-info.has-tooltip{ title: _('Pipelines for merge requests are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for Pipelines for Merged Results.') } + %span.js-pipeline-url-mergerequest.badge.badge-pill.gl-badge.sm.badge-info.has-tooltip{ title: _('Pipelines for merge requests are configured. A detached pipeline runs in the context of the merge request, and not against the merged result. Learn more in the documentation for Pipelines for Merged Results.') } detached - if @pipeline.stuck? - %span.js-pipeline-url-stuck.badge.badge-warning + %span.js-pipeline-url-stuck.badge.badge-pill.gl-badge.sm.badge-warning stuck .well-segment.branch-info diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index f3360e150ad..ff728ab2fb3 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,10 +1,4 @@ - page_title _('CI / CD Analytics') -- if Feature.enabled?(:graphql_pipeline_analytics) - #js-project-pipelines-charts-app{ data: { project_path: @project.full_path } } -- else - #js-project-pipelines-charts-app{ data: { counts: @counts, success_ratio: success_ratio(@counts), - times_chart: { labels: @charts[:pipeline_times].labels, values: @charts[:pipeline_times].pipeline_times }, - last_week_chart: { labels: @charts[:week].labels, totals: @charts[:week].total, success: @charts[:week].success }, - last_month_chart: { labels: @charts[:month].labels, totals: @charts[:month].total, success: @charts[:month].success }, - last_year_chart: { labels: @charts[:year].labels, totals: @charts[:year].total, success: @charts[:year].success } } } +#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 64ae4ff8daf..6a4dd88ae07 100644 --- a/app/views/projects/pipelines/index.html.haml +++ b/app/views/projects/pipelines/index.html.haml @@ -17,4 +17,4 @@ "new-pipeline-path" => can?(current_user, :create_pipeline, @project) && new_project_pipeline_path(@project), "ci-lint-path" => can?(current_user, :create_pipeline, @project) && project_ci_lint_path(@project), "reset-cache-path" => can?(current_user, :admin_pipeline, @project) && reset_cache_project_settings_ci_cd_path(@project) , - "has-gitlab-ci" => (@project.has_ci? && @project.builds_enabled?).to_s } } + "has-gitlab-ci" => has_gitlab_ci?(@project).to_s } } diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 847b96cbd0e..b3ad210aa47 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -6,6 +6,9 @@ - add_page_specific_style 'page_bundles/reports' - add_page_specific_style 'page_bundles/ci_status' +- if Feature.enabled?(:graphql_pipeline_details, @project) + - add_page_startup_graphql_call('pipelines/get_pipeline_details', { projectPath: @project.full_path, iid: @pipeline.iid }) + .js-pipeline-container{ data: { controller_action: "#{controller.action_name}" } } #js-pipeline-header-vue.pipeline-header-container{ data: { full_path: @project.full_path, pipeline_iid: @pipeline.iid, pipeline_id: @pipeline.id, pipelines_path: project_pipelines_path(@project) } } - if @pipeline.commit.present? diff --git a/app/views/projects/project_members/_groups.html.haml b/app/views/projects/project_members/_groups.html.haml index 39ef1e52a0d..fe8a50ebb42 100644 --- a/app/views/projects/project_members/_groups.html.haml +++ b/app/views/projects/project_members/_groups.html.haml @@ -1,8 +1,11 @@ -.card.project-members-groups - .card-header - = 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 } - %span.badge.badge-pill= group_links.size - %ul.content-list.members-list - - can_admin_member = can?(current_user, :admin_project_member, @project) +.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_admin_member, group_link_path: project_group_link_path(@project, 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 index 171212b6a96..24ca7ebded9 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -1,20 +1,18 @@ - project = local_assigns.fetch(:project) - members = local_assigns.fetch(:members) - group = local_assigns.fetch(:group) -- current_user_is_group_owner = group && group.has_owner?(current_user) +- current_user_is_group_owner = local_assigns.fetch(:current_user_is_group_owner) -.card - .card-header.flex-project-members-panel - %span.flex-project-title +.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 } - %span.badge.badge-pill= members.total_count - = form_tag project_project_members_path(project), method: :get, class: 'form-inline user-search-form flex-users-form' do - .form-group - .position-relative - = search_field_tag :search, params[:search], { placeholder: _('Find existing members by name'), class: 'form-control', spellcheck: false } - %button.user-search-btn{ type: "submit", "aria-label" => _("Submit search") } - = sprite_icon('search', css_class: 'gl-vertical-align-middle!') - = label_tag :sort_by, _('Sort by'), class: 'col-form-label label-bold px-2' + = 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', diff --git a/app/views/projects/project_members/index.html.haml b/app/views/projects/project_members/index.html.haml index cad76d7aeac..cf39ac4dd56 100644 --- a/app/views/projects/project_members/index.html.haml +++ b/app/views/projects/project_members/index.html.haml @@ -1,44 +1,97 @@ - page_title _("Members") -- can_admin_project_members = can?(current_user, :admin_project_member, @project) - group = @project.group .js-remove-member-modal .row.gl-mt-3 .col-lg-12 - - if project_can_be_shared? - %h4 - = _("Project members") - - if can_admin_project_members - %p= share_project_description(@project) - - else - %p - = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } + - if invite_members_allowed?(group) + .row + .col-md-12.col-lg-6.gl-display-flex + .gl-flex-direction-column.gl-flex-wrap.align-items-baseline + %h4 + = _("Project members") + .gl-justify-content-bottom.gl-display-flex.align-items-center + - if can_manage_project_members?(@project) + %p= share_project_description(@project) + - else + %p + = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } + .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') } } + = render_if_exists 'projects/invite_members_modal', project: @project - .light - - if can_admin_project_members && project_can_be_shared? - - if !membership_locked? && @project.allowed_to_share_with_group? - %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } - %li.nav-tab{ role: 'presentation' } - %a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _("Invite member") - %li.nav-tab{ role: 'presentation', class: ('active' if membership_locked?) } - %a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _("Invite group") + - else + - if project_can_be_shared? + %h4 + = _("Project members") + - if can_manage_project_members?(@project) + %p= share_project_description(@project) + - else + %p + = html_escape(_("Members can be added by project %{i_open}Maintainers%{i_close} or %{i_open}Owners%{i_close}")) % { i_open: '<i>'.html_safe, i_close: '</i>'.html_safe } - .tab-content.gitlab-tab-content - .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } - = render 'shared/members/invite_member', submit_url: project_project_members_path(@project), access_levels: ProjectMember.access_level_roles, default_access_level: @project_member.access_level, can_import_members?: can_import_members?, import_path: import_project_project_members_path(@project) - .tab-pane{ id: 'invite-group-pane', role: 'tabpanel', class: ('active' if membership_locked?) } - = render 'shared/members/invite_group', submit_url: project_group_links_path(@project), access_levels: ProjectGroupLink.access_options, default_access_level: ProjectGroupLink.default_access, group_link_field: 'link_group_id', group_access_field: 'link_group_access' - - elsif !membership_locked? - .invite-member= render 'shared/members/invite_member', submit_url: project_project_members_path(@project), access_levels: ProjectMember.access_level_roles, default_access_level: @project_member.access_level, can_import_members?: can_import_members?, import_path: import_project_project_members_path(@project) - - elsif @project.allowed_to_share_with_group? - .invite-group= render 'shared/members/invite_group', access_levels: ProjectGroupLink.access_options, default_access_level: ProjectGroupLink.default_access, submit_url: project_group_links_path(@project), group_link_field: 'link_group_id', group_access_field: 'link_group_access' + - if !invite_members_allowed?(group) && can_manage_project_members?(@project) && project_can_be_shared? + - if !membership_locked? && @project.allowed_to_share_with_group? + %ul.nav-links.nav.nav-tabs.gitlab-tabs{ role: 'tablist' } + %li.nav-tab{ role: 'presentation' } + %a.nav-link.active{ href: '#invite-member-pane', id: 'invite-member-tab', data: { toggle: 'tab' }, role: 'tab' }= _("Invite member") + %li.nav-tab{ role: 'presentation', class: ('active' if membership_locked?) } + %a.nav-link{ href: '#invite-group-pane', id: 'invite-group-tab', data: { toggle: 'tab', qa_selector: 'invite_group_tab' }, role: 'tab' }= _("Invite group") - = render 'shared/members/requests', membership_source: @project, group: group, requesters: @requesters - .clearfix - %h5.member.existing-title - = _("Existing members and groups") - - if @group_links.any? + .tab-content.gitlab-tab-content + .tab-pane.active{ id: 'invite-member-pane', role: 'tabpanel' } + = render 'shared/members/invite_member', submit_url: project_project_members_path(@project), access_levels: ProjectMember.access_level_roles, default_access_level: @project_member.access_level, can_import_members?: can_import_members?, import_path: import_project_project_members_path(@project) + .tab-pane{ id: 'invite-group-pane', role: 'tabpanel', class: ('active' if membership_locked?) } + = render 'shared/members/invite_group', submit_url: project_group_links_path(@project), access_levels: ProjectGroupLink.access_options, default_access_level: ProjectGroupLink.default_access, group_link_field: 'link_group_id', group_access_field: 'link_group_access' + - elsif !membership_locked? + .invite-member= render 'shared/members/invite_member', submit_url: project_project_members_path(@project), access_levels: ProjectMember.access_level_roles, default_access_level: @project_member.access_level, can_import_members?: can_import_members?, import_path: import_project_project_members_path(@project) + - elsif @project.allowed_to_share_with_group? + .invite-group= render 'shared/members/invite_group', access_levels: ProjectGroupLink.access_options, default_access_level: ProjectGroupLink.default_access, submit_url: project_group_links_path(@project), group_link_field: 'link_group_id', group_access_field: 'link_group_access' + %ul.nav-links.mobile-separator.nav.nav-tabs + %li.nav-item + = link_to '#tab-members', class: ['nav-link', ('active' unless groups_tab_active?)], data: { toggle: 'tab' } do + %span + = _('Members') + %span.badge.badge-pill= @project_members.total_count + - if show_groups?(@group_links) + %li.nav-item + = link_to '#tab-groups', class: ['nav-link', ('active' if groups_tab_active?)] , data: { toggle: 'tab', qa_selector: 'groups_list_tab' } do + %span + = _('Groups') + %span.badge.badge-pill= @group_links.count + - if show_invited_members?(@project, @invited_members) + %li.nav-item + = link_to '#tab-invited-members', class: 'nav-link', data: { toggle: 'tab' } do + %span + = _('Invited') + %span.badge.badge-pill= @invited_members.count + - if show_access_requests?(@project, @requesters) + %li.nav-item + = link_to '#tab-access-requests', class: 'nav-link', data: { toggle: 'tab' } do + %span + = _('Access requests') + %span.badge.badge-pill= @requesters.count + .tab-content + #tab-members.tab-pane{ class: ('active' unless groups_tab_active?) } + = render 'projects/project_members/team', project: @project, group: group, members: @project_members, current_user_is_group_owner: current_user_is_group_owner?(@project) + = paginate @project_members, theme: "gitlab", params: { search_groups: nil } + - if show_groups?(@group_links) + #tab-groups.tab-pane{ class: ('active' if groups_tab_active?) } = render 'projects/project_members/groups', group_links: @group_links - - = render 'projects/project_members/team', project: @project, group: group, members: @project_members - = paginate @project_members, theme: "gitlab" + - if show_invited_members?(@project, @invited_members) + #tab-invited-members.tab-pane + .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) } + - if show_access_requests?(@project, @requesters) + #tab-access-requests.tab-pane + .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 } 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 7131e9925b3..6ce01566a42 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 @@ -6,24 +6,21 @@ .card-body = form_errors(@protected_branch) .form-group.row - .col-md-2.text-right - = f.label :name, 'Branch:' + = f.label :name, s_('ProtectedBranch|Branch:'), class: 'col-md-2 text-left text-md-right' .col-md-10 = render partial: "projects/protected_branches/shared/dropdown", locals: { f: f } .form-text.text-muted - wildcards_url = help_page_url('user/project/protected_branches', anchor: 'wildcard-protected-branches') - wildcards_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wildcards_url } - = (s_("ProtectedBranch|%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}*-stable%{code_tag_end} or %{code_tag_start}production/*%{code_tag_end} are supported") % { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>', code_tag_start: '<code>', code_tag_end: '</code>' }).html_safe + = (s_("ProtectedBranch|%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}*-stable%{code_tag_end} or %{code_tag_start}production/*%{code_tag_end} are supported.") % { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>', code_tag_start: '<code>', code_tag_end: '</code>' }).html_safe .form-group.row - %label.col-md-2.text-right{ for: 'merge_access_levels_attributes' } - = s_("ProtectedBranch|Allowed to merge:") + = f.label :merge_access_levels_attributes, s_("ProtectedBranch|Allowed to merge:"), class: 'col-md-2 text-left text-md-right' .col-md-10 = yield :merge_access_levels .form-group.row - %label.col-md-2.text-right{ for: 'push_access_levels_attributes' } - = s_("ProtectedBranch|Allowed to push:") + = 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 - = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form' + = 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' } diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml index f27936703de..66173c4759b 100644 --- a/app/views/projects/protected_branches/shared/_index.html.haml +++ b/app/views/projects/protected_branches/shared/_index.html.haml @@ -7,16 +7,15 @@ %button.btn.js-settings-toggle.qa-expand-protected-branches{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - Keep stable branches secure and force developers to use merge requests. + Keep stable branches secure, and force developers to use merge requests. #{link_to "What are protected branches?", help_page_path("user/project/protected_branches")} .settings-content %p - By default, protected branches are designed to: + By default, protected branches protect your code and: %ul - %li prevent their creation, if not already created, from everybody except Maintainers - %li prevent pushes from everybody except Maintainers - %li prevent <strong>anyone</strong> from force pushing to the branch - %li prevent <strong>anyone</strong> from deleting the branch - %p Read more about #{link_to "protected branches", help_page_path("user/project/protected_branches")} and #{link_to "project permissions", help_page_path("user/permissions")}. + %li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create new protected branches. + %li Allow only users with Maintainer permissions to push code. + %li Prevent <strong>anyone</strong> from force-pushing to the branch. + %li Prevent <strong>anyone</strong> from deleting the branch. - if can? current_user, :admin_project, @project = content_for :create_protected_branch diff --git a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml index c4bf2d20ecf..332cdd98e4a 100644 --- a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml +++ b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml @@ -2,24 +2,19 @@ %input{ type: 'hidden', name: 'update_section', value: 'js-protected-tags-settings' } .card .card-header - Protect a tag + = _('Protect a tag') .card-body = form_errors(@protected_tag) .form-group.row - .col-md-2.text-right - = f.label :name, 'Tag:' + = f.label :name, _('Tag:'), class: 'col-md-2 text-left text-md-right' .col-md-10.protected-tags-dropdown = render partial: "projects/protected_tags/shared/dropdown", locals: { f: f } .form-text.text-muted - = link_to 'Wildcards', help_page_path('user/project/protected_tags', anchor: 'wildcard-protected-tags') - such as - %code v* - or - %code *-release - are supported + - wildcards_url = help_page_path('user/project/protected_tags', anchor: 'wildcard-protected-tags') + - wildcards_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wildcards_url } + = html_escape(_("%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}v*%{code_tag_end} or %{code_tag_start}*-release%{code_tag_end} are supported.")) % { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>'.html_safe, code_tag_start: '<code>'.html_safe, code_tag_end: '</code>'.html_safe } .form-group.row - %label.col-md-2.text-right{ for: 'create_access_levels_attributes' } - Allowed to create: + = f.label :create_access_levels_attributes, _('Allowed to create:'), class: 'col-md-2 text-left text-md-right' .col-md-10 .create_access_levels-container = yield :create_access_levels diff --git a/app/views/projects/protected_tags/shared/_index.html.haml b/app/views/projects/protected_tags/shared/_index.html.haml index 4bf3ce09fc7..5734b7dc3c9 100644 --- a/app/views/projects/protected_tags/shared/_index.html.haml +++ b/app/views/projects/protected_tags/shared/_index.html.haml @@ -7,16 +7,14 @@ %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - Limit access to creating and updating tags. + Limit access to creating and updating tags. #{link_to "What are protected tags?", help_page_path("user/project/protected_tags")} .settings-content %p - By default, protected tags are designed to: + By default, protected tags protect your code and: %ul - %li Prevent tag creation by everybody except Maintainers - %li Prevent <strong>anyone</strong> from updating the tag - %li Prevent <strong>anyone</strong> from deleting the tag - - %p Read more about #{link_to "protected tags", help_page_path("user/project/protected_tags")}. + %li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create tags. + %li Prevent <strong>anyone</strong> from updating tags. + %li Prevent <strong>anyone</strong> from deleting tags. - if can? current_user, :admin_project, @project = yield :create_protected_tag diff --git a/app/views/projects/protected_tags/shared/_tags_list.html.haml b/app/views/projects/protected_tags/shared/_tags_list.html.haml index 382ea848243..a5a43072744 100644 --- a/app/views/projects/protected_tags/shared/_tags_list.html.haml +++ b/app/views/projects/protected_tags/shared/_tags_list.html.haml @@ -1,9 +1,9 @@ .protected-tags-list.js-protected-tags-list - if @protected_tags.empty? .card-header - Protected tag (#{@protected_tags_count}) + Protected tags (#{@protected_tags_count}) %p.settings-message.text-center - There are currently no protected tags, protect a tag with the form above. + No tags are protected. - else - can_admin_project = can?(current_user, :admin_project, @project) @@ -16,7 +16,7 @@ %col %thead %tr - %th Protected tag (#{@protected_tags_count}) + %th Protected tags (#{@protected_tags_count}) %th Last commit %th Allowed to create - if can_admin_project diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index b53fbc97c02..97bc366544f 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -1,23 +1,22 @@ - page_title _("Container Registry") - @content_class = "limit-container-width" unless fluid_layout +- add_page_startup_graphql_call('container_registry/get_container_repositories', { fullPath: @project.full_path, first: 10, name: nil, isGroupPage: false} ) %section - .row.registry-placeholder.prepend-bottom-10 - .col-12 - #js-container-registry{ data: { endpoint: project_container_registry_index_path(@project), - expiration_policy: @project.container_expiration_policy.to_json, - "help_page_path" => help_page_path('user/packages/container_registry/index'), - "two_factor_auth_help_link" => help_page_path('user/profile/account/two_factor_authentication'), - "personal_access_tokens_help_link" => help_page_path('user/profile/personal_access_tokens'), - "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), - "containers_error_image" => image_path('illustrations/docker-error-state.svg'), - "repository_url" => escape_once(@project.container_registry_url), - "registry_host_url_with_port" => escape_once(registry_config.host_port), - "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, - character_error: @character_error.to_s } } + #js-container-registry{ data: { endpoint: project_container_registry_index_path(@project), + expiration_policy: @project.container_expiration_policy.to_json, + "help_page_path" => help_page_path('user/packages/container_registry/index'), + "two_factor_auth_help_link" => help_page_path('user/profile/account/two_factor_authentication'), + "personal_access_tokens_help_link" => help_page_path('user/profile/personal_access_tokens'), + "no_containers_image" => image_path('illustrations/docker-empty-state.svg'), + "containers_error_image" => image_path('illustrations/docker-error-state.svg'), + "repository_url" => escape_once(@project.container_registry_url), + "registry_host_url_with_port" => escape_once(registry_config.host_port), + "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, + character_error: @character_error.to_s } } diff --git a/app/views/projects/runners/_group_runners.html.haml b/app/views/projects/runners/_group_runners.html.haml index a24ada53bac..9415516d6f6 100644 --- a/app/views/projects/runners/_group_runners.html.haml +++ b/app/views/projects/runners/_group_runners.html.haml @@ -1,37 +1,40 @@ -- link = link_to _('Runners API'), help_page_path('api/runners.md') +- link = link_to _('Runner API'), help_page_path('api/runners.md') -%h3 - = _('Group Runners') +%h4 + = _('Group runners') .bs-callout.bs-callout-warning - = _('GitLab Group Runners can execute code for all the projects in this group.') - = _('They can be managed using the %{link}.').html_safe % { link: link } + = _('These runners are shared across projects in this group.') + %br + %br + = _('Group runners can be managed with the %{link}.').html_safe % { link: link } - if @project.group - %hr + %br + %br - if @project.group_runners_enabled? = link_to toggle_group_runners_project_runners_path(@project), class: 'btn btn-close', method: :post do - = _('Disable group Runners') + = _('Disable group runners') - else = link_to toggle_group_runners_project_runners_path(@project), class: 'btn btn-success btn-inverted', method: :post do - = _('Enable group Runners') + = _('Enable group runners') = _('for this project') - if !@project.group - = _('This project does not belong to a group and can therefore not make use of group Runners.') + = _('This project does not belong to a group and cannot make use of group runners.') - elsif @group_runners.empty? - = _('This group does not provide any group Runners yet.') + = _('This group does not have any group runners yet.') - if can?(current_user, :admin_pipeline, @project.group) - - group_link = link_to _('Group CI/CD settings'), group_settings_ci_cd_path(@project.group) + - group_link = link_to _("group's CI/CD settings."), group_settings_ci_cd_path(@project.group) = _('Group maintainers can register group runners in the %{link}').html_safe % { link: group_link } - else - = _('Ask your group maintainer to set up a group Runner.') + = _('Ask your group maintainer to set up a group runner.') - else %h4.underlined-title - = _('Available group Runners: %{runners}').html_safe % { runners: @group_runners.count } + = _('Available group runners: %{runners}').html_safe % { runners: @group_runners.count } %ul.bordered-list = render partial: 'projects/runners/runner', collection: @group_runners, as: :runner diff --git a/app/views/projects/runners/_index.html.haml b/app/views/projects/runners/_index.html.haml index ae4fee1e14c..a02bdac442b 100644 --- a/app/views/projects/runners/_index.html.haml +++ b/app/views/projects/runners/_index.html.haml @@ -1,8 +1,5 @@ = render 'shared/runners/runner_description' -%hr - -%p.lead= _('To start serving your jobs you can either add specific Runners to your project or use shared Runners') .row .col-sm-6 = render 'projects/runners/specific_runners' diff --git a/app/views/projects/runners/_runner.html.haml b/app/views/projects/runners/_runner.html.haml index 1a3ba690184..85bd0335b92 100644 --- a/app/views/projects/runners/_runner.html.haml +++ b/app/views/projects/runners/_runner.html.haml @@ -23,7 +23,7 @@ - else = link_to _('Resume'), resume_project_runner_path(@project, runner), method: :post, class: 'btn btn-success btn-sm' - if runner.belongs_to_one_project? - = link_to _('Remove Runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' + = link_to _('Remove runner'), project_runner_path(@project, runner), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' - else - runner_project = @project.runner_projects.find_by(runner_id: runner) # rubocop: disable CodeReuse/ActiveRecord = link_to _('Disable for this project'), project_runner_project_path(@project, runner_project), data: { confirm: _("Are you sure?") }, method: :delete, class: 'btn btn-danger btn-sm' diff --git a/app/views/projects/runners/_shared_runners.html.haml b/app/views/projects/runners/_shared_runners.html.haml index 4093f0a0719..fd8b4eb0d39 100644 --- a/app/views/projects/runners/_shared_runners.html.haml +++ b/app/views/projects/runners/_shared_runners.html.haml @@ -2,7 +2,8 @@ = render layout: 'shared/runners/shared_runners_description' do - if !isVueifySharedRunnersToggleEnabled - %hr + %br + %br - if @project.group&.shared_runners_setting == 'disabled_and_unoverridable' %h5.gl-text-red-500 = _('Shared runners disabled on group level') @@ -19,8 +20,8 @@ #toggle-shared-runners-form{ data: toggle_shared_runners_settings_data(@project) } - if @shared_runners_count == 0 - = _('This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area.') + = _('This GitLab instance does not provide any shared runners yet. Instance administrators can register shared runners in the admin area.') - else - %h4.underlined-title #{_('Available shared Runners:')} #{@shared_runners_count} + %h4.underlined-title #{_('Available shared runners:')} #{@shared_runners_count} %ul.bordered-list.available-shared-runners = render partial: 'projects/runners/runner', collection: @shared_runners, as: :runner diff --git a/app/views/projects/runners/_specific_runners.html.haml b/app/views/projects/runners/_specific_runners.html.haml index ed9e6aac346..3e325b80efd 100644 --- a/app/views/projects/runners/_specific_runners.html.haml +++ b/app/views/projects/runners/_specific_runners.html.haml @@ -1,7 +1,9 @@ -%h3 - = _('Specific Runners') +%h4 + = _('Specific runners') .bs-callout.help-callout + = _('These runners are specific to this project.') + %hr = render partial: 'ci/runner/how_to_setup_runner_automatically', locals: { type: 'specific', clusters_path: project_clusters_path(@project) } @@ -11,14 +13,16 @@ type: 'specific', reset_token_url: reset_registration_token_namespace_project_settings_ci_cd_path } +%hr + - if @project_runners.any? - %h4.underlined-title= _('Runners activated for this project') + %h4.underlined-title= _('Available specific runners') %ul.bordered-list.activated-specific-runners = render partial: 'projects/runners/runner', collection: @project_runners, as: :runner = paginate @project_runners, theme: "gitlab", param_name: "project_page", params: { expand_runners: true, anchor: 'js-runners-settings' } - if @assignable_runners.any? - %h4.underlined-title= _('Available specific runners') + %h4.underlined-title= _('Other available runners') %ul.bordered-list.available-specific-runners = render partial: 'projects/runners/runner', collection: @assignable_runners, as: :runner = paginate @assignable_runners, theme: "gitlab", param_name: "specific_page", :params => { :anchor => 'js-runners-settings'} diff --git a/app/views/projects/runners/edit.html.haml b/app/views/projects/runners/edit.html.haml index b9d8e154913..f93cd23c83e 100644 --- a/app/views/projects/runners/edit.html.haml +++ b/app/views/projects/runners/edit.html.haml @@ -1,4 +1,4 @@ -- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('Runners') +- page_title _('Edit'), "#{@runner.description} ##{@runner.id}", _('runners') %h4 Runner ##{@runner.id} diff --git a/app/views/projects/services/_form.html.haml b/app/views/projects/services/_form.html.haml index 2b1e08f4880..59b3afa476f 100644 --- a/app/views/projects/services/_form.html.haml +++ b/app/views/projects/services/_form.html.haml @@ -5,10 +5,8 @@ .col-lg-4 %h3.page-title.gl-mt-0 = @service.title - - [true, false].each do |value| - - hide_class = 'd-none' if @service.operating? != value - %span.js-service-active-status{ class: hide_class, data: { value: value.to_s } } - = boolean_to_icon value + - if @service.operating? + = sprite_icon('check', css_class: 'gl-text-green-500') - if @service.respond_to?(:detailed_description) %p= @service.detailed_description diff --git a/app/views/projects/services/alerts/_help.html.haml b/app/views/projects/services/alerts/_help.html.haml deleted file mode 100644 index 7abd198bea5..00000000000 --- a/app/views/projects/services/alerts/_help.html.haml +++ /dev/null @@ -1 +0,0 @@ -.js-alerts-service-settings{ data: alerts_settings_data(disabled: true) } diff --git a/app/views/projects/services/alerts/_top.html.haml b/app/views/projects/services/alerts/_top.html.haml deleted file mode 100644 index e3bcb6bd3a0..00000000000 --- a/app/views/projects/services/alerts/_top.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -.row - .col-lg-12 - .gl-alert.gl-alert-info{ role: 'alert' } - = sprite_icon('information-o', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - .gl-alert-body - = _('You can now manage alert endpoint configuration in the Alerts section on the Operations settings page. Fields on this page have been deprecated.') - .gl-alert-actions - = link_to _('Visit settings page'), project_settings_operations_path(@project, anchor: 'js-alert-management-settings'), class: 'btn gl-alert-action btn-info new-gl-button' diff --git a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml index 453deff7756..2e4542a033e 100644 --- a/app/views/projects/settings/ci_cd/_autodevops_form.html.haml +++ b/app/views/projects/settings/ci_cd/_autodevops_form.html.haml @@ -25,15 +25,15 @@ - if auto_devops_enabled %span.badge.badge-info.js-instance-default-badge= badge_for_auto_devops_scope(@project) .form-text.text-muted - = s_('CICD|The Auto DevOps pipeline will run if no alternative CI configuration file is found.') - = link_to _('More information'), help_page_path('topics/autodevops/index.md'), target: '_blank' + = s_('CICD|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' .card-footer.js-extra-settings{ class: auto_devops_enabled || 'hidden' } - if @project.all_clusters.empty? %p.settings-message.text-center - = s_('CICD|Add a %{kubernetes_cluster_link_start}Kubernetes cluster integration%{link_end} with a domain or create an AUTO_DEVOPS_PLATFORM_TARGET CI variable.').html_safe % { kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } + = s_('CICD|Add a %{kubernetes_cluster_link_start}Kubernetes cluster integration%{link_end} with a domain, or create an AUTO_DEVOPS_PLATFORM_TARGET CI variable.').html_safe % { kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } - elsif !has_base_domain %p.settings-message.text-center - = s_('CICD|You must add a %{base_domain_link_start}base domain%{link_end} to your %{kubernetes_cluster_link_start}Kubernetes cluster%{link_end} in order for your deployment strategy to work.').html_safe % { base_domain_link_start: base_domain_link_start, kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } + = s_('CICD|Add a %{base_domain_link_start}base domain%{link_end} to your %{kubernetes_cluster_link_start}Kubernetes cluster%{link_end} for your deployment strategy to work.').html_safe % { base_domain_link_start: base_domain_link_start, kubernetes_cluster_link_start: kubernetes_cluster_link_start, link_end: link_end } %label.gl-mt-3 %strong= s_('CICD|Deployment strategy') .form-check diff --git a/app/views/projects/settings/ci_cd/show.html.haml b/app/views/projects/settings/ci_cd/show.html.haml index 0bef82ee325..55b6cf372fb 100644 --- a/app/views/projects/settings/ci_cd/show.html.haml +++ b/app/views/projects/settings/ci_cd/show.html.haml @@ -27,7 +27,7 @@ - quickstart_url = help_page_path('topics/autodevops/quick_start_guide') - auto_devops_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: auto_devops_url } - quickstart_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: quickstart_url } - = s_('AutoDevOps|Auto DevOps can automatically build, test, and deploy applications based on predefined continuous integration and delivery configuration. %{auto_devops_start}Learn more about Auto DevOps%{auto_devops_end} or use our %{quickstart_start}quick start guide%{quickstart_end} to get started right away.').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe, quickstart_start: quickstart_start, quickstart_end: '</a>'.html_safe } + = s_('AutoDevOps|%{auto_devops_start}Automate building, testing, and deploying%{auto_devops_end} your applications based on your continuous integration and delivery configuration. %{quickstart_start}How do I get started?%{quickstart_end}').html_safe % { auto_devops_start: auto_devops_start, auto_devops_end: '</a>'.html_safe, quickstart_start: quickstart_start, quickstart_end: '</a>'.html_safe } .settings-content = render 'autodevops_form', auto_devops_enabled: @project.auto_devops_enabled? @@ -40,11 +40,22 @@ %button.btn.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p - = _("Runners are processes that pick up and execute jobs for GitLab. Here you can register and see your Runners for this project.") - = link_to s_('More information'), help_page_path('ci/runners/README') + = _("Runners are processes that pick up and execute CI/CD jobs for GitLab.") + = link_to s_('How do I configure runners?'), help_page_path('ci/runners/README') .settings-content = render 'projects/runners/index' +%section.settings.no-animate#js-artifacts-settings{ class: ('expanded' if expanded) } + .settings-header + %h4 + = _("Artifacts") + %button.btn.js-settings-toggle{ type: 'button' } + = expanded ? _('Collapse') : _('Expand') + %p + = _("A job artifact is an archive of files and directories saved by a job when it finishes.") + .settings-content + #js-artifacts-settings-app{ data: { full_path: @project.full_path, help_page_path: help_page_path('ci/pipelines/job_artifacts', anchor: 'keep-artifacts-from-most-recent-successful-jobs') } } + %section.qa-variables-settings.settings.no-animate#js-cicd-variables-settings{ class: ('expanded' if expanded), data: { qa_selector: 'variables_settings_content' } } .settings-header = render 'ci/variables/header', expanded: expanded @@ -71,7 +82,7 @@ = expanded ? _('Collapse') : _('Expand') %p = _("Save space and find images in the Container Registry. Remove unneeded tags and keep only the ones you want.") - = link_to _('More information'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy', target: '_blank', rel: 'noopener noreferrer') + = link_to _('How does cleanup work?'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy', target: '_blank', rel: 'noopener noreferrer') .settings-content = render 'projects/registry/settings/index' diff --git a/app/views/projects/settings/operations/_alert_management.html.haml b/app/views/projects/settings/operations/_alert_management.html.haml index 9e76ad52ecb..46f45df00df 100644 --- a/app/views/projects/settings/operations/_alert_management.html.haml +++ b/app/views/projects/settings/operations/_alert_management.html.haml @@ -1,6 +1,7 @@ - return unless can?(current_user, :admin_operations, @project) - expanded = expanded_by_default? - add_page_specific_style 'page_bundles/alert_management_settings' +- add_page_specific_style 'page_bundles/incident_management_list' %section.settings.no-animate#js-alert-management-settings{ class: ('expanded' if expanded) } .settings-header diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 5b9f868a71a..40faf91eadf 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -1,3 +1,5 @@ +- current_route_path = request.fullpath.match(/-\/tree\/[^\/]+\/(.+$)/).to_a[1] +- add_page_startup_graphql_call('repository/path_last_commit', { projectPath: @project.full_path, ref: current_ref, path: current_route_path || "" }) - @content_class = "limit-container-width" unless fluid_layout - @skip_current_level_breadcrumb = true diff --git a/app/views/projects/snippets/verify.html.haml b/app/views/projects/snippets/verify.html.haml deleted file mode 100644 index 3c4f08e1df7..00000000000 --- a/app/views/projects/snippets/verify.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -= render 'layouts/recaptcha_verification', spammable: @snippet - diff --git a/app/views/projects/tracings/_tracing_button.html.haml b/app/views/projects/tracings/_tracing_button.html.haml index c9a6afd3761..b0ab6fa21e1 100644 --- a/app/views/projects/tracings/_tracing_button.html.haml +++ b/app/views/projects/tracings/_tracing_button.html.haml @@ -1,2 +1,2 @@ -= link_to project_settings_operations_path(@project), title: _('Configure Tracing'), class: 'btn btn-success' do += link_to project_settings_operations_path(@project), title: _('Configure Tracing'), class: 'gl-button btn btn-success' do = _('Add Jaeger URL') diff --git a/app/views/shared/_recaptcha_form.html.haml b/app/views/shared/_recaptcha_form.html.haml index 245a86721eb..aa9e9a34c90 100644 --- a/app/views/shared/_recaptcha_form.html.haml +++ b/app/views/shared/_recaptcha_form.html.haml @@ -9,8 +9,11 @@ - params[resource_name].each do |field, value| = hidden_field(resource_name, field, value: value) = hidden_field_tag(:spam_log_id, spammable.spam_log.id) - = hidden_field_tag(:recaptcha_verification, true) + -# The reCAPTCHA response value will be returned in the 'g-recaptcha-response' field = recaptcha_tags script: script, callback: 'recaptchaDialogCallback' unless Rails.env.test? + -# Fake the 'g-recaptcha-response' field in the test environment, so that the feature spec + -# can get to the (mocked) SpamVerdictService check. + = hidden_field_tag('g-recaptcha-response', 'abc123') if Rails.env.test? -# Yields a block with given extra params. = yield diff --git a/app/views/shared/_search_settings.html.haml b/app/views/shared/_search_settings.html.haml new file mode 100644 index 00000000000..ea3d7b97327 --- /dev/null +++ b/app/views/shared/_search_settings.html.haml @@ -0,0 +1,2 @@ +- if Feature.enabled?(:search_settings_in_page, @project, default_enabled: false) + .js-search-settings-app diff --git a/app/views/shared/_zen.html.haml b/app/views/shared/_zen.html.haml index 9cf189e8120..5a4efe7fe7f 100644 --- a/app/views/shared/_zen.html.haml +++ b/app/views/shared/_zen.html.haml @@ -3,6 +3,7 @@ - supports_autocomplete = local_assigns.fetch(:supports_autocomplete, true) - supports_quick_actions = local_assigns.fetch(:supports_quick_actions, false) - qa_selector = local_assigns.fetch(:qa_selector, '') +- autofocus = local_assigns.fetch(:autofocus, false) .zen-backdrop - classes << ' js-gfm-input js-autosize markdown-area' - if defined?(f) && f @@ -12,7 +13,8 @@ dir: 'auto', data: { supports_quick_actions: supports_quick_actions, supports_autocomplete: supports_autocomplete, - qa_selector: qa_selector } + qa_selector: qa_selector, + autofocus: autofocus } - else = text_area_tag attr, current_text, data: { qa_selector: qa_selector }, class: classes, placeholder: placeholder %a.zen-control.zen-control-leave.js-zen-leave.gl-text-gray-500{ href: "#" } diff --git a/app/views/shared/deploy_tokens/_index.html.haml b/app/views/shared/deploy_tokens/_index.html.haml index 540b9b0054f..c26400690a6 100644 --- a/app/views/shared/deploy_tokens/_index.html.haml +++ b/app/views/shared/deploy_tokens/_index.html.haml @@ -3,7 +3,7 @@ %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.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } + %button.gl-button.btn.js-settings-toggle.qa-expand-deploy-keys{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p = description diff --git a/app/views/shared/deploy_tokens/_revoke_modal.html.haml b/app/views/shared/deploy_tokens/_revoke_modal.html.haml index 5a3759ef755..2b31c675f74 100644 --- a/app/views/shared/deploy_tokens/_revoke_modal.html.haml +++ b/app/views/shared/deploy_tokens/_revoke_modal.html.haml @@ -10,6 +10,6 @@ %p = s_('DeployTokens|You are about to revoke %{b_start}%{name}%{b_end}.').html_safe % { b_start: '<b>'.html_safe, name: token.name, b_end: '</b>'.html_safe } = s_('DeployTokens|This action cannot be undone.') - .modal-footer - %a{ href: '#', data: { dismiss: 'modal' }, class: 'btn btn-default' }= _('Cancel') - = link_to s_('DeployTokens|Revoke %{name}') % { name: token.name }, revoke_deploy_token_path(group_or_project, token), method: :put, class: 'btn btn-danger' + .modal-footer.gl-flex-direction-row + %a{ href: '#', data: { dismiss: 'modal' }, class: 'gl-button btn btn-default' }= _('Cancel') + = link_to s_('DeployTokens|Revoke %{name}') % { name: token.name }, revoke_deploy_token_path(group_or_project, token), method: :put, class: 'gl-button btn btn-danger text-truncate' diff --git a/app/views/shared/empty_states/_snippets.html.haml b/app/views/shared/empty_states/_snippets.html.haml index db8da50d868..aa762782c46 100644 --- a/app/views/shared/empty_states/_snippets.html.haml +++ b/app/views/shared/empty_states/_snippets.html.haml @@ -1,6 +1,6 @@ - button_path = local_assigns.fetch(:button_path, false) -.row.empty-state.mt-0 +.row.empty-state .col-12 .svg-content = image_tag 'illustrations/snippets_empty.svg', data: { qa_selector: 'svg_content' } @@ -16,5 +16,3 @@ = link_to s_('SnippetsEmptyState|Documentation'), help_page_path('user/snippets.md'), class: 'btn 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 656acafd416..4150406a4ea 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 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-success 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 @@ -14,11 +14,11 @@ - if show_enable_confluence_integration?(@wiki.container) = link_to s_('WikiEmpty|Enable the Confluence Wiki integration'), edit_project_service_path(@project, :confluence), - class: 'btn', title: s_('WikiEmpty|Enable the Confluence Wiki integration') + class: 'btn gl-button', title: s_('WikiEmpty|Enable the Confluence Wiki integration') - 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 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-success', 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/integrations/_index.html.haml b/app/views/shared/integrations/_index.html.haml index edc85f04d91..ccc2c448f69 100644 --- a/app/views/shared/integrations/_index.html.haml +++ b/app/views/shared/integrations/_index.html.haml @@ -16,7 +16,8 @@ - activated_label = (integration.activated? ? s_("ProjectService|%{service_title}: status on") : s_("ProjectService|%{service_title}: status off")) % { service_title: integration.title } %tr{ role: 'row' } %td{ role: 'cell', 'aria-colindex': 1, 'aria-label': activated_label, title: activated_label } - = boolean_to_icon integration.operating? + - if integration.operating? + = sprite_icon('check', css_class: 'gl-text-green-500') %td{ role: 'cell', 'aria-colindex': 2 } = link_to integration.title, scoped_edit_integration_path(integration), class: 'gl-font-weight-bold', data: { qa_selector: "#{integration.to_param}_link" } %td.d-none.d-sm-table-cell{ role: 'cell', 'aria-colindex': 3 } diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index cd265c10451..911bef482dd 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -2,6 +2,7 @@ This should be removed when this sidebar is converted to Vue since assignee data is also available in the `issuable_sidebar` hash - issuable_type = issuable_sidebar[:type] +- show_forwarding_email = !issuable_sidebar[:create_note_email].nil? - signed_in = !!issuable_sidebar.dig(:current_user, :id) - can_edit_issuable = issuable_sidebar.dig(:current_user, :can_edit) - add_page_startup_api_call "#{issuable_sidebar[:issuable_json_path]}?serializer=sidebar_extras" @@ -57,7 +58,7 @@ .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? + - if @project.group.present? && issuable_sidebar[:supports_iterations] = render_if_exists 'shared/issuable/iteration_select', can_edit: can_edit_issuable, 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] @@ -65,7 +66,7 @@ // Fallback while content is loading .title.hide-collapsed = _('Time tracking') - = loading_icon + = loading_icon(css_class: 'gl-vertical-align-text-bottom') - if issuable_sidebar.has_key?(:due_date) .block.due_date .sidebar-collapsed-icon.has-tooltip{ data: { placement: 'left', container: 'body', html: 'true', boundary: 'viewport' }, title: sidebar_due_date_tooltip_label(issuable_sidebar[:due_date]) } @@ -145,12 +146,15 @@ = _('Source branch: %{source_branch_open}%{source_branch}%{source_branch_close}').html_safe % { source_branch_open: "<cite class='ref-name' title='#{source_branch}'>".html_safe, source_branch_close: "</cite>".html_safe, source_branch: source_branch } = clipboard_button(text: source_branch, title: _('Copy branch name'), placement: "left", boundary: 'viewport') + - if show_forwarding_email + .block + #issuable-copy-email - if issuable_sidebar.dig(:current_user, :can_move) .block.js-sidebar-move-issue-block .sidebar-collapsed-icon{ data: { toggle: 'tooltip', placement: 'left', container: 'body', boundary: 'viewport' }, title: _('Move issue') } = custom_icon('icon_arrow_right') .dropdown.sidebar-move-issue-dropdown.hide-collapsed - %button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button', + %button.gl-button.btn.btn-default.btn-block.js-sidebar-dropdown-toggle.js-move-issue{ type: 'button', data: { toggle: 'dropdown', display: 'static', track_label: "right_sidebar", track_property: "move_issue", track_event: "click_button", track_value: "" } } = _('Move issue') .dropdown-menu.dropdown-menu-selectable.dropdown-extended-height @@ -159,7 +163,7 @@ = dropdown_content = dropdown_loading = dropdown_footer add_content_class: true do - %button.btn.btn-success.sidebar-move-issue-confirmation-button.js-move-issue-confirmation-button{ type: 'button', disabled: true } + %button.gl-button.btn.btn-success.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/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index a425f5f810e..70e931ac164 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -6,6 +6,17 @@ - source_title, target_title = format_mr_branch_names(@merge_request) +- vis010 = _('This merge request is from a private project to an internal project.') +- vis020 = _('This merge request is from a private project to a public project.') +- vis1020 = _('This merge request is from an internal project to a public project.') +- i18n = { '010' => vis010, '020' => vis020, '1020' => vis1020 } + +- source_level = @merge_request.source_project.visibility_level +- source_visibility = @merge_request.source_project.visibility +- target_level = @merge_request.target_project.visibility_level + +- visibilityMismatchString = i18n["#{source_level}#{target_level}"] + .form-group.row.d-flex.gl-px-5.branch-selector .align-self-center %span @@ -24,4 +35,12 @@ = form.hidden_field(:target_branch, { class: 'target_branch js-target-branch-select ref-name mw-xl', data: { placeholder: _('Select branch'), endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) + +- if source_level < target_level + .gl-alert.gl-alert-warning.gl-mt-4 + = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + = visibilityMismatchString + %br + = _('Review the target project before submitting to avoid exposing %{source} changes.') % { source: source_visibility } %hr diff --git a/app/views/shared/members/_badge.html.haml b/app/views/shared/members/_badge.html.haml index e304207f3e9..5f925ff0cad 100644 --- a/app/views/shared/members/_badge.html.haml +++ b/app/views/shared/members/_badge.html.haml @@ -1,4 +1,4 @@ - type ||= 'info' %span.px-1.py-1 - %span{ class: "badge badge-#{type}" }= yield + %span{ class: "badge badge-pill gl-badge sm badge-#{type}" }= yield diff --git a/app/views/shared/members/_invite_member.html.haml b/app/views/shared/members/_invite_member.html.haml index 59b0600e2dd..0302b2fc3cf 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: "btn btn-success", data: { qa_selector: 'invite_member_button' } + = submit_tag _("Invite"), class: "gl-button btn btn-success", data: { qa_selector: 'invite_member_button' } - if can_import_members - = link_to _("Import"), import_path, class: "btn btn-default", title: _("Import members from another project") + = 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 79bbb74d601..c76051a25b2 100644 --- a/app/views/shared/members/_member.html.haml +++ b/app/views/shared/members/_member.html.haml @@ -127,8 +127,5 @@ = _("Delete") - unless force_mobile_view = sprite_icon('remove', css_class: 'd-none d-sm-block gl-icon') - = render_if_exists 'shared/members/ee/override_member_buttons', group: group, member: member, user: user, action: :edit, can_override: member.can_override? - else %span.member-access-text.user-access-role= member.human_access - -= render_if_exists 'shared/members/ee/override_member_buttons', group: group, member: member, user: user, action: :confirm, can_override: member.can_override? diff --git a/app/views/groups/group_members/tab_pane/_form_item.html.haml b/app/views/shared/members/tab_pane/_form_item.html.haml index 9e57d3329d7..9e57d3329d7 100644 --- a/app/views/groups/group_members/tab_pane/_form_item.html.haml +++ b/app/views/shared/members/tab_pane/_form_item.html.haml diff --git a/app/views/groups/group_members/tab_pane/_header.html.haml b/app/views/shared/members/tab_pane/_header.html.haml index a02bf90eddf..a02bf90eddf 100644 --- a/app/views/groups/group_members/tab_pane/_header.html.haml +++ b/app/views/shared/members/tab_pane/_header.html.haml diff --git a/app/views/groups/group_members/tab_pane/_title.html.haml b/app/views/shared/members/tab_pane/_title.html.haml index c1418a5f7c8..c1418a5f7c8 100644 --- a/app/views/groups/group_members/tab_pane/_title.html.haml +++ b/app/views/shared/members/tab_pane/_title.html.haml diff --git a/app/views/shared/milestones/_header.html.haml b/app/views/shared/milestones/_header.html.haml index 19ca00ce482..541d7a52385 100644 --- a/app/views/shared/milestones/_header.html.haml +++ b/app/views/shared/milestones/_header.html.haml @@ -14,12 +14,9 @@ = link_to _('Edit'), edit_milestone_path(milestone), class: 'btn gl-button btn-grouped' - if milestone.project_milestone? && milestone.project.group - %button.js-promote-project-milestone-button.btn.gl-button.btn-grouped{ data: { toggle: 'modal', - target: '#promote-milestone-modal', - milestone_title: milestone.title, + %button.js-promote-project-milestone-button.btn.gl-button.btn-grouped{ data: { milestone_title: milestone.title, group_name: milestone.project.group.name, - url: promote_project_milestone_path(milestone.project, milestone), - container: 'body' }, + url: promote_project_milestone_path(milestone.project, milestone)}, disabled: true, type: 'button' } = _('Promote') diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml index 92ac6929e6a..48a97ed66bb 100644 --- a/app/views/shared/milestones/_milestone.html.haml +++ b/app/views/shared/milestones/_milestone.html.haml @@ -51,10 +51,7 @@ type: 'button', data: { url: promote_project_milestone_path(milestone.project, milestone), milestone_title: milestone.title, - group_name: @project.group.name, - target: '#promote-milestone-modal', - container: 'body', - toggle: 'modal' } } + group_name: @project.group.name } } = sprite_icon('level-up', size: 14) - if can?(current_user, :admin_milestone, milestone) diff --git a/app/views/shared/promotions/_promote_servicedesk.html.haml b/app/views/shared/promotions/_promote_servicedesk.html.haml index 237416a869b..3a5123acdeb 100644 --- a/app/views/shared/promotions/_promote_servicedesk.html.haml +++ b/app/views/shared/promotions/_promote_servicedesk.html.haml @@ -6,8 +6,6 @@ = custom_icon('icon_service_desk') .user-callout-copy %h4 - = _("Improve customer support with GitLab Service Desk.") + = _("Improve customer support with Service Desk") %p - = _("GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either through the GitLab interface or by email. End users will only see the thread through email.") - = link_to _('Read more'), help_page_path('user/project/service_desk.md'), target: '_blank' - + = _("Service Desk allows people to create issues in your GitLab instance without their own user account. It provides a unique email address for end users to create issues in a project. Replies can be sent either through the GitLab interface or by email. End users only see threads through email.") diff --git a/app/views/shared/runners/_form.html.haml b/app/views/shared/runners/_form.html.haml index 675a8f922c4..bb2aa93740e 100644 --- a/app/views/shared/runners/_form.html.haml +++ b/app/views/shared/runners/_form.html.haml @@ -5,7 +5,7 @@ .col-sm-10 .form-check = f.check_box :active, { class: 'form-check-input' } - %label.light{ for: :runner_active }= _("Paused Runners don't accept new jobs") + %label.light{ for: :runner_active }= _("Paused runners don't accept new jobs") .form-group.row = label :protected, _("Protected"), class: 'col-form-label col-sm-2' .col-sm-10 @@ -40,13 +40,13 @@ = _('Maximum job timeout') .col-sm-10 = f.text_field :maximum_timeout_human_readable, class: 'form-control' - .form-text.text-muted= _('This timeout will take precedence when lower than project-defined timeout and accepts a human readable time input language like "1 hour". Values without specification represent seconds.') + .form-text.text-muted= _('Enter the number of seconds, or other human-readable input, like "1 hour". This timeout takes precedence over lower timeouts set for the project.') .form-group.row = label_tag :tag_list, class: 'col-form-label col-sm-2' do = _('Tags') .col-sm-10 = f.text_field :tag_list, value: runner.tag_list.sort.join(', '), class: 'form-control' - .form-text.text-muted= _('You can set up jobs to only use Runners with specific tags. Separate tags with commas.') + .form-text.text-muted= _('You can set up jobs to only use runners with specific tags. Separate tags with commas.') - if local_assigns[:in_gitlab_com_admin_context] .form-group.row = label_tag :public_projects_minutes_cost_factor, class: 'col-form-label col-sm-2' do diff --git a/app/views/shared/runners/_runner_description.html.haml b/app/views/shared/runners/_runner_description.html.haml index d3e50cfe92f..6a65145d42b 100644 --- a/app/views/shared/runners/_runner_description.html.haml +++ b/app/views/shared/runners/_runner_description.html.haml @@ -1,16 +1,12 @@ .light.gl-mt-3 %p - = _("You can set up as many Runners as you need to run your jobs.") - %br - = _('Runners can be placed on separate users, servers, and even on your local machine.') + = _("Register as many runners as you want. You can register runners as separate users, on separate servers, and on your local machine. Runners are either:") - %p - = _('Each Runner can be in one of the following states:') %div %ul %li - %span.badge.badge-success active - = _('- Runner is active and can process any new jobs') + %span.badge.badge-pill.gl-badge.sm.badge-success active + = _('- Available to run jobs.') %li - %span.badge.badge-danger paused - = _('- Runner is paused and will not receive any new jobs') + %span.badge.badge-pill.gl-badge.sm.badge-danger paused + = _('- Not available to run jobs.') diff --git a/app/views/shared/runners/_shared_runners_description.html.haml b/app/views/shared/runners/_shared_runners_description.html.haml index b9fb518b1aa..92564ec48bd 100644 --- a/app/views/shared/runners/_shared_runners_description.html.haml +++ b/app/views/shared/runners/_shared_runners_description.html.haml @@ -1,9 +1,11 @@ - link = link_to _('MaxBuilds'), 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank' -%h3 +%h4 = _('Shared runners') .bs-callout.shared-runners-description + = _('These runners are shared across this GitLab instance.') + %p - if Gitlab::CurrentSettings.shared_runners_text.present? = markdown_field(Gitlab::CurrentSettings.current_application_settings, :shared_runners_text) - else diff --git a/app/views/shared/web_hooks/_hook.html.haml b/app/views/shared/web_hooks/_hook.html.haml index a957f9f6dfa..13fe8f76bd3 100644 --- a/app/views/shared/web_hooks/_hook.html.haml +++ b/app/views/shared/web_hooks/_hook.html.haml @@ -5,8 +5,8 @@ %div - hook.class.triggers.each_value do |trigger| - if hook.public_send(trigger) - %span.badge.badge-gray.deploy-project-label= trigger.to_s.titleize - %span.badge.badge-gray + %span.gl-badge.gl-bg-gray-10.gl-mt-2.rounded.deploy-project-label= trigger.to_s.titleize + %span.gl-badge.gl-bg-gray-10.gl-mt-2.rounded = _('SSL Verification:') = hook.enable_ssl_verification ? _('enabled') : _('disabled') diff --git a/app/views/shared/wikis/_form.html.haml b/app/views/shared/wikis/_form.html.haml index b6504c7a17e..5fd22665633 100644 --- a/app/views/shared/wikis/_form.html.haml +++ b/app/views/shared/wikis/_form.html.haml @@ -42,7 +42,7 @@ .col-sm-2.col-form-label= f.label :content, class: 'control-label-full-width' .col-sm-10 = render layout: 'shared/md_preview', locals: { url: wiki_page_path(@wiki, @page, action: :preview_markdown) } do - = render 'shared/zen', f: f, attr: :content, classes: 'note-textarea qa-wiki-content-textarea', placeholder: s_("WikiPage|Write your content or drag files here…") + = render 'shared/zen', f: f, attr: :content, classes: 'note-textarea qa-wiki-content-textarea', placeholder: s_("WikiPage|Write your content or drag files here…"), autofocus: @page.persisted? = render 'shared/notes/hints' .clearfix @@ -70,10 +70,10 @@ .form-actions - if @page && @page.persisted? - = f.submit _("Save changes"), class: 'btn-success btn qa-save-changes-button' + = f.submit _("Save changes"), class: 'btn gl-button btn-success 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-grouped' + = 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 btn qa-create-page-button rspec-create-page-button' + = 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' .float-right - = link_to _("Cancel"), wiki_path(@wiki), class: 'btn gl-button btn-cancel' + = link_to _("Cancel"), wiki_path(@wiki), class: 'btn gl-button btn-cancel btn-default' diff --git a/app/views/shared/wikis/_sidebar.html.haml b/app/views/shared/wikis/_sidebar.html.haml index a906bf7aa63..4e9fdc8b95a 100644 --- a/app/views/shared/wikis/_sidebar.html.haml +++ b/app/views/shared/wikis/_sidebar.html.haml @@ -1,13 +1,23 @@ +- editing ||= false + %aside.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar{ data: { "offset-top" => "50", "spy" => "affix" } } .sidebar-container .block.wiki-sidebar-header.gl-mb-3.w-100 %a.gutter-toggle.float-right.d-block.d-md-none.js-sidebar-wiki-toggle{ href: "#" } = sprite_icon('chevron-double-lg-right', css_class: 'gl-icon') - - git_access_url = wiki_path(@wiki, action: :git_access) - = link_to git_access_url, class: active_nav_link?(path: 'wikis#git_access') ? 'active' : '', data: { qa_selector: 'clone_repository_link' } do - = sprite_icon('download', css_class: 'gl-mr-2') - %span= _("Clone repository") + .gl-display-flex.gl-flex-wrap + - git_access_url = wiki_path(@wiki, action: :git_access) + = link_to git_access_url, class: 'gl-mr-5' + (active_nav_link?(path: 'wikis#git_access') ? ' active' : ''), data: { qa_selector: 'clone_repository_link' } do + = sprite_icon('download', css_class: 'gl-mr-2') + %span= _("Clone repository") + + - if can?(current_user, :create_wiki, @wiki) + - edit_sidebar_url = wiki_page_path(@wiki, Wiki::SIDEBAR, action: :edit) + - link_class = (editing && @page&.slug == Wiki::SIDEBAR) ? 'active' : '' + = link_to edit_sidebar_url, class: link_class, data: { qa_selector: 'edit_sidebar_link' } do + = sprite_icon('pencil-square', css_class: 'gl-mr-2') + %span= _("Edit sidebar") - if @sidebar_error.present? = render 'shared/alert_info', body: s_('Wiki|The sidebar failed to load. You can reload the page to try again.') diff --git a/app/views/shared/wikis/diff.html.haml b/app/views/shared/wikis/diff.html.haml index 68bbbd66f4a..19167f04855 100644 --- a/app/views/shared/wikis/diff.html.haml +++ b/app/views/shared/wikis/diff.html.haml @@ -5,12 +5,11 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - .nav-text - %h2.wiki-page-title - = link_to_wiki_page @page - %span.light - · - = _('Changes') + %h3.page-title.gl-flex-fill-1 + = link_to_wiki_page @page + %span.light + · + = _('Changes') .nav-controls.pb-md-3.pb-lg-0 = link_to wiki_page_path(@wiki, @page, action: :history), class: 'btn gl-button', role: 'button', data: { qa_selector: 'page_history_button' } do diff --git a/app/views/shared/wikis/edit.html.haml b/app/views/shared/wikis/edit.html.haml index 834749caaba..c2b0e474c03 100644 --- a/app/views/shared/wikis/edit.html.haml +++ b/app/views/shared/wikis/edit.html.haml @@ -6,15 +6,14 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - .nav-text - %h2.wiki-page-title - - if @page.persisted? - = link_to_wiki_page @page - %span.light - · - = s_("Wiki|Edit Page") - - else - = s_("Wiki|Create New Page") + %h3.page-title.gl-flex-fill-1 + - if @page.persisted? + = link_to_wiki_page @page + %span.light + · + = s_("Wiki|Edit Page") + - else + = s_("Wiki|Create New Page") .nav-controls.pb-md-3.pb-lg-0 - if @page.persisted? @@ -23,4 +22,4 @@ = render 'shared/wikis/form', uploads_path: wiki_attachment_upload_url -= render 'shared/wikis/sidebar' += render 'shared/wikis/sidebar', editing: true diff --git a/app/views/shared/wikis/history.html.haml b/app/views/shared/wikis/history.html.haml index 50ccfdeabd5..b1dcd2cd400 100644 --- a/app/views/shared/wikis/history.html.haml +++ b/app/views/shared/wikis/history.html.haml @@ -4,12 +4,11 @@ .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row = wiki_sidebar_toggle_button - .nav-text - %h2.wiki-page-title - = link_to_wiki_page @page - %span.light - · - = _('History') + %h3.page-title + = link_to_wiki_page @page + %span.light + · + = _('History') .prepend-top-default.gl-mb-3 .table-holder diff --git a/app/views/shared/wikis/pages.html.haml b/app/views/shared/wikis/pages.html.haml index 76fc9510740..f5ba1c83de4 100644 --- a/app/views/shared/wikis/pages.html.haml +++ b/app/views/shared/wikis/pages.html.haml @@ -6,9 +6,9 @@ .wiki-page-header.top-area.flex-column.flex-lg-row - .nav-text.flex-fill - %h2.wiki-page-title - = s_("Wiki|Wiki Pages") + + %h3.page-title.gl-flex-fill-1 + = s_("Wiki|Wiki Pages") .nav-controls.pb-md-3.pb-lg-0 = link_to wiki_path(@wiki, action: :git_access), class: 'btn gl-button' do diff --git a/app/views/shared/wikis/show.html.haml b/app/views/shared/wikis/show.html.haml index 6f1c1a3a801..6d14ba8fe7b 100644 --- a/app/views/shared/wikis/show.html.haml +++ b/app/views/shared/wikis/show.html.haml @@ -7,7 +7,7 @@ .nav-text.flex-fill %span.wiki-last-edit-by - if @page.last_version - = (_("Last edited by %{name}") % { name: "<strong>#{@page.last_version.author_name}</strong>" }).html_safe + = html_escape(_("Last edited by %{link_start}%{avatar} %{name}%{link_end}")) % { avatar: image_tag(avatar_icon_for_email(@page.last_version.author_email, 24), class: "avatar s24 float-none gl-mr-0!"), name: "<strong>#{@page.last_version.author_name}</strong>".html_safe, link_start: "<a href='#{@page.last_version.author_url}'>".html_safe, link_end: '</a>'.html_safe } = time_ago_with_tooltip(@page.last_version.authored_date) .nav-controls.pb-md-3.pb-lg-0 diff --git a/app/views/sherlock/transactions/show.html.haml b/app/views/sherlock/transactions/show.html.haml index 8f2b36123bb..162b14f01e1 100644 --- a/app/views/sherlock/transactions/show.html.haml +++ b/app/views/sherlock/transactions/show.html.haml @@ -18,8 +18,8 @@ .row-content-block .float-right - = link_to(sherlock_transactions_path, class: 'btn') do - = sprite_icon('arrow-left') + = link_to(sherlock_transactions_path, class: 'gl-button btn') do + = sprite_icon('arrow-left', css_class: 'gl-mr-3') = t('sherlock.all_transactions') .oneline = t('sherlock.transaction') diff --git a/app/views/snippets/verify.html.haml b/app/views/snippets/verify.html.haml deleted file mode 100644 index 3c4f08e1df7..00000000000 --- a/app/views/snippets/verify.html.haml +++ /dev/null @@ -1,2 +0,0 @@ -= render 'layouts/recaptcha_verification', spammable: @snippet - |