diff options
Diffstat (limited to 'app/views')
154 files changed, 783 insertions, 666 deletions
diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml index ba7d747fa04..58ea2be8b61 100644 --- a/app/views/admin/application_settings/_performance_bar.html.haml +++ b/app/views/admin/application_settings/_performance_bar.html.haml @@ -6,7 +6,7 @@ .form-check = f.check_box :performance_bar_enabled, class: 'form-check-input', data: { qa_selector: 'enable_performance_bar_checkbox'} = f.label :performance_bar_enabled, class: 'form-check-label' do - = _("Allow non-administrators to access to the performance bar") + = _("Allow non-administrators access to the performance bar") .form-group = f.label :performance_bar_allowed_group_path, _('Allow access to members of the following group'), class: 'label-bold' = f.text_field :performance_bar_allowed_group_path, class: 'form-control gl-form-input', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path diff --git a/app/views/admin/application_settings/_protected_paths.html.haml b/app/views/admin/application_settings/_protected_paths.html.haml index 04b42f42014..d273c81f51d 100644 --- a/app/views/admin/application_settings/_protected_paths.html.haml +++ b/app/views/admin/application_settings/_protected_paths.html.haml @@ -2,30 +2,26 @@ = form_errors(@application_setting) %fieldset - - if omnibus_protected_paths_throttle? - .bs-callout.bs-callout-danger - - relative_url_link = 'https://docs.gitlab.com/ee/user/admin_area/settings/protected_paths.html#migrate-settings-from-gitlab-123-and-earlier' - - relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link } - = _("Omnibus Protected Paths throttle is active, and takes priority over these settings. From 12.4, Omnibus throttle is deprecated and will be removed in a future release. Please read the %{relative_url_link_start}Migrating Protected Paths documentation%{relative_url_link_end}.").html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } - .form-group .form-check = f.check_box :throttle_protected_paths_enabled, class: 'form-check-input' = f.label :throttle_protected_paths_enabled, class: 'form-check-label' do - = _('Enable protected paths rate limit') + = _('Enable rate limiting for POST requests to the specified paths') %span.form-text.text-muted - = _('Helps reduce request volume for protected paths') + = _('Helps reduce request volume for protected paths.') .form-group - = f.label :throttle_protected_paths_requests_per_period, 'Max requests per period per user', class: 'label-bold' + = f.label :throttle_protected_paths_requests_per_period, 'Maximum requests per period per user', class: 'label-bold' = f.number_field :throttle_protected_paths_requests_per_period, class: 'form-control gl-form-input' .form-group - = f.label :throttle_protected_paths_period_in_seconds, 'Rate limit period in seconds', class: 'label-bold' + = f.label :throttle_protected_paths_period_in_seconds, 'Rate limit period (in seconds)', class: 'label-bold' = f.number_field :throttle_protected_paths_period_in_seconds, class: 'form-control gl-form-input' .form-group = f.label :protected_paths, class: 'label-bold' do + = _('Paths to protect with rate limiting') + = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 + %span.form-text.text-muted - relative_url_link = 'https://docs.gitlab.com/omnibus/settings/configuration.html#configuring-a-relative-url-for-gitlab' - relative_url_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: relative_url_link } - = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URL%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } - = f.text_area :protected_paths_raw, placeholder: '/users/sign_in,/users/password', class: 'form-control gl-form-input', rows: 10 + = _('All paths are relative to the GitLab URL. Do not include %{relative_url_link_start}relative URLs%{relative_url_link_end}.').html_safe % { relative_url_link_start: relative_url_link_start, relative_url_link_end: '</a>'.html_safe } = f.submit _('Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_sentry.html.haml b/app/views/admin/application_settings/_sentry.html.haml new file mode 100644 index 00000000000..5fd373d59e9 --- /dev/null +++ b/app/views/admin/application_settings/_sentry.html.haml @@ -0,0 +1,22 @@ += form_for @application_setting, url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-sentry-settings'), html: { class: 'fieldset-form', id: 'sentry-settings' } do |f| + = form_errors(@application_setting) + + %span.text-muted + = _('Changing any setting here requires an application restart') + + %fieldset + .form-group + .form-check + = f.check_box :sentry_enabled, class: 'form-check-input' + = f.label :sentry_enabled, _('Enable Sentry error tracking'), class: 'form-check-label' + .form-group + = f.label :sentry_dsn, _('DSN'), class: 'label-light' + = f.text_field :sentry_dsn, class: 'form-control gl-form-input', placeholder: 'https://public@sentry.example.com/1' + .form-group + = f.label :sentry_clientside_dsn, _('Clientside DSN'), class: 'label-light' + = f.text_field :sentry_clientside_dsn, class: 'form-control gl-form-input', placeholder: 'https://public@sentry.example.com/2' + .form-group + = f.label :sentry_environment, _('Environment'), class: 'label-light' + = f.text_field :sentry_environment, class: 'form-control gl-form-input', placeholder: Rails.env + + = f.submit _('Save changes'), class: 'gl-button btn btn-confirm' diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 5bdad50c161..4fba1aee12d 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -15,7 +15,7 @@ .form-group - can_be_configured = @application_setting.usage_ping_can_be_configured? .form-check - = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input' + = f.check_box :usage_ping_enabled, disabled: !can_be_configured, class: 'form-check-input', data: { qa_selector: 'enable_usage_data_checkbox' } = f.label :usage_ping_enabled, class: 'form-check-label' do = _('Enable Service Ping') .form-text.text-muted diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml index b6266c3ea34..e56c898b236 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -1,13 +1,11 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f| += gitlab_ui_form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form', id: 'visibility-settings' } do |f| = form_errors(@application_setting) %fieldset - = render 'shared/default_branch_protection', f: f, selected_level: @application_setting.default_branch_protection + = render 'shared/default_branch_protection', f: f = render_if_exists 'admin/application_settings/group_owners_can_manage_default_branch_protection_setting', form: f - .form-group - = f.label s_('ProjectCreationLevel|Default project creation protection'), class: 'label-bold' - = f.select :default_project_creation, options_for_select(Gitlab::Access.project_creation_options, @application_setting.default_project_creation), {}, class: 'form-control' + = render 'shared/project_creation_levels', f: f, method: :default_project_creation, legend: s_('ProjectCreationLevel|Default project creation protection') = render_if_exists 'admin/application_settings/default_project_deletion_protection_setting', form: f = render_if_exists 'admin/application_settings/default_delayed_project_deletion_setting', form: f = render_if_exists 'admin/application_settings/default_project_deletion_adjourned_period_setting', form: f diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index a72c96bb577..53ba626760b 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -80,7 +80,7 @@ = expanded_by_default? ? _('Collapse') : _('Expand') %p = _('Set the maximum session time for a web terminal.') - = link_to _('How do I use a web terminal?'), help_page_path('ci/environments/index.md', anchor: 'web-terminals'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('How do I use a web terminal?'), help_page_path('ci/environments/index.md', anchor: 'web-terminals-deprecated'), target: '_blank', rel: 'noopener noreferrer' .settings-content = render 'terminal' diff --git a/app/views/admin/application_settings/metrics_and_profiling.html.haml b/app/views/admin/application_settings/metrics_and_profiling.html.haml index 6087551d7c7..7cb5760f62a 100644 --- a/app/views/admin/application_settings/metrics_and_profiling.html.haml +++ b/app/views/admin/application_settings/metrics_and_profiling.html.haml @@ -42,7 +42,7 @@ .js-self-monitoring-settings{ data: self_monitoring_project_data } -%section.settings.as-usage.no-animate#js-usage-settings{ class: ('expanded' if expanded_by_default?) } +%section.settings.as-usage.no-animate#js-usage-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'usage_statistics_settings_content' } } .settings-header#usage-statistics %h4 = _('Usage statistics') @@ -54,3 +54,15 @@ = render 'usage' = render_if_exists 'admin/application_settings/pseudonymizer_settings', expanded: expanded_by_default? + +- if Feature.enabled?(:configure_sentry_in_application_settings, default_enabled: :yaml) + %section.settings.as-sentry.no-animate#js-sentry-settings{ class: ('expanded' if expanded_by_default?), data: { qa_selector: 'sentry_settings_content' } } + .settings-header + %h4 + = _('Sentry') + %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _('Configure Sentry integration for error tracking') + .settings-content + = render 'sentry' diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index 58e3f3f1136..3a053205725 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -87,14 +87,12 @@ %section.settings.as-protected-paths.no-animate#js-protected-paths-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 - = _('Protected Paths') + = _('Protected paths') %button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' } = expanded_by_default? ? _('Collapse') : _('Expand') %p - = _('Configure paths to be protected by Rack Attack.') - .help-block - = _('These paths are protected for POST requests.') - = link_to _('More information'), help_page_path('security/rack_attack', anchor: 'protected-paths-throttle'), target: '_blank' + = _('Rate limit access to specified paths.') + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/protected_paths.md'), target: '_blank', rel: 'noopener noreferrer' .settings-content = render 'protected_paths' diff --git a/app/views/admin/application_settings/reporting.html.haml b/app/views/admin/application_settings/reporting.html.haml index d2e118f0624..ae6243c3b50 100644 --- a/app/views/admin/application_settings/reporting.html.haml +++ b/app/views/admin/application_settings/reporting.html.haml @@ -13,6 +13,9 @@ .settings-content = render 'spam' +-# this partial is from JiHu, see details in https://gitlab.com/gitlab-jh/gitlab/-/merge_requests/135 += render_if_exists 'admin/application_settings/content_validation_section' + %section.settings.as-abuse.no-animate#js-abuse-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml index 8dcd5f81c23..d9c683cbcc3 100644 --- a/app/views/admin/applications/show.html.haml +++ b/app/views/admin/applications/show.html.haml @@ -6,4 +6,5 @@ = render 'shared/doorkeeper/applications/show', edit_path: edit_admin_application_path(@application), delete_path: admin_application_path(@application), + index_path: admin_applications_path, show_trusted_row: true diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 681e7ccb613..4197d5b961f 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -153,9 +153,9 @@ %span.float-right #{Rails::VERSION::STRING} %p - = Gitlab::Database.main.human_adapter_name + = ApplicationRecord.database.human_adapter_name %span.float-right - = Gitlab::Database.main.version + = ApplicationRecord.database.version %p = _('Redis') %span.float-right diff --git a/app/views/admin/dashboard/stats.html.haml b/app/views/admin/dashboard/stats.html.haml index b98d11b734b..e0701812ba3 100644 --- a/app/views/admin/dashboard/stats.html.haml +++ b/app/views/admin/dashboard/stats.html.haml @@ -1,74 +1,75 @@ - page_title s_('AdminArea|Users statistics') -%h3.my-4 +%h3.gl-my-6 = s_('AdminArea|Users statistics') %table.table.gl-text-gray-500 %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Users without a Group and Project') = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' - %td.p-3.text-right - = @users_statistics&.without_groups_and_projects.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.without_groups_and_projects + = render_if_exists 'admin/dashboard/minimal_access_stats_row', users_statistics: @users_statistics %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Users with highest role') %strong = s_('AdminArea|Guest') = render_if_exists 'admin/dashboard/included_free_in_license_tooltip' - %td.p-3.text-right - = @users_statistics&.with_highest_role_guest.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_guest %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Users with highest role') %strong = s_('AdminArea|Reporter') - %td.p-3.text-right - = @users_statistics&.with_highest_role_reporter.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_reporter %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Users with highest role') %strong = s_('AdminArea|Developer') - %td.p-3.text-right - = @users_statistics&.with_highest_role_developer.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_developer %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Users with highest role') %strong = s_('AdminArea|Maintainer') - %td.p-3.text-right - = @users_statistics&.with_highest_role_maintainer.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_maintainer %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Users with highest role') %strong = s_('AdminArea|Owner') - %td.p-3.text-right - = @users_statistics&.with_highest_role_owner.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.with_highest_role_owner %tr - %td.p-3 + %td.gl-p-5! = s_('AdminArea|Bots') - %td.p-3.text-right - = @users_statistics&.bots.to_i + %td.gl-text-right{ class: 'gl-p-5!' } + = @users_statistics&.bots = render_if_exists 'admin/dashboard/billable_users_row' %tr.bg-gray-light.gl-text-gray-900 - %td.p-3 + %td.gl-p-5! %strong = s_('AdminArea|Active users') - %td.p-3.text-right + %td.gl-text-right{ class: 'gl-p-5!' } %strong - = @users_statistics&.active.to_i + = @users_statistics&.active %tr.bg-gray-light.gl-text-gray-900 - %td.p-3 + %td.gl-p-5! %strong = s_('AdminArea|Blocked users') - %td.p-3.text-right + %td.gl-text-right{ class: 'gl-p-5!' } %strong - = @users_statistics&.blocked.to_i + = @users_statistics&.blocked %tr.bg-gray-light.gl-text-gray-900 - %td.p-3 + %td.gl-p-5! %strong = s_('AdminArea|Total users') - %td.p-3.text-right + %td.gl-text-right{ class: 'gl-p-5!' } %strong - = @users_statistics&.total.to_i + = @users_statistics&.total diff --git a/app/views/admin/deploy_keys/index.html.haml b/app/views/admin/deploy_keys/index.html.haml index eec8f816f04..ba4abdc02e4 100644 --- a/app/views/admin/deploy_keys/index.html.haml +++ b/app/views/admin/deploy_keys/index.html.haml @@ -1,33 +1,44 @@ - page_title _('Deploy Keys') -- if @deploy_keys.any? - %h3.page-title.deploy-keys-title - = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size } - = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn gl-button btn-confirm btn-md gl-button' - .table-holder.deploy-keys-list - %table.table + +- if Feature.enabled?(:admin_deploy_keys_vue, default_enabled: :yaml) + #js-admin-deploy-keys-table{ data: admin_deploy_keys_data } +- else + - if @deploy_keys.any? + %h3.page-title.deploy-keys-title + = _('Public deploy keys (%{deploy_keys_count})') % { deploy_keys_count: @deploy_keys.load.size } + = link_to _('New deploy key'), new_admin_deploy_key_path, class: 'float-right btn gl-button btn-confirm btn-md gl-button' + %table.table.b-table.gl-table.b-table-stacked-lg{ data: { testid: 'deploy-keys-list' } } %thead %tr - %th.col-sm-2= _('Title') - %th.col-sm-4= _('Fingerprint') - %th.col-sm-2= _('Projects with write access') - %th.col-sm-2= _('Added at') - %th.col-sm-2 + %th= _('Title') + %th= _('Fingerprint') + %th= _('Projects with write access') + %th= _('Created') + %th.gl-lg-w-1px.gl-white-space-nowrap + %span.gl-sr-only + = _('Actions') %tbody - @deploy_keys.each do |deploy_key| %tr - %td - %strong= deploy_key.title - %td - %code.key-fingerprint= deploy_key.fingerprint - %td - - deploy_key.projects_with_write_access.each do |project| - = link_to project.full_name, admin_project_path(project), class: 'label deploy-project-label' - %td - %span.cgray - = _('added %{created_at_timeago}').html_safe % { created_at_timeago: time_ago_with_tooltip(deploy_key.created_at) } - %td - .float-right - = link_to _('Edit'), edit_admin_deploy_key_path(deploy_key), class: 'btn gl-button btn-sm' - = link_to _('Remove'), admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'gl-button btn btn-sm btn-danger delete-key' -- else - = render 'shared/empty_states/deploy_keys' + %td{ data: { label: _('Title') } } + %div + = deploy_key.title + %td{ data: { label: _('Fingerprint') } } + %div + %code= deploy_key.fingerprint + %td{ data: { label: _('Projects with write access') } } + %div + - deploy_key.projects_with_write_access.each do |project| + = link_to project.full_name, admin_project_path(project), class: 'gl-display-block' + %td{ data: { label: _('Created') } } + %div + = time_ago_with_tooltip(deploy_key.created_at) + %td.gl-lg-w-1px.gl-white-space-nowrap{ data: { label: _('Actions') } } + %div + = link_to edit_admin_deploy_key_path(deploy_key), class: 'btn btn-default btn-md gl-button btn-icon gl-mr-3', aria: { label: _('Edit deploy key') } do + = sprite_icon('pencil', css_class: 'gl-button-icon') + = link_to admin_deploy_key_path(deploy_key), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-danger btn-md gl-button btn-icon', aria: { label: _('Remove deploy key') } do + = sprite_icon('remove', css_class: 'gl-button-icon') + + - else + = render 'shared/empty_states/deploy_keys' diff --git a/app/views/admin/dev_ops_report/_report.html.haml b/app/views/admin/dev_ops_report/_score.html.haml index 208afefc73b..208afefc73b 100644 --- a/app/views/admin/dev_ops_report/_report.html.haml +++ b/app/views/admin/dev_ops_report/_score.html.haml diff --git a/app/views/admin/dev_ops_report/show.html.haml b/app/views/admin/dev_ops_report/show.html.haml index c16ef7af76d..a2425b93ad3 100644 --- a/app/views/admin/dev_ops_report/show.html.haml +++ b/app/views/admin/dev_ops_report/show.html.haml @@ -1,4 +1,4 @@ -- page_title _('DevOps Report') +- page_title _('DevOps Reports') - add_page_specific_style 'page_bundles/dev_ops_report' .container @@ -6,5 +6,5 @@ - if show_adoption? = render_if_exists 'admin/dev_ops_report/devops_tabs' - else - = render 'report' + = render 'score' diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index f298fce7bcf..0539d7f13a2 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -1,4 +1,4 @@ - breadcrumb_title _('Runners') - page_title _('Runners') -#js-admin-runners{ data: { registration_token: Gitlab::CurrentSettings.runners_registration_token, runner_install_help_page: 'https://docs.gitlab.com/runner/install/', active_runners_count: @active_runners_count } } +#js-admin-runners{ data: admin_runners_data_attributes } diff --git a/app/views/admin/topics/_topic.html.haml b/app/views/admin/topics/_topic.html.haml index abf3cffa422..959e7ab31fc 100644 --- a/app/views/admin/topics/_topic.html.haml +++ b/app/views/admin/topics/_topic.html.haml @@ -6,7 +6,7 @@ .gl-min-w-0.gl-flex-grow-1 .title - = topic.name + = link_to topic.name, topic_explore_projects_path(topic_name: topic.name) .stats.gl-text-gray-500.gl-flex-shrink-0.gl-display-none.gl-sm-display-flex %span.gl-ml-5.has-tooltip{ title: n_('%d project', '%d projects', topic.total_projects_count) % topic.total_projects_count } diff --git a/app/views/admin/users/_tabs.html.haml b/app/views/admin/users/_tabs.html.haml index 90f06eeaf3f..6c14e1189fe 100644 --- a/app/views/admin/users/_tabs.html.haml +++ b/app/views/admin/users/_tabs.html.haml @@ -1,7 +1,3 @@ -%ul.nav-links.nav-tabs.nav.js-users-tabs{ role: 'tablist' } - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: admin_users_path, class: active_when(current_page?(admin_users_path)), role: 'tab' } - = s_('AdminUsers|Users') - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: admin_cohorts_path, class: active_when(current_page?(admin_cohorts_path)), role: 'tab' } - = s_('AdminUsers|Cohorts') += gl_tabs_nav({ class: 'js-users-tabs' }) do + = gl_tab_link_to s_('AdminUsers|Users'), admin_users_path + = gl_tab_link_to s_('AdminUsers|Cohorts'), admin_cohorts_path diff --git a/app/views/admin/users/_users.html.haml b/app/views/admin/users/_users.html.haml index 1a43d91b800..e62e4cfa192 100644 --- a/app/views/admin/users/_users.html.haml +++ b/app/views/admin/users/_users.html.haml @@ -3,48 +3,38 @@ = sprite_icon('chevron-lg-left', size: 12) .fade-right = sprite_icon('chevron-lg-right', size: 12) - %ul.nav-links.nav.nav-tabs.scrolling-tabs - = nav_link(html_options: { class: active_when(params[:filter].nil?) }) do - = link_to admin_users_path do - = s_('AdminUsers|Active') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.active_without_ghosts) - = nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do - = link_to admin_users_path(filter: "admins") do - = s_('AdminUsers|Admins') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.admins) - = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do - = link_to admin_users_path(filter: 'two_factor_enabled') do - = s_('AdminUsers|2FA Enabled') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.with_two_factor) - = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do - = link_to admin_users_path(filter: 'two_factor_disabled') do - = s_('AdminUsers|2FA Disabled') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.without_two_factor) - = nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do - = link_to admin_users_path(filter: 'external') do - = s_('AdminUsers|External') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.external) - = nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do - = link_to admin_users_path(filter: "blocked") do - = s_('AdminUsers|Blocked') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.blocked) + = gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1' }) do + = gl_tab_link_to admin_users_path, { item_active: active_when(params[:filter].nil?), class: 'gl-border-0!' } do + = s_('AdminUsers|Active') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.active_without_ghosts)) + = gl_tab_link_to admin_users_path(filter: "admins"), { item_active: active_when(params[:filter] == 'admins'), class: 'gl-border-0!' } do + = s_('AdminUsers|Admins') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.admins)) + = gl_tab_link_to admin_users_path(filter: 'two_factor_enabled'), { item_active: active_when(params[:filter] == 'two_factor_enabled'), class: 'filter-two-factor-enabled gl-border-0!' } do + = s_('AdminUsers|2FA Enabled') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.with_two_factor)) + = gl_tab_link_to admin_users_path(filter: 'two_factor_disabled'), { item_active: active_when(params[:filter] == 'two_factor_disabled'), class: 'filter-two-factor-disabled gl-border-0!' } do + = s_('AdminUsers|2FA Disabled') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.without_two_factor)) + = gl_tab_link_to admin_users_path(filter: 'external'), { item_active: active_when(params[:filter] == 'external'), class: 'gl-border-0!' } do + = s_('AdminUsers|External') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.external)) + = gl_tab_link_to admin_users_path(filter: "blocked"), { item_active: active_when(params[:filter] == 'blocked'), class: 'gl-border-0!' } do + = s_('AdminUsers|Blocked') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked)) - if ban_feature_available? - = nav_link(html_options: { class: active_when(params[:filter] == 'banned') }) do - = link_to admin_users_path(filter: "banned") do - = s_('AdminUsers|Banned') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.banned) - = nav_link(html_options: { class: "#{active_when(params[:filter] == 'blocked_pending_approval')} filter-blocked-pending-approval" }) do - = link_to admin_users_path(filter: "blocked_pending_approval"), data: { qa_selector: 'pending_approval_tab' } do - = s_('AdminUsers|Pending approval') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.blocked_pending_approval) - = nav_link(html_options: { class: active_when(params[:filter] == 'deactivated') }) do - = link_to admin_users_path(filter: "deactivated") do - = s_('AdminUsers|Deactivated') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.deactivated) - = nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do - = link_to admin_users_path(filter: "wop") do - = s_('AdminUsers|Without projects') - %small.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(User.without_projects) + = gl_tab_link_to admin_users_path(filter: "banned"), { item_active: active_when(params[:filter] == 'banned'), class: 'gl-border-0!' } do + = s_('AdminUsers|Banned') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.banned)) + = gl_tab_link_to admin_users_path(filter: "blocked_pending_approval"), { item_active: active_when(params[:filter] == 'blocked_pending_approval'), class: 'filter-blocked-pending-approval gl-border-0!', data: { qa_selector: 'pending_approval_tab' } } do + = s_('AdminUsers|Pending approval') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.blocked_pending_approval)) + = gl_tab_link_to admin_users_path(filter: "deactivated"), { item_active: active_when(params[:filter] == 'deactivated'), class: 'gl-border-0!' } do + = s_('AdminUsers|Deactivated') + = gl_tab_counter_badge(limited_counter_with_delimiter(User.deactivated)) + = gl_tab_link_to admin_users_path(filter: "wop"), { item_active: active_when(params[:filter] == 'wop'), class: 'gl-border-0!' } do + = s_('AdminUsers|Without projects') + = gl_tab_counter_badge(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' diff --git a/app/views/clusters/clusters/_cluster_list.html.haml b/app/views/clusters/clusters/_cluster_list.html.haml index 38ed7e334c9..e5e1b68225e 100644 --- a/app/views/clusters/clusters/_cluster_list.html.haml +++ b/app/views/clusters/clusters/_cluster_list.html.haml @@ -1,12 +1,10 @@ -- if clusters.empty? - = render 'empty_state' -- else +- if !clusters.empty? .top-area.adjust .gl-display-block.gl-text-right.gl-my-4.gl-w-full - if clusterable.can_add_cluster? - = link_to s_('ClusterIntegration|Connect cluster with certificate'), clusterable.new_path, class: 'btn gl-button btn-confirm js-add-cluster gl-py-2', qa_selector: :integrate_kubernetes_cluster_button + = link_to s_('ClusterIntegration|Connect cluster with certificate'), clusterable.new_path, class: 'btn gl-button btn-confirm js-add-cluster gl-py-2', data: { qa_selector: 'integrate_kubernetes_cluster_button' } - else %span.btn.gl-button.btn-confirm.js-add-cluster.disabled.gl-py-2 = s_("ClusterIntegration|Connect cluster with certificate") - #js-clusters-list-app{ data: js_clusters_list_data(clusterable.index_path(format: :json)) } +#js-clusters-list-app{ data: js_clusters_list_data(clusterable) } diff --git a/app/views/clusters/clusters/_empty_state.html.haml b/app/views/clusters/clusters/_empty_state.html.haml deleted file mode 100644 index feef3e0027f..00000000000 --- a/app/views/clusters/clusters/_empty_state.html.haml +++ /dev/null @@ -1,14 +0,0 @@ -.row.empty-state - .col-12 - .svg-content= image_tag 'illustrations/clusters_empty.svg' - .col-12 - .text-content - %h4.gl-text-center= s_('ClusterIntegration|Integrate Kubernetes with a cluster certificate') - %p.gl-text-center - = s_('ClusterIntegration|Kubernetes clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way.') - = clusterable.empty_state_help_text - = clusterable.learn_more_link - - - if clusterable.can_add_cluster? - .gl-text-center - = link_to s_('ClusterIntegration|Integrate with a cluster certificate'), clusterable.new_path, class: 'gl-button btn btn-confirm', data: { qa_selector: 'add_kubernetes_cluster_link' } diff --git a/app/views/clusters/clusters/aws/_new.html.haml b/app/views/clusters/clusters/aws/_new.html.haml index f6d50410e9a..7142dd83dce 100644 --- a/app/views/clusters/clusters/aws/_new.html.haml +++ b/app/views/clusters/clusters/aws/_new.html.haml @@ -11,7 +11,7 @@ 'external-id' => @aws_role.role_external_id, 'role-arn' => @aws_role.role_arn, 'instance-types' => @instance_types, - 'kubernetes-integration-help-path' => help_page_path('user/project/clusters/index'), + 'kubernetes-integration-help-path' => help_page_path('user/infrastructure/clusters/index.md'), 'account-and-external-ids-help-path' => help_page_path('user/project/clusters/add_eks_clusters.md', anchor: 'how-to-create-a-new-cluster-on-eks-through-cluster-certificates-deprecated'), 'create-role-arn-help-path' => help_page_path('user/project/clusters/add_eks_clusters.md', anchor: 'how-to-create-a-new-cluster-on-eks-through-cluster-certificates-deprecated'), 'external-link-icon' => sprite_icon('external-link') } } diff --git a/app/views/clusters/clusters/gcp/_form.html.haml b/app/views/clusters/clusters/gcp/_form.html.haml index 5266fad9278..173456926a5 100644 --- a/app/views/clusters/clusters/gcp/_form.html.haml +++ b/app/views/clusters/clusters/gcp/_form.html.haml @@ -2,7 +2,7 @@ - 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' - pricing_link_url = 'https://cloud.google.com/compute/pricing#machinetype' -- kubernetes_integration_url = help_page_path('user/project/clusters/index') +- kubernetes_integration_url = help_page_path('user/infrastructure/clusters/index.md') - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe - help_link_end = ' %{external_link_icon}</a>'.html_safe % { external_link_icon: external_link_icon } @@ -74,7 +74,7 @@ label_class: 'label-bold' } .form-text.text-muted = s_('ClusterIntegration|Allow GitLab to manage namespaces and service accounts for this cluster.') - = link_to _('More information'), help_page_path('user/project/clusters/gitlab_managed_clusters.md', anchor: 'gitlab-managed-clusters'), target: '_blank' + = link_to _('More information'), help_page_path('user/project/clusters/gitlab_managed_clusters.md'), target: '_blank' .form-group = field.check_box :namespace_per_environment, { label: s_('ClusterIntegration|Namespace per environment'), label_class: 'label-bold' } diff --git a/app/views/clusters/clusters/index.html.haml b/app/views/clusters/clusters/index.html.haml index 45287a01cc9..457e34b306a 100644 --- a/app/views/clusters/clusters/index.html.haml +++ b/app/views/clusters/clusters/index.html.haml @@ -3,24 +3,10 @@ = render_gcp_signup_offer -.clusters-container.gl-my-2 +.clusters-container - if display_cluster_agents?(clusterable) - .js-toggle-container - %ul.nav-links.nav-tabs.nav{ role: 'tablist' } - %li.nav-item{ role: 'presentation' } - %a.nav-link.active{ href: "#certificate-clusters-pane", id: "certificate-clusters-tab", data: { toggle: 'tab' }, role: 'tab' } - %span= s_('ClusterIntegration|Clusters connected with a certificate') - - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: "#agent-clusters-pane", id: "agent-clusters-tab", data: { toggle: 'tab' }, role: 'tab' } - %span= s_('ClusterIntegration|GitLab Agent managed clusters') - - .tab-content - .tab-pane.active{ id: 'certificate-clusters-pane', role: 'tabpanel' } - = render 'cluster_list', clusters: @clusters - - .tab-pane{ id: 'agent-clusters-pane', role: 'tabpanel' } - #js-cluster-agents-list{ data: js_cluster_agents_list_data(clusterable) } + .gl-my-6 + .js-clusters-main-view{ data: js_clusters_data(clusterable) } - else = render 'cluster_list', clusters: @clusters diff --git a/app/views/clusters/clusters/new.html.haml b/app/views/clusters/clusters/new.html.haml index 74e336723ba..7af7a812338 100644 --- a/app/views/clusters/clusters/new.html.haml +++ b/app/views/clusters/clusters/new.html.haml @@ -1,31 +1,31 @@ - breadcrumb_title _('Kubernetes') - page_title _('Kubernetes Cluster') -- active_tab = local_assigns.fetch(:active_tab, 'create') - provider = params[:provider] +- active_tab = params[:tab] || local_assigns.fetch(:active_tab, 'create') +- is_active_tab_create = active_tab === 'create' +- is_active_tab_add = active_tab === 'add' = render_gcp_signup_offer .row.gl-mt-3 .col-md-3 = render 'sidebar' - .col-md-9.js-toggle-container - %ul.nav-links.nav-tabs.gitlab-tabs.nav{ role: 'tablist' } - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: '#create-cluster-pane', id: 'create-cluster-tab', class: active_when(active_tab == 'create'), data: { toggle: 'tab' }, role: 'tab' } - %span - = create_new_cluster_label(provider: params[:provider]) - %li.nav-item{ role: 'presentation' } - %a.nav-link{ href: '#add-cluster-pane', id: 'add-cluster-tab', class: active_when(active_tab == 'add'), data: { toggle: 'tab', qa_selector: 'add_existing_cluster_tab' }, role: 'tab' } - %span= s_('ClusterIntegration|Connect existing cluster') + .col-md-9 + = gl_tabs_nav({ class: 'nav-justified' }) do + = gl_tab_link_to clusterable.new_path(tab: 'create'), { item_active: is_active_tab_create } do + %span= create_new_cluster_label(provider: params[:provider]) + = gl_tab_link_to s_('ClusterIntegration|Connect existing cluster'), clusterable.new_path(tab: 'add'), { item_active: is_active_tab_add, qa_selector: 'add_existing_cluster_tab' } - .tab-content.gitlab-tab-content - .tab-pane.p-0{ id: 'create-cluster-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' } - = render 'clusters/clusters/cloud_providers/cloud_provider_selector' + .tab-content + - if is_active_tab_create + .tab-pane.active{ role: 'tabpanel' } + = render 'clusters/clusters/cloud_providers/cloud_provider_selector' - - if ['aws', 'gcp'].include?(provider) - .p-3.border-top - = render "clusters/clusters/#{provider}/new" + - if ['aws', 'gcp'].include?(provider) + .p-3.border-top + = render "clusters/clusters/#{provider}/new" - .tab-pane{ id: 'add-cluster-pane', class: active_when(active_tab == 'add'), role: 'tabpanel' } - #js-cluster-new{ data: js_cluster_new } - = render 'clusters/clusters/user/form' + - if is_active_tab_add + .tab-pane.active.gl-p-5{ role: 'tabpanel' } + #js-cluster-new{ data: js_cluster_new } + = render 'clusters/clusters/user/form' diff --git a/app/views/clusters/clusters/show.html.haml b/app/views/clusters/clusters/show.html.haml index 2a09d8d8cc0..e4c8f225ed2 100644 --- a/app/views/clusters/clusters/show.html.haml +++ b/app/views/clusters/clusters/show.html.haml @@ -13,7 +13,7 @@ cluster_status: @cluster.status_name, cluster_status_reason: @cluster.status_reason, provider_type: @cluster.provider_type, - help_path: help_page_path('user/project/clusters/index.md'), + help_path: help_page_path('user/infrastructure/clusters/index.md'), environments_help_path: help_page_path('ci/environments/index.md', anchor: 'create-a-static-environment'), clusters_help_path: help_page_path('user/project/clusters/deploy_to_cluster.md'), deploy_boards_help_path: help_page_path('user/project/deploy_boards.md', anchor: 'enabling-deploy-boards'), diff --git a/app/views/dashboard/_projects_head.html.haml b/app/views/dashboard/_projects_head.html.haml index fdaf2107686..b94b14bf6bd 100644 --- a/app/views/dashboard/_projects_head.html.haml +++ b/app/views/dashboard/_projects_head.html.haml @@ -14,19 +14,7 @@ .top-area.scrolling-tabs-container.inner-page-scroll-tabs .fade-left= sprite_icon('chevron-lg-left', size: 12) .fade-right= sprite_icon('chevron-lg-right', size: 12) - %ul.nav-links.scrolling-tabs.mobile-separator.nav.nav-tabs{ class: ('border-0' if feature_project_list_filter_bar) } - = nav_link(page: [dashboard_projects_path, root_path]) do - = link_to dashboard_projects_path, class: 'shortcuts-activity', data: {placement: 'right'} do - = _("Your projects") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(@total_user_projects_count) - = nav_link(page: starred_dashboard_projects_path) do - = link_to starred_dashboard_projects_path, data: {placement: 'right'} do - = _("Starred projects") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm= limited_counter_with_delimiter(@total_starred_projects_count) - = nav_link(page: [explore_root_path, trending_explore_projects_path, starred_explore_projects_path, explore_projects_path]) do - = link_to explore_root_path, data: {placement: 'right'} do - = _("Explore projects") - = render_if_exists "dashboard/removed_projects_tab", removed_projects_count: @removed_projects_count + = render 'dashboard/projects_nav' - unless feature_project_list_filter_bar .nav-controls = render 'shared/projects/search_form' diff --git a/app/views/dashboard/_projects_nav.html.haml b/app/views/dashboard/_projects_nav.html.haml new file mode 100644 index 00000000000..64aa1e01d06 --- /dev/null +++ b/app/views/dashboard/_projects_nav.html.haml @@ -0,0 +1,13 @@ +- is_your_projects_path = current_page?(dashboard_projects_path) || current_page?(root_path) +- is_explore_projects_path = current_page?(explore_root_path) || current_page?(trending_explore_projects_path) || current_page?(starred_explore_projects_path) || current_page?(explore_projects_path) + += gl_tabs_nav({ class: 'scrolling-tabs nav-links gl-display-flex gl-flex-grow-1 gl-flex-nowrap gl-border-0' }) do + = gl_tab_link_to dashboard_projects_path, { item_active: is_your_projects_path, class: 'shortcuts-activity', data: { placement: 'right' } } do + = _("Your projects") + = gl_tab_counter_badge(limited_counter_with_delimiter(@total_user_projects_count)) + = gl_tab_link_to starred_dashboard_projects_path, { data: { placement: 'right' } } do + = _("Starred projects") + = gl_tab_counter_badge(limited_counter_with_delimiter(@total_starred_projects_count)) + = gl_tab_link_to _("Explore projects"), explore_root_path, { item_active: is_explore_projects_path, data: { placement: 'right' } } + = gl_tab_link_to _("Explore topics"), topics_explore_projects_path, { data: { placement: 'right' } } + = render_if_exists "dashboard/removed_projects_tab", removed_projects_count: @removed_projects_count diff --git a/app/views/dashboard/_snippets_head.html.haml b/app/views/dashboard/_snippets_head.html.haml index e96b5695ddc..8c468812e33 100644 --- a/app/views/dashboard/_snippets_head.html.haml +++ b/app/views/dashboard/_snippets_head.html.haml @@ -7,10 +7,6 @@ = link_to _("New snippet"), new_snippet_path, class: "gl-button btn btn-confirm", title: _("New snippet") .top-area - %ul.nav-links.nav.nav-tabs - = nav_link(page: dashboard_snippets_path, html_options: {class: 'home'}) do - = link_to dashboard_snippets_path, title: 'Your snippets', data: {placement: 'right'} do - Your snippets - = nav_link(page: explore_snippets_path) do - = link_to explore_snippets_path, title: 'Explore snippets', data: {placement: 'right'} do - Explore snippets + = gl_tabs_nav({ class: 'gl-border-0' }) do + = gl_tab_link_to _('Your snippets'), dashboard_snippets_path, { title: _('Your snippets') } + = gl_tab_link_to _('Explore snippets'), explore_snippets_path, { title: _('Explore snippets') } diff --git a/app/views/dashboard/projects/_nav.html.haml b/app/views/dashboard/projects/_nav.html.haml index f9b61bf1f3e..3e39872902d 100644 --- a/app/views/dashboard/projects/_nav.html.haml +++ b/app/views/dashboard/projects/_nav.html.haml @@ -14,8 +14,6 @@ = link_to s_('DashboardProjects|All'), dashboard_projects_path, class: params[:personal].present? ? inactive_class : active_class = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), class: params[:personal].present? ? active_class : inactive_class - else - %ul.nav-links.mobile-separator.nav.nav-tabs - = nav_link(html_options: { class: ("active" unless params[:personal].present?) }) do - = link_to s_('DashboardProjects|All'), dashboard_projects_path - = nav_link(html_options: { class: ("active" if params[:personal].present?) }) do - = link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true) + = gl_tabs_nav do + = gl_tab_link_to s_('DashboardProjects|All'), dashboard_projects_path, { item_active: params[:personal].blank? } + = gl_tab_link_to s_('DashboardProjects|Personal'), filter_projects_path(personal: true), { item_active: params[:personal].present? } diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 58f817bf63b..aa54a1e589e 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -10,19 +10,13 @@ - if current_user.todos.any? .top-area - %ul.nav-links.mobile-separator.nav.nav-tabs - %li.todos-pending{ class: active_when(params[:state].blank? || params[:state] == 'pending') }> - = link_to todos_filter_path(state: 'pending') do - %span - To Do - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = number_with_delimiter(todos_pending_count) - %li.todos-done{ class: active_when(params[:state] == 'done') }> - = link_to todos_filter_path(state: 'done') do - %span - Done - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = number_with_delimiter(todos_done_count) + = gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do + = gl_tab_link_to todos_filter_path(state: 'pending'), item_active: params[:state].blank? || params[:state] == 'pending', class: "js-todos-pending" do + = _("To Do") + = gl_tab_counter_badge number_with_delimiter(todos_pending_count) + = gl_tab_link_to todos_filter_path(state: 'done'), item_active: params[:state] == 'done', class: "js-todos-done" do + = _("Done") + = gl_tab_counter_badge number_with_delimiter(todos_done_count) .nav-controls - if @allowed_todos.any?(&:pending?) diff --git a/app/views/devise/confirmations/new.html.haml b/app/views/devise/confirmations/new.html.haml index 51354618aa4..eee223ff63c 100644 --- a/app/views/devise/confirmations/new.html.haml +++ b/app/views/devise/confirmations/new.html.haml @@ -7,7 +7,12 @@ .form-group = f.label :email = f.email_field :email, class: "form-control gl-form-input", required: true, title: _('Please provide a valid email address.'), value: nil - .clearfix + + %div + - if recaptcha_enabled? + = recaptcha_tags nonce: content_security_policy_nonce + + .gl-mt-5 = f.submit _("Resend"), class: 'gl-button btn btn-confirm' .clearfix.prepend-top-20 diff --git a/app/views/devise/passwords/new.html.haml b/app/views/devise/passwords/new.html.haml index 7f6ce712af2..7bbde4a39c7 100644 --- a/app/views/devise/passwords/new.html.haml +++ b/app/views/devise/passwords/new.html.haml @@ -8,7 +8,12 @@ = f.email_field :email, class: "form-control gl-form-input", required: true, value: params[:user_email], autofocus: true, title: _('Please provide a valid email address.') .form-text.text-muted = _('Requires your primary GitLab email address.') - .clearfix + + %div + - if recaptcha_enabled? + = recaptcha_tags nonce: content_security_policy_nonce + + .gl-mt-5 = f.submit _("Reset password"), class: "gl-button btn-confirm btn" .clearfix.prepend-top-20 diff --git a/app/views/doorkeeper/applications/show.html.haml b/app/views/doorkeeper/applications/show.html.haml index 75521d42f7e..3a568421ce9 100644 --- a/app/views/doorkeeper/applications/show.html.haml +++ b/app/views/doorkeeper/applications/show.html.haml @@ -6,4 +6,7 @@ %h3.page-title = _("Application: %{name}") % { name: @application.name } -= render 'shared/doorkeeper/applications/show', edit_path: edit_oauth_application_path(@application), delete_path: oauth_application_path(@application) += render 'shared/doorkeeper/applications/show', + edit_path: edit_oauth_application_path(@application), + delete_path: oauth_application_path(@application), + index_path: oauth_applications_path diff --git a/app/views/errors/omniauth_error.html.haml b/app/views/errors/omniauth_error.html.haml index 0e9041d07ea..e114e4609f8 100644 --- a/app/views/errors/omniauth_error.html.haml +++ b/app/views/errors/omniauth_error.html.haml @@ -1,7 +1,7 @@ - content_for(:title, 'Auth Error') .container - = render "shared/errors/graphic_422.svg" + = render partial: "shared/errors/graphic_422", formats: :svg %h3 Sign-in using #{@provider} auth failed %p.light.subtitle Sign-in failed because #{@error}. diff --git a/app/views/explore/groups/_nav.html.haml b/app/views/explore/groups/_nav.html.haml index c337149a2f3..3c9c4e9f76b 100644 --- a/app/views/explore/groups/_nav.html.haml +++ b/app/views/explore/groups/_nav.html.haml @@ -1,8 +1,6 @@ .top-area - %ul.nav-links.nav.nav-tabs - = nav_link(page: explore_groups_path) do - = link_to explore_groups_path do - = _("Explore Groups") + = gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-none'}) do + = gl_tab_link_to _("Explore Groups"), explore_groups_path .nav-controls = render 'shared/groups/search_form' = render 'shared/groups/dropdown' diff --git a/app/views/explore/projects/_nav.html.haml b/app/views/explore/projects/_nav.html.haml index 65b7d055843..9d7a6f1ccfb 100644 --- a/app/views/explore/projects/_nav.html.haml +++ b/app/views/explore/projects/_nav.html.haml @@ -1,14 +1,8 @@ .top-area - %ul.nav-links.nav.nav-tabs - = nav_link(page: [explore_projects_path, explore_root_path]) do - = link_to explore_projects_path do - = _('All') - = nav_link(page: starred_explore_projects_path) do - = link_to starred_explore_projects_path do - = _('Most stars') - = nav_link(page: trending_explore_projects_path) do - = link_to trending_explore_projects_path do - = _('Trending') + = gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-none'}) do + = gl_tab_link_to _('All'), explore_projects_path, { item_active: current_page?(explore_projects_path) || current_page?(explore_root_path) } + = gl_tab_link_to _('Most stars'), starred_explore_projects_path + = gl_tab_link_to _('Trending'), trending_explore_projects_path .nav-controls - unless current_user diff --git a/app/views/explore/projects/topic.html.haml b/app/views/explore/projects/topic.html.haml new file mode 100644 index 00000000000..aeb040ea61f --- /dev/null +++ b/app/views/explore/projects/topic.html.haml @@ -0,0 +1,31 @@ +- @hide_top_links = false +- @no_container = true +- page_title @topic.name, _("Topics") +- max_topic_name_length = 50 + += render_dashboard_ultimate_trial(current_user) + +.gl-text-center.gl-bg-gray-10.gl-pb-2.gl-pt-6 + .gl-pb-5.gl-align-items-center.gl-justify-content-center.gl-display-flex + .avatar-container.rect-avatar.s60.gl-flex-shrink-0 + = topic_icon(@topic, alt: _('Topic avatar'), class: 'avatar topic-avatar s60') + - if @topic.name.length > max_topic_name_length + %h1.gl-mt-3.str-truncated.has-tooltip{ title: @topic.name } + = truncate(@topic.name, length: max_topic_name_length) + - else + %h1.gl-mt-3 + = @topic.name + - if @topic.description.present? + .topic-description.gl-ml-4.gl-mr-4 + = markdown(@topic.description) + +%div{ class: container_class } + .gl-py-5.gl-border-gray-100.gl-border-b-solid.gl-border-b-1 + %h3.gl-m-0= _('Projects with this topic') + .top-area.gl-pt-2.gl-pb-2 + .nav-controls + = render 'shared/projects/search_form' + = render 'shared/projects/dropdown' + = render 'filter' + + = render 'projects', projects: @projects diff --git a/app/views/explore/projects/topics.html.haml b/app/views/explore/projects/topics.html.haml new file mode 100644 index 00000000000..228304d25b6 --- /dev/null +++ b/app/views/explore/projects/topics.html.haml @@ -0,0 +1,12 @@ +- @hide_top_links = true +- page_title _("Topics") +- header_title _("Topics"), topics_explore_projects_path + += render_dashboard_ultimate_trial(current_user) + +- if current_user + = render 'explore/topics/head' +- else + = render 'explore/head' + += render partial: 'shared/topics/list' diff --git a/app/views/explore/topics/_head.html.haml b/app/views/explore/topics/_head.html.haml new file mode 100644 index 00000000000..f5ee95b16c3 --- /dev/null +++ b/app/views/explore/topics/_head.html.haml @@ -0,0 +1,9 @@ +.page-title-holder.d-flex.align-items-center + %h1.page-title= _('Projects') + +.top-area.scrolling-tabs-container.inner-page-scroll-tabs + .fade-left= sprite_icon('chevron-lg-left', size: 12) + .fade-right= sprite_icon('chevron-lg-right', size: 12) + = render 'dashboard/projects_nav' + .nav-controls + = render 'shared/topics/search_form' diff --git a/app/views/groups/_invite_members_side_nav_link.html.haml b/app/views/groups/_invite_members_side_nav_link.html.haml new file mode 100644 index 00000000000..bccfa9897da --- /dev/null +++ b/app/views/groups/_invite_members_side_nav_link.html.haml @@ -0,0 +1,8 @@ +.js-invite-members-trigger{ data: { trigger_source: 'group-side-nav', + classes: 'gl-text-decoration-none! gl-shadow-none! gl-text-body!', + icon: 'users', + display_text: title, + trigger_element: 'side-nav'} } + += render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } += render 'groups/invite_members_modal', group: group diff --git a/app/views/groups/boards/show.html.haml b/app/views/groups/boards/show.html.haml index dbbf78eed00..92838fa4b11 100644 --- a/app/views/groups/boards/show.html.haml +++ b/app/views/groups/boards/show.html.haml @@ -1,3 +1 @@ -= render 'shared/alerts/positioning_disabled' - = render "shared/boards/show", board: @board, group: true diff --git a/app/views/groups/crm/contacts.html.haml b/app/views/groups/crm/contacts.html.haml new file mode 100644 index 00000000000..c452a969d17 --- /dev/null +++ b/app/views/groups/crm/contacts.html.haml @@ -0,0 +1,4 @@ +- breadcrumb_title _('Customer Relations Contacts') +- page_title _('Customer Relations Contacts') + +#js-crm-contacts-app{ data: { group_full_path: @group.full_path } } diff --git a/app/views/groups/crm/organizations.html.haml b/app/views/groups/crm/organizations.html.haml new file mode 100644 index 00000000000..e83dab9fda6 --- /dev/null +++ b/app/views/groups/crm/organizations.html.haml @@ -0,0 +1,4 @@ +- breadcrumb_title _('Customer Relations Organizations') +- page_title _('Customer Relations Organizations') + +#js-crm-organizations-app{ data: { group_full_path: @group.full_path } } diff --git a/app/views/groups/dependency_proxies/show.html.haml b/app/views/groups/dependency_proxies/show.html.haml index 8936c4dcbb4..47caec717af 100644 --- a/app/views/groups/dependency_proxies/show.html.haml +++ b/app/views/groups/dependency_proxies/show.html.haml @@ -1,5 +1,7 @@ - page_title _("Dependency Proxy") +- @content_class = "limit-container-width" unless fluid_layout - dependency_proxy_available = Feature.enabled?(:dependency_proxy_for_private_groups, default_enabled: true) || @group.public? #js-dependency-proxy{ data: { group_path: @group.full_path, - dependency_proxy_available: dependency_proxy_available.to_s } } + dependency_proxy_available: dependency_proxy_available.to_s, + no_manifests_illustration: image_path('illustrations/docker-empty-state.svg') } } diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 0f11ca5fb8f..e55af71022e 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -10,7 +10,7 @@ .row{ 'v-cloak': true } #create-group-pane.tab-pane - = form_for @group, html: { class: 'group-form gl-show-field-errors' } do |f| + = form_for @group, html: { class: 'group-form gl-show-field-errors gl-mt-3' } do |f| = render 'new_group_fields', f: f, group_name_id: 'create-group-name' #import-group-pane.tab-pane diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml index cdff533e3c7..a82f7803b44 100644 --- a/app/views/groups/settings/_advanced.html.haml +++ b/app/views/groups/settings/_advanced.html.haml @@ -1,3 +1,4 @@ +- remove_form_id = 'js-remove-group-form' = render 'groups/settings/export', group: @group .sub-section @@ -26,6 +27,6 @@ = f.submit s_('GroupSettings|Change group URL'), class: 'btn gl-button btn-warning' = render 'groups/settings/transfer', group: @group -= render 'groups/settings/remove', group: @group += render 'groups/settings/remove', group: @group, remove_form_id: remove_form_id = render_if_exists 'groups/settings/restore', group: @group -= render_if_exists 'groups/settings/immediately_remove', group: @group += render_if_exists 'groups/settings/immediately_remove', group: @group, remove_form_id: remove_form_id diff --git a/app/views/groups/settings/_membership.html.haml b/app/views/groups/settings/_membership.html.haml index b05a294e864..c1566dddc00 100644 --- a/app/views/groups/settings/_membership.html.haml +++ b/app/views/groups/settings/_membership.html.haml @@ -4,3 +4,4 @@ = render 'shared/allow_request_access', form: f = render_if_exists 'groups/member_lock_setting', f: f, group: @group += render_if_exists 'groups/user_caps_setting', f: f, group: @group diff --git a/app/views/groups/settings/_permanent_deletion.html.haml b/app/views/groups/settings/_permanent_deletion.html.haml index 125a20060ed..152cdfc1411 100644 --- a/app/views/groups/settings/_permanent_deletion.html.haml +++ b/app/views/groups/settings/_permanent_deletion.html.haml @@ -1,9 +1,11 @@ +- remove_form_id = local_assigns.fetch(:remove_form_id, nil) + .sub-section %h4.danger-title= _('Remove group') - = form_tag(group, method: :delete) do + = form_tag(group, method: :delete, id: remove_form_id) do %p = _('Removing this group also removes all child projects, including archived projects, and their resources.') %br %strong= _('Removed group can not be restored!') - = render 'groups/settings/remove_button', group: group + = render 'groups/settings/remove_button', group: group, remove_form_id: remove_form_id diff --git a/app/views/groups/settings/_remove.html.haml b/app/views/groups/settings/_remove.html.haml index a617467019a..8571b93364b 100644 --- a/app/views/groups/settings/_remove.html.haml +++ b/app/views/groups/settings/_remove.html.haml @@ -1,5 +1,6 @@ +- remove_form_id = local_assigns.fetch(:remove_form_id, nil) + - if group.adjourned_deletion? - = render_if_exists 'groups/settings/adjourned_deletion', group: group + = render_if_exists 'groups/settings/adjourned_deletion', group: group, remove_form_id: remove_form_id - else - = render 'groups/settings/permanent_deletion', group: group - + = render 'groups/settings/permanent_deletion', group: group, remove_form_id: remove_form_id diff --git a/app/views/groups/settings/_remove_button.html.haml b/app/views/groups/settings/_remove_button.html.haml index a04dba68b92..1d5b7160049 100644 --- a/app/views/groups/settings/_remove_button.html.haml +++ b/app/views/groups/settings/_remove_button.html.haml @@ -1,7 +1,9 @@ +- remove_form_id = local_assigns.fetch(:remove_form_id, nil) + - if group.paid? .gl-alert.gl-alert-info.gl-mb-5{ data: { testid: 'group-has-linked-subscription-alert' } } = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') .gl-alert-body = html_escape(_("This group can't be removed because it is linked to a subscription. To remove this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe } -= button_to _('Remove group'), '#', class: ['btn gl-button btn-danger js-confirm-danger', ('disabled' if group.paid?)], data: { 'confirm-danger-message' => remove_group_message(group), 'testid' => 'remove-group-button' } +.js-confirm-danger{ data: group_settings_confirm_modal_data(group, remove_form_id) } diff --git a/app/views/groups/settings/_transfer.html.haml b/app/views/groups/settings/_transfer.html.haml index 1472ae42152..b2379d77314 100644 --- a/app/views/groups/settings/_transfer.html.haml +++ b/app/views/groups/settings/_transfer.html.haml @@ -14,7 +14,7 @@ %li= s_("GroupSettings|If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.") - if group.paid? - .gl-alert.gl-alert-info.gl-mb-5{ data: { testid: 'group-to-transfer-has-linked-subscription-alert' } } + .gl-alert.gl-alert-info.gl-mb-5 = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') .gl-alert-body = html_escape(_("This group can't be transfered because it is linked to a subscription. To transfer this group, %{linkStart}link the subscription%{linkEnd} with a different group.")) % { linkStart: "<a href=\"#{help_page_path('subscriptions/index', anchor: 'change-the-linked-namespace')}\">".html_safe, linkEnd: '</a>'.html_safe } diff --git a/app/views/groups/settings/applications/show.html.haml b/app/views/groups/settings/applications/show.html.haml index fce3602349b..6e7f6ce4df0 100644 --- a/app/views/groups/settings/applications/show.html.haml +++ b/app/views/groups/settings/applications/show.html.haml @@ -6,4 +6,7 @@ %h3.page-title = _("Group application: %{name}") % { name: @application.name } -= render 'shared/doorkeeper/applications/show', edit_path: edit_group_settings_application_path(@group, @application), delete_path: group_settings_application_path(@group, @application) += render 'shared/doorkeeper/applications/show', + edit_path: edit_group_settings_application_path(@group, @application), + delete_path: group_settings_application_path(@group, @application), + index_path: group_settings_applications_path diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 2e74d983397..ed3f2b0c6db 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -32,8 +32,6 @@ = render_if_exists 'groups/group_activity_analytics', group: @group -= render 'groups/invite_members_modal', group: @group - .groups-listing{ data: { endpoints: { default: group_children_path(@group, format: :json), shared: group_shared_projects_path(@group, format: :json) } } } .top-area.group-nav-container.justify-content-between .scrolling-tabs-container.inner-page-scroll-tabs diff --git a/app/views/help/index.html.haml b/app/views/help/index.html.haml index 95888963947..f81afd0a82e 100644 --- a/app/views/help/index.html.haml +++ b/app/views/help/index.html.haml @@ -46,5 +46,5 @@ %button.btn-blank.btn-link.js-trigger-shortcut{ type: 'button' } = _('Use shortcuts') - unless Gitlab::CurrentSettings.help_page_hide_commercial_content? - %li= link_to _('Get a support subscription'), 'https://about.gitlab.com/pricing/' - %li= link_to _('Compare GitLab editions'), 'https://about.gitlab.com/features/#compare' + %li= link_to _('Get a support subscription'), "https://#{ApplicationHelper.promo_host}/pricing/" + %li= link_to _('Compare GitLab editions'), "https://#{ApplicationHelper.promo_host}/features/#compare" diff --git a/app/views/import/github/new.html.haml b/app/views/import/github/new.html.haml index 3f7f929f766..ef6479f8be2 100644 --- a/app/views/import/github/new.html.haml +++ b/app/views/import/github/new.html.haml @@ -23,7 +23,7 @@ = form_tag personal_access_token_import_github_path, method: :post do .form-group %label.label-bold= _('Personal Access Token') - = text_field_tag :personal_access_token, '', class: 'form-control', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' } + = text_field_tag :personal_access_token, '', class: 'form-control gl-form-input', placeholder: _('e.g. %{token}') % { token: '8d3f016698e...' }, data: { qa_selector: 'personal_access_token_field' } %span.form-text.text-muted = import_github_personal_access_token_message diff --git a/app/views/issues/_issues_calendar.ics.ruby b/app/views/issues/_issues_calendar.ics.ruby index c21c4dac9f0..4b0be661aa5 100644 --- a/app/views/issues/_issues_calendar.ics.ruby +++ b/app/views/issues/_issues_calendar.ics.ruby @@ -1,3 +1,4 @@ +# rubocop:disable Naming/FileName # frozen_string_literal: true cal = Icalendar::Calendar.new @@ -17,3 +18,5 @@ end # rubocop: enable CodeReuse/ActiveRecord cal.to_ical + +# rubocop:enable Naming/FileName diff --git a/app/views/jira_connect/branches/new.html.haml b/app/views/jira_connect/branches/new.html.haml index f0e34c30018..74d547e6bb8 100644 --- a/app/views/jira_connect/branches/new.html.haml +++ b/app/views/jira_connect/branches/new.html.haml @@ -1,5 +1,6 @@ - @hide_breadcrumbs = true - @hide_top_links = true +- @content_class = 'limit-container-width' - page_title _('New branch') .js-jira-connect-create-branch{ data: @new_branch_data } diff --git a/app/views/jira_connect/subscriptions/index.html.haml b/app/views/jira_connect/subscriptions/index.html.haml index cbe9a860210..be2be7288f8 100644 --- a/app/views/jira_connect/subscriptions/index.html.haml +++ b/app/views/jira_connect/subscriptions/index.html.haml @@ -9,20 +9,9 @@ = link_to _('Sign in to GitLab'), jira_connect_users_path, target: '_blank', rel: 'noopener noreferrer', class: 'js-jira-connect-sign-in' %main.jira-connect-app.gl-px-5.gl-pt-7.gl-mx-auto - - if current_user.blank? && @subscriptions.empty? - .jira-connect-app-body.gl-px-5.gl-text-center - %h2= s_('JiraService|GitLab for Jira Configuration') - %p= s_('JiraService|Sign in to GitLab.com to get started.') + .js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } - .gl-mt-7 - = external_link _('Sign in to GitLab'), jira_connect_users_path, class: "btn gl-button btn-confirm js-jira-connect-sign-in" - - .gl-mt-7 - %p= s_('Integrations|Note: this integration only works with accounts on GitLab.com (SaaS).') - - else - .js-jira-connect-app{ data: jira_connect_app_data(@subscriptions) } - - %p.jira-connect-app-body.gl-px-5.gl-mt-7.gl-font-base.gl-text-center + %p.jira-connect-app-body.gl-px-5.gl-font-base.gl-text-center.gl-mx-auto %strong= s_('Integrations|Browser limitations') - browser_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">' - firefox_link_start = browser_link_start.html_safe % { url: 'https://www.mozilla.org/en-US/firefox/' } diff --git a/app/views/layouts/_head.html.haml b/app/views/layouts/_head.html.haml index a89c621a55c..5ca4a2f9888 100644 --- a/app/views/layouts/_head.html.haml +++ b/app/views/layouts/_head.html.haml @@ -92,3 +92,5 @@ = render 'layouts/google_analytics' if extra_config.has_key?('google_analytics_id') = render 'layouts/matomo' if extra_config.has_key?('matomo_url') && extra_config.has_key?('matomo_site_id') = render 'layouts/snowplow' + -# This is needed by [GitLab JH](https://gitlab.com/gitlab-jh/gitlab/-/issues/184) + = render_if_exists "layouts/frontend_monitor" diff --git a/app/views/layouts/_loading_hints.html.haml b/app/views/layouts/_loading_hints.html.haml index e2189009045..9b2815ea9bc 100644 --- a/app/views/layouts/_loading_hints.html.haml +++ b/app/views/layouts/_loading_hints.html.haml @@ -1,4 +1,4 @@ -= cache_if(Feature.enabled?(:cached_loading_hints, current_user), [ActionController::Base.asset_host, user_application_theme, user_color_scheme], expires_in: 1.minute) do += cache([ActionController::Base.asset_host, user_application_theme, user_color_scheme], expires_in: 1.minute) do - css_crossorigin = ActionController::Base.asset_host ? 'anonymous' : nil - if ActionController::Base.asset_host @@ -11,5 +11,5 @@ = preload_link_tag(path_to_stylesheet('application_utilities'), crossorigin: css_crossorigin) = preload_link_tag(path_to_stylesheet('application'), crossorigin: css_crossorigin) = preload_link_tag(path_to_stylesheet("highlight/themes/#{user_color_scheme}"), crossorigin: css_crossorigin) - - if Gitlab::Tracking.enabled? && Gitlab::CurrentSettings.snowplow_collector_hostname - %link{ rel: 'preconnect', href: Gitlab::CurrentSettings.snowplow_collector_hostname, crossorigin: '' } + - if Gitlab::Tracking.enabled? && Gitlab::Tracking.collector_hostname + %link{ rel: 'preconnect', href: Gitlab::Tracking.collector_hostname, crossorigin: '' } diff --git a/app/views/layouts/_published_experiments.html.haml b/app/views/layouts/_published_experiments.html.haml new file mode 100644 index 00000000000..717e1e633d2 --- /dev/null +++ b/app/views/layouts/_published_experiments.html.haml @@ -0,0 +1,4 @@ += javascript_tag(nonce: content_security_policy_nonce) do + :plain + gl = window.gl || {}; + gl.experiments = #{raw ApplicationExperiment.published_experiments.reject { |name, data| data[:excluded] }.to_json}; diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml index fc3b12acc46..7e242fb4a8e 100644 --- a/app/views/layouts/_snowplow.html.haml +++ b/app/views/layouts/_snowplow.html.haml @@ -10,5 +10,6 @@ window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json} gl = window.gl || {}; - gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new.to_context.to_json.to_json} + gl.snowplowStandardContext = #{Gitlab::Tracking::StandardContext.new(namespace: @group || @project&.namespace, + project: @project, user: current_user).to_context.to_json.to_json} gl.snowplowPseudonymizedPageUrl = #{masked_page_url.to_json}; diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 899bf65de48..26e3d9b3b92 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -16,4 +16,5 @@ = render 'layouts/img_loader' + = render 'layouts/published_experiments' = yield :scripts_body diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 8d28823bfa4..83e8ff79aec 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -120,7 +120,7 @@ - sign_in_text = allow_signup? ? _('Sign in / Register') : _('Sign in') = link_to sign_in_text, new_session_path(:user, redirect_to_referer: 'yes'), class: 'gl-button btn btn-default btn-sign-in' - %button.navbar-toggler.d-block.d-sm-none{ type: 'button', class: 'gl-border-none!', data: { testid: 'top-nav-responsive-toggle' } } + %button.navbar-toggler.d-block.d-sm-none{ type: 'button', class: 'gl-border-none!', data: { testid: 'top-nav-responsive-toggle', qa_selector: 'mobile_navbar_button' } } %span.sr-only= _('Toggle navigation') %span.more-icon.gl-px-3.gl-font-sm.gl-font-weight-bold %span.gl-pr-2= _('Menu') diff --git a/app/views/layouts/header/_help_dropdown.html.haml b/app/views/layouts/header/_help_dropdown.html.haml index 01e59b8e2ef..a03cd4cd68f 100644 --- a/app/views/layouts/header/_help_dropdown.html.haml +++ b/app/views/layouts/header/_help_dropdown.html.haml @@ -10,7 +10,7 @@ %li %button.js-shortcuts-modal-trigger{ type: "button" } = _("Keyboard shortcuts") - %span.text-secondary.float-right{ "aria-hidden": "true" }= '?'.html_safe + %kbd.flat.float-right{ "aria-hidden": "true" }= '?'.html_safe %li.divider %li = link_to _("Submit feedback"), "https://about.gitlab.com/submit-feedback" diff --git a/app/views/layouts/header/_logo_with_title.html.haml b/app/views/layouts/header/_logo_with_title.html.haml index 9b5a47306d2..0b9d4e2eea4 100644 --- a/app/views/layouts/header/_logo_with_title.html.haml +++ b/app/views/layouts/header/_logo_with_title.html.haml @@ -1,4 +1,4 @@ %header.navbar.fixed-top.navbar-gitlab.justify-content-center - = render 'shared/logo.svg' + = render partial: 'shared/logo', formats: :svg %span.logo-text.d-none.d-lg-block.gl-ml-3.pt-1 - = render 'shared/logo_type.svg' + = render partial: 'shared/logo_type', formats: :svg diff --git a/app/views/layouts/nav/_breadcrumbs.html.haml b/app/views/layouts/nav/_breadcrumbs.html.haml index 02a37dac158..3c52c430868 100644 --- a/app/views/layouts/nav/_breadcrumbs.html.haml +++ b/app/views/layouts/nav/_breadcrumbs.html.haml @@ -6,7 +6,7 @@ %nav.breadcrumbs{ class: [container, @content_class], 'aria-label': _('Breadcrumbs') } .breadcrumbs-container{ class: ("border-bottom-0" if @no_breadcrumb_border) } - if defined?(@left_sidebar) - = button_tag class: 'toggle-mobile-nav', type: 'button' do + = button_tag class: 'toggle-mobile-nav', data: { qa_selector: 'toggle_mobile_nav_button' }, type: 'button' do %span.sr-only= _("Open sidebar") = sprite_icon('hamburger', size: 18) .breadcrumbs-links{ data: { testid: 'breadcrumb-links', qa_selector: 'breadcrumb_links_content' } } @@ -16,7 +16,7 @@ - if @breadcrumbs_extra_links - @breadcrumbs_extra_links.each do |extra| = breadcrumb_list_item link_to(extra[:text], extra[:link]) - = render "layouts/nav/breadcrumbs/collapsed_dropdown", location: :after + = render "layouts/nav/breadcrumbs/collapsed_inline_list", location: :after - unless @skip_current_level_breadcrumb %li %h2.breadcrumbs-sub-title{ data: { qa_selector: 'breadcrumb_sub_title_content' } } diff --git a/app/views/layouts/nav/_top_nav_responsive.html.haml b/app/views/layouts/nav/_top_nav_responsive.html.haml index 86fd8b6d80c..22a260b5c0c 100644 --- a/app/views/layouts/nav/_top_nav_responsive.html.haml +++ b/app/views/layouts/nav/_top_nav_responsive.html.haml @@ -2,4 +2,5 @@ - view_model = top_nav_responsive_view_model(project: @project, group: @group) .top-nav-responsive{ class: top_class } - #js-top-nav-responsive{ data: { view_model: view_model.to_json } } + .cloak-startup + #js-top-nav-responsive{ data: { view_model: view_model.to_json } } diff --git a/app/views/layouts/nav/breadcrumbs/_collapsed_dropdown.html.haml b/app/views/layouts/nav/breadcrumbs/_collapsed_dropdown.html.haml deleted file mode 100644 index 8ea75087fed..00000000000 --- a/app/views/layouts/nav/breadcrumbs/_collapsed_dropdown.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -- dropdown_location = local_assigns.fetch(:location, nil) -- button_tooltip = local_assigns.fetch(:title, _("Show parent pages")) -- if defined?(@breadcrumb_dropdown_links) && @breadcrumb_dropdown_links.key?(dropdown_location) - %li.dropdown - %button.text-expander.has-tooltip.js-breadcrumbs-collapsed-expander{ type: "button", data: { toggle: "dropdown", container: "body" }, "aria-label": button_tooltip, title: button_tooltip } - = sprite_icon("ellipsis_h", size: 12) - = sprite_icon("angle-right", size: 8, css_class: "breadcrumbs-list-angle") - .dropdown-menu - %ul - - @breadcrumb_dropdown_links[dropdown_location].each_with_index do |link, index| - %li{ style: "text-indent: #{[index * 16, 60].min}px;" }= link diff --git a/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml b/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml new file mode 100644 index 00000000000..ccb660c050e --- /dev/null +++ b/app/views/layouts/nav/breadcrumbs/_collapsed_inline_list.html.haml @@ -0,0 +1,11 @@ +- dropdown_location = local_assigns.fetch(:location, nil) +- button_tooltip = local_assigns.fetch(:title, _("Show all breadcrumbs")) +- if defined?(@breadcrumb_collapsed_links) && @breadcrumb_collapsed_links.key?(dropdown_location) + %li.expander + %button.text-expander.has-tooltip.js-breadcrumbs-collapsed-expander{ type: "button", data: { container: "body" }, "aria-label": button_tooltip, title: button_tooltip } + = sprite_icon("ellipsis_h", size: 12) + = sprite_icon("angle-right", size: 8, css_class: "breadcrumbs-list-angle") + - @breadcrumb_collapsed_links[dropdown_location].each_with_index do |link, index| + %li{ :class => "gl-display-none! breadcrumbs-detail-item" } + = link + = sprite_icon("angle-right", size: 8, css_class: "breadcrumbs-list-angle") diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index 842fb23d24a..f820f911d61 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -66,9 +66,9 @@ = _('Analytics') %li.divider.fly-out-top-item = nav_link(controller: :dev_ops_report) do - = link_to admin_dev_ops_report_path, title: _('DevOps Report') do + = link_to admin_dev_ops_report_path, title: _('DevOps Reports') do %span - = _('DevOps Report') + = _('DevOps Reports') = nav_link(controller: :usage_trends) do = link_to admin_usage_trends_path, title: _('Usage Trends') do %span diff --git a/app/views/layouts/terms.html.haml b/app/views/layouts/terms.html.haml index 4d5c354388f..caa46b7bc56 100644 --- a/app/views/layouts/terms.html.haml +++ b/app/views/layouts/terms.html.haml @@ -1,21 +1,22 @@ !!! 5 +- add_page_specific_style 'page_bundles/terms' - @hide_breadcrumbs = true %html{ lang: I18n.locale, class: page_class } = render "layouts/head" %body{ data: { page: body_data_page } } .layout-page.terms{ class: page_class } - .content-wrapper + .content-wrapper.gl-pb-5 .mobile-overlay .alert-wrapper = render "layouts/broadcast" = render 'layouts/header/read_only_banner' - = render "layouts/flash", extra_flash_class: 'limit-container-width' + = render "layouts/flash" %div{ class: "#{container_class} limit-container-width" } .content{ id: "content-body" } - .card - .card-header + .gl-card + .gl-card-header = brand_header_logo - logo_text = brand_header_logo_type - if logo_text.present? diff --git a/app/views/notify/in_product_marketing_email.html.haml b/app/views/notify/in_product_marketing_email.html.haml index 6382718480f..a85fa7c519f 100644 --- a/app/views/notify/in_product_marketing_email.html.haml +++ b/app/views/notify/in_product_marketing_email.html.haml @@ -166,10 +166,11 @@ = about_link('mailers/in_product_marketing/gitlab-logo-gray-rgb.png', 200) %tr %td{ "aria-hidden" => "true", height: "30", style: "font-size: 0; line-height: 0;" } - %tr{ style: "background-color: #ffffff;" } - %td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" } - %p - = @message.progress.html_safe + - if @message.series? + %tr{ style: "background-color: #ffffff;" } + %td{ style: "color: #424242; padding: 10px 30px; text-align: center; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;font-size: 16px; line-height: 22px; border: 1px solid #dddddd" } + %p + = @message.progress.html_safe %tr %td{ bgcolor: "#ffffff", height: "auto", style: "max-width: 600px; width: 100%; text-align: center; height: 200px; padding: 25px 15px; mso-line-height-rule: exactly; min-height: 40px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;", valign: "middle", width: "100%" } = inline_image_link(@message.logo_path, { width: '150', style: 'width: 150px;' }) @@ -210,6 +211,12 @@ %td{ style: "padding: 10px 20px 30px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif; color:#000000; font-size: 18px; line-height: 24px;" } %p{ style: "margin: 0 0 50px 0;" } = @message.feedback_thanks + - if @message.invite_members? + %tr + %td{ align: "center", style: "padding: 0 20px 80px 20px; font-family: 'Source Sans Pro', helvetica, arial, sans-serif;" } + = @message.invite_text + %br + = @message.invite_link %tr{ style: "background-color: #ffffff;" } %td{ align: "center", style: "padding:75px 20px 25px;" } = about_link('gitlab_logo.png', 80) diff --git a/app/views/notify/in_product_marketing_email.text.erb b/app/views/notify/in_product_marketing_email.text.erb index 6f0a2efa410..79a366eb1cc 100644 --- a/app/views/notify/in_product_marketing_email.text.erb +++ b/app/views/notify/in_product_marketing_email.text.erb @@ -21,6 +21,10 @@ <%= @message.feedback_thanks %> <% end %> +<% if @message.invite_members? %> +<%= @message.invite_text %> +<%= @message.invite_link %> +<% end %> diff --git a/app/views/notify/member_access_denied_email.html.haml b/app/views/notify/member_access_denied_email.html.haml index 11661a423dd..eeef66d353d 100644 --- a/app/views/notify/member_access_denied_email.html.haml +++ b/app/views/notify/member_access_denied_email.html.haml @@ -2,6 +2,11 @@ %td.text-content %p Your request to join the - #{link_to member_source.human_name, member_source.web_url, class: :highlight} #{member_source.model_name.singular} - has been #{content_tag :span, 'denied', class: :highlight}. + + - if @source_hidden + #{content_tag :span, 'Hidden', class: :highlight} + - else + #{link_to member_source.human_name, member_source.web_url, class: :highlight} + + #{member_source.model_name.singular} has been #{content_tag :span, 'denied', class: :highlight}. diff --git a/app/views/notify/member_access_granted_email.html.haml b/app/views/notify/member_access_granted_email.html.haml index e28a10a243f..cce36f7b8a6 100644 --- a/app/views/notify/member_access_granted_email.html.haml +++ b/app/views/notify/member_access_granted_email.html.haml @@ -8,7 +8,11 @@ %td.text-content %p = _('You have been granted %{access_level} access to the %{source_link} %{source_type}.').html_safe % { access_level: access_level, source_link: source_link, source_type: source_type } + - if member.tasks_to_be_done.present? + = s_("InviteEmail|You were assigned the following tasks:") + %ul.list-style-position-inside + - member.tasks_to_be_done.each do |task| + %li= localized_tasks_to_be_done_choices[task] %p - leave_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: leave_link } = _('If this was a mistake you can %{leave_link_start}leave the %{source_type}%{link_end}.').html_safe % { source_type: source_type, leave_link_start: leave_link_start, link_end: link_end } - diff --git a/app/views/notify/member_invited_email.html.haml b/app/views/notify/member_invited_email.html.haml index 5489a2ac6a1..1d1f696e1b2 100644 --- a/app/views/notify/member_invited_email.html.haml +++ b/app/views/notify/member_invited_email.html.haml @@ -24,6 +24,11 @@ %p - if member.created_by = html_escape(s_("InviteEmail|%{inviter} invited you to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders.merge({ inviter: (link_to inviter_name, user_url(member.created_by)).html_safe }) + - if member.tasks_to_be_done.present? + = s_("InviteEmail|and has assigned you the following tasks:") + %ul.list-style-position-inside + - member.tasks_to_be_done.each do |task| + %li= localized_tasks_to_be_done_choices[task] - else = html_escape(s_("InviteEmail|You are invited to join the %{strong_start}%{project_or_group_name}%{strong_end}%{br_tag}%{project_or_group} as a %{role}")) % placeholders %p.invite-actions diff --git a/app/views/profiles/_event_table.html.haml b/app/views/profiles/_event_table.html.haml index f74902a3c3b..67c649a9fce 100644 --- a/app/views/profiles/_event_table.html.haml +++ b/app/views/profiles/_event_table.html.haml @@ -3,10 +3,11 @@ %ul.content-list - events.each do |event| - %li - %span.description - = audit_icon(event.details[:with], css_class: 'gl-mr-2') - = _('Signed in with %{authentication} authentication') % { authentication: event.details[:with]} - %span.float-right= time_ago_with_tooltip(event.created_at) + - if event.success? + %li + %span.description + = audit_icon('key', css_class: 'gl-mr-2') + = _('Signed in with %{authentication} authentication') % { authentication: event.provider } + %span.float-right= time_ago_with_tooltip(event.created_at) = paginate events, theme: "gitlab" diff --git a/app/views/profiles/audit_log.html.haml b/app/views/profiles/audit_log.html.haml index aec855c790e..4bbb4a21b39 100644 --- a/app/views/profiles/audit_log.html.haml +++ b/app/views/profiles/audit_log.html.haml @@ -6,6 +6,6 @@ %h4.gl-mt-0 = page_title %p - = _('This is a security log of important events involving your account.') + = _('This is a security log of authentication events involving your account.') .col-lg-8 = render 'event_table', events: @events diff --git a/app/views/profiles/emails/index.html.haml b/app/views/profiles/emails/index.html.haml index 35bdfbb1c29..0cfe65994da 100644 --- a/app/views/profiles/emails/index.html.haml +++ b/app/views/profiles/emails/index.html.haml @@ -44,7 +44,7 @@ %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Public email') - if @primary_email === current_user.notification_email_or_default %span.badge.badge-muted.badge-pill.gl-badge.badge-info= s_('Profiles|Default notification email') - - @emails.each do |email| + - @emails.reject(&:user_primary_email?).each do |email| %li{ data: { qa_selector: 'email_row_content' } } = render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? } %span.float-right diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index 3e41f107e04..b1470520eea 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -71,7 +71,7 @@ placeholder: s_("Profiles|What's your status?") .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') + .gl-text-gray-600.gl-ml-5= s_('Profiles|An indicator appears next to your name and avatar') .col-lg-12 %hr .row.user-time-preferences.js-search-settings-section diff --git a/app/views/profiles/two_factor_auths/show.html.haml b/app/views/profiles/two_factor_auths/show.html.haml index 00df8608957..0eae3c95bf6 100644 --- a/app/views/profiles/two_factor_auths/show.html.haml +++ b/app/views/profiles/two_factor_auths/show.html.haml @@ -43,7 +43,9 @@ .gl-alert.gl-alert-danger.gl-mb-5 .gl-alert-container .gl-alert-content - = @error + %p.gl-alert-body.gl-md-0 + = @error[:message] + = link_to _('Try the troubleshooting steps here.'), help_page_path('user/profile/account/two_factor_authentication.md', anchor: 'troubleshooting'), target: '_blank', rel: 'noopener noreferrer' .form-group = label_tag :pin_code, _('Pin code'), class: "label-bold" = text_field_tag :pin_code, nil, class: "form-control gl-form-input", required: true, data: { qa_selector: 'pin_code_field' } diff --git a/app/views/projects/_invite_members_side_nav_link.html.haml b/app/views/projects/_invite_members_side_nav_link.html.haml new file mode 100644 index 00000000000..ea6174d19f0 --- /dev/null +++ b/app/views/projects/_invite_members_side_nav_link.html.haml @@ -0,0 +1,8 @@ +.js-invite-members-trigger{ data: { trigger_source: 'project-side-nav', + classes: 'gl-text-decoration-none! gl-shadow-none! gl-text-body!', + icon: 'users', + display_text: title, + trigger_element: 'side-nav'} } + += render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } += render 'projects/invite_members_modal', project: project diff --git a/app/views/projects/_merge_request_merge_commit_template.html.haml b/app/views/projects/_merge_request_merge_commit_template.html.haml new file mode 100644 index 00000000000..185b730e0bb --- /dev/null +++ b/app/views/projects/_merge_request_merge_commit_template.html.haml @@ -0,0 +1,17 @@ +- form = local_assigns.fetch(:form) + +.form-group + %b= s_('ProjectSettings|Merge commit message template') + %p.text-secondary + - configure_the_merge_commit_message_help_link_url = help_page_path('user/project/merge_requests/commit_templates.md', anchor: 'merge-commit-message-template') + - configure_the_merge_commit_message_help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: configure_the_merge_commit_message_help_link_url } + = s_('ProjectSettings|The commit message used when merging, if the merge method creates a merge commit. %{link_start}Learn more about syntax and variables.%{link_end}').html_safe % { link_start: configure_the_merge_commit_message_help_link_start, link_end: '</a>'.html_safe } + .mb-2 + - default_merge_commit_template = "Merge branch '%{source_branch}' into '%{target_branch}'\n\n%{title}\n\n%{issues}\n\nSee merge request %{reference}" + = form.text_area :merge_commit_template, class: 'form-control gl-form-input', rows: 8, maxlength: 500, placeholder: default_merge_commit_template + %p.form-text.text-muted + = s_('ProjectSettings|Maximum 500 characters.') + = s_('ProjectSettings|Supported variables:') + - Gitlab::MergeRequests::MergeCommitMessage::PLACEHOLDERS.keys.each do |placeholder| + %code + = "%{#{placeholder}}".html_safe diff --git a/app/views/projects/_merge_request_settings.html.haml b/app/views/projects/_merge_request_settings.html.haml index f595b4f709b..c5a25bec6eb 100644 --- a/app/views/projects/_merge_request_settings.html.haml +++ b/app/views/projects/_merge_request_settings.html.haml @@ -10,5 +10,7 @@ = render 'projects/merge_request_merge_suggestions_settings', project: @project, form: form += render 'projects/merge_request_merge_commit_template', project: @project, form: form + - if @project.forked? = render 'projects/merge_request_target_project_settings', project: @project, form: form diff --git a/app/views/projects/_new_project_fields.html.haml b/app/views/projects/_new_project_fields.html.haml index 256c3ebad0a..c21240b340c 100644 --- a/app/views/projects/_new_project_fields.html.haml +++ b/app/views/projects/_new_project_fields.html.haml @@ -40,12 +40,17 @@ .form-group.project-path.col-sm-6 = f.label :path, class: 'label-bold' do %span= _("Project slug") - = f.text_field :path, placeholder: "my-awesome-project", class: "form-control gl-form-input", required: true, aria: { required: true } + = f.text_field :path, placeholder: "my-awesome-project", class: "form-control gl-form-input", required: true, aria: { required: true }, data: { username: current_user.username } - if current_user.can_create_group? .form-text.text-muted - link_start_group_path = '<a href="%{path}">' % { path: new_group_path } - project_tip = s_('ProjectsNew|Want to house several dependent projects under the same namespace? %{link_start}Create a group.%{link_end}') % { link_start: link_start_group_path, link_end: '</a>' } = project_tip.html_safe +.gl-alert.gl-alert-success.gl-mb-4.gl-display-none.js-user-readme-repo + = sprite_icon('check-circle', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-body + - help_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/profile/index', anchor: 'user-profile-readme') } + = html_escape(_('%{project_path} is a project that you can use to add a README to your GitLab profile. Create a public project and initialize the repository with a README to get started. %{help_link_start}Learn more.%{help_link_end}')) % { project_path: "<strong>#{current_user.username} / #{current_user.username}</strong>".html_safe, help_link_start: help_link_start, help_link_end: '</a>'.html_safe } .form-group = f.label :description, class: 'label-bold' do @@ -72,7 +77,7 @@ - e.try do .form-group .form-check.gl-mb-3 - = check_box_tag 'project[initialize_with_sast]', '1', true, class: 'form-check-input', data: { track_experiment: e.name, track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } + = check_box_tag 'project[initialize_with_sast]', '1', true, class: 'form-check-input', data: { qa_selector: 'initialize_with_sast_checkbox', track_experiment: e.name, track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } = label_tag 'project[initialize_with_sast]', class: 'form-check-label' do = s_('ProjectsNew|Enable Static Application Security Testing (SAST)') .form-text.text-muted @@ -81,7 +86,7 @@ - e.try(:free_indicator) do .form-group .form-check.gl-mb-3 - = check_box_tag 'project[initialize_with_sast]', '1', true, class: 'form-check-input', data: { track_experiment: e.name, track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } + = check_box_tag 'project[initialize_with_sast]', '1', true, class: 'form-check-input', data: { qa_selector: 'initialize_with_sast_checkbox', track_experiment: e.name, track_label: track_label, track_action: 'activate_form_input', track_property: 'init_with_sast' } = label_tag 'project[initialize_with_sast]', class: 'form-check-label' do = s_('ProjectsNew|Enable Static Application Security Testing (SAST)') %span.badge.badge-info.badge-pill.gl-badge.sm= _('Free') diff --git a/app/views/projects/_remove.html.haml b/app/views/projects/_remove.html.haml index cb0ec9f19c8..815e76ebcb9 100644 --- a/app/views/projects/_remove.html.haml +++ b/app/views/projects/_remove.html.haml @@ -1,4 +1,6 @@ - return unless can?(current_user, :remove_project, project) +- merge_requests_count = Projects::AllMergeRequestsCountService.new(project).count +- issues_count = Projects::AllIssuesCountService.new(project).count .sub-section %h4.danger-title= _('Delete project') @@ -7,4 +9,4 @@ = link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'removing-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer' %p %strong= _('Deleted projects cannot be restored!') - #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: project.path } } + #js-project-delete-button{ data: { form_path: project_path(project), confirm_phrase: delete_confirm_phrase(project), is_fork: project.forked?.to_s, issues_count: number_with_delimiter(issues_count), merge_requests_count: number_with_delimiter(merge_requests_count), forks_count: number_with_delimiter(project.forks_count), stars_count: number_with_delimiter(project.star_count) } } diff --git a/app/views/projects/_remove_fork.html.haml b/app/views/projects/_remove_fork.html.haml index 8fa21966683..92eb29dc407 100644 --- a/app/views/projects/_remove_fork.html.haml +++ b/app/views/projects/_remove_fork.html.haml @@ -8,4 +8,4 @@ %p %strong= _('Once removed, the fork relationship cannot be restored. This project will no longer be able to receive or send merge requests to the source project or other forks.') = link_to _('Learn more.'), help_page_path('user/project/settings/index', anchor: 'removing-a-fork-relationship'), target: '_blank', rel: 'noopener noreferrer' - = button_to _('Remove fork relationship'), '#', class: "gl-button btn btn-danger js-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } + = button_to _('Remove fork relationship'), '#', class: "gl-button btn btn-danger js-legacy-confirm-danger", data: { "confirm-danger-message" => remove_fork_project_warning_message(@project) } diff --git a/app/views/projects/_service_desk_settings.html.haml b/app/views/projects/_service_desk_settings.html.haml index 7b345941cf7..63cf4dfe0ab 100644 --- a/app/views/projects/_service_desk_settings.html.haml +++ b/app/views/projects/_service_desk_settings.html.haml @@ -14,8 +14,9 @@ custom_email: (@project.service_desk_custom_address if @project.service_desk_enabled), custom_email_enabled: "#{Gitlab::ServiceDeskEmail.enabled?}", selected_template: "#{@project.service_desk_setting&.issue_template_key}", + selected_file_template_project_id: "#{@project.service_desk_setting&.file_template_project_id}", outgoing_name: "#{@project.service_desk_setting&.outgoing_name}", project_key: "#{@project.service_desk_setting&.project_key}", - templates: issuable_templates_names(Issue.new) } } + templates: available_service_desk_templates_for(@project) } } - elsif show_callout?('promote_service_desk_dismissed') = render 'shared/promotions/promote_servicedesk' diff --git a/app/views/projects/_transfer.html.haml b/app/views/projects/_transfer.html.haml index ee717c2deca..e48008e1cc6 100644 --- a/app/views/projects/_transfer.html.haml +++ b/app/views/projects/_transfer.html.haml @@ -14,4 +14,4 @@ = label_tag :new_namespace_id, _('Select a new namespace'), class: 'gl-font-weight-bold' .form-group = select_tag :new_namespace_id, namespaces_options(nil), include_blank: true, class: 'select2' - = f.submit 'Transfer project', class: "gl-button btn btn-danger js-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } + = f.submit 'Transfer project', class: "gl-button btn btn-danger js-legacy-confirm-danger qa-transfer-button", data: { "confirm-danger-message" => transfer_project_message(@project) } diff --git a/app/views/projects/_visibility_modal.html.haml b/app/views/projects/_visibility_modal.html.haml index f75216a71b6..db98b978f04 100644 --- a/app/views/projects/_visibility_modal.html.haml +++ b/app/views/projects/_visibility_modal.html.haml @@ -20,10 +20,10 @@ %li = _("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-legacy-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' + = text_field_tag 'confirm_path_input', '', class: 'form-control js-legacy-confirm-danger-input qa-confirm-input' .form-actions %button.btn.gl-button.btn-default.gl-mr-4{ type: "button", "data-dismiss": "modal" } = _('Cancel') - = submit_tag _('Reduce project visibility'), class: "btn gl-button btn-danger js-confirm-danger-submit qa-confirm-button", disabled: true + = submit_tag _('Reduce project visibility'), class: "btn gl-button btn-danger js-legacy-confirm-danger-submit qa-confirm-button", disabled: true diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 30c052e054f..704576619a7 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -20,7 +20,7 @@ %span.legend-box.legend-box-9 %span.right-label Older - .table-responsive.file-content.blame.code.js-syntax-highlight + .table-responsive.file-content.blame.code{ class: user_color_scheme } %table - current_line = 1 - @blame.groups.each do |blame_group| diff --git a/app/views/projects/blob/_header.html.haml b/app/views/projects/blob/_header.html.haml index d7668dd1c91..dad4ea205b4 100644 --- a/app/views/projects/blob/_header.html.haml +++ b/app/views/projects/blob/_header.html.haml @@ -10,7 +10,7 @@ = edit_blob_button(@project, @ref, @path, blob: blob) = ide_edit_button(@project, @ref, @path, blob: blob) - if can_view_pipeline_editor?(@project) && @path == @project.ci_config_path_or_default - = link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project), class: "btn gl-button btn-confirm-secondary gl-ml-3" + = link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project, branch_name: @ref), class: "btn gl-button btn-confirm-secondary gl-ml-3" .btn-group{ role: "group", class: ("gl-ml-3" if current_user) }> = render_if_exists 'projects/blob/header_file_locks_link' - if current_user diff --git a/app/views/projects/blob/edit.html.haml b/app/views/projects/blob/edit.html.haml index ecbef9a11a7..8378ce2c7e5 100644 --- a/app/views/projects/blob/edit.html.haml +++ b/app/views/projects/blob/edit.html.haml @@ -16,14 +16,10 @@ %h3.page-title.blob-edit-page-title Edit file .file-editor - %ul.nav-links.no-bottom.js-edit-mode.nav.nav-tabs - %li.active - = link_to '#editor' do - Write + = gl_tabs_nav({ class: 'js-edit-mode nav-links gl-border-0'}) do + = gl_tab_link_to _('Write'), '#editor', { tab_class: 'active' } - %li - = link_to '#preview', 'data-preview-url' => project_preview_blob_path(@project, @id) do - = editing_preview_title(@blob.name) + = gl_tab_link_to editing_preview_title(@blob.name), '#preview', { data: { 'preview-url': project_preview_blob_path(@project, @id) } } = form_tag(project_update_blob_path(@project, @id), method: :put, class: 'js-quick-submit js-requires-input js-edit-blob-form', data: blob_editor_paths(@project)) do = render 'projects/blob/editor', ref: @ref, path: @path, blob_data: @blob.data diff --git a/app/views/projects/blob/viewers/_changelog.html.haml b/app/views/projects/blob/viewers/_changelog.html.haml index cac858c1444..5f3b9285ea9 100644 --- a/app/views/projects/blob/viewers/_changelog.html.haml +++ b/app/views/projects/blob/viewers/_changelog.html.haml @@ -1,3 +1,3 @@ = sprite_icon('history', css_class: 'gl-mr-1 gl-vertical-align-text-bottom') = succeed '.' do - = _("To find the state of this project's repository at the time of any of these versions, check out %{link_start}the tags%{link_end}.").html_safe % { link_start: "<a href='#{project_tags_path(viewer.project)}'>".html_safe, link_end: "</a>".html_safe } + = _("To find the state of this project's repository at the time of any of these versions, check out %{link_start}the tags%{link_end}").html_safe % { link_start: "<a href='#{project_tags_path(viewer.project)}'>".html_safe, link_end: "</a>".html_safe } diff --git a/app/views/projects/blob/viewers/_readme.html.haml b/app/views/projects/blob/viewers/_readme.html.haml index e06ff4edf71..c07428f0337 100644 --- a/app/views/projects/blob/viewers/_readme.html.haml +++ b/app/views/projects/blob/viewers/_readme.html.haml @@ -1,4 +1,4 @@ = sprite_icon('information-o', css_class: 'gl-vertical-align-middle! gl-mr-2') = succeed '.' do - link_to_wiki = link_to(_("the wiki"), wiki_path(viewer.project.wiki)) - = _("To learn more about this project, read %{link_to_wiki}.").html_safe % { link_to_wiki: link_to_wiki } + = _("To learn more about this project, read %{link_to_wiki}").html_safe % { link_to_wiki: link_to_wiki } diff --git a/app/views/projects/branches/_branch.html.haml b/app/views/projects/branches/_branch.html.haml index 99a9535b8e8..be6efa310b9 100644 --- a/app/views/projects/branches/_branch.html.haml +++ b/app/views/projects/branches/_branch.html.haml @@ -23,7 +23,7 @@ - if commit = render 'projects/branches/commit', commit: commit, project: @project - else - = s_('Branches|Cant find HEAD commit for this branch') + = s_('Branches|Can’t find HEAD commit for this branch') - if branch.name != @repository.root_ref .js-branch-divergence-graph diff --git a/app/views/projects/commit/_ci_menu.html.haml b/app/views/projects/commit/_ci_menu.html.haml index 41f5fb3dcbd..60a79456c36 100644 --- a/app/views/projects/commit/_ci_menu.html.haml +++ b/app/views/projects/commit/_ci_menu.html.haml @@ -1,12 +1,10 @@ - any_pipelines = @commit.present(current_user: current_user).any_pipelines? -%ul.nav-links.no-top.no-bottom.commit-ci-menu.nav.nav-tabs - = nav_link(path: 'commit#show') do - = link_to project_commit_path(@project, @commit.id) do - = _('Changes') - %span.badge.badge-pill= @diffs.size += gl_tabs_nav({ class: 'commit-ci-menu gl-display-flex gl-flex-grow-1'}) do + = gl_tab_link_to project_commit_path(@project, @commit.id) do + = _('Changes') + = gl_tab_counter_badge(@diffs.size) - if any_pipelines - = nav_link(path: 'commit#pipelines') do - = link_to pipelines_project_commit_path(@project, @commit.id) do - = _('Pipelines') - %span.badge.badge-pill.js-pipelines-mr-count= @commit.pipelines.size + = gl_tab_link_to pipelines_project_commit_path(@project, @commit.id) do + = _('Pipelines') + = gl_tab_counter_badge(@commit.pipelines.size, { class: 'js-pipelines-mr-count' }) diff --git a/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml b/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml new file mode 100644 index 00000000000..74515438af2 --- /dev/null +++ b/app/views/projects/commit/_multiple_signatures_signature_badge.html.haml @@ -0,0 +1,6 @@ +- title = capture do + = html_escape(_('This commit was signed with %{strong_open}multiple%{strong_close} signatures.')) % { strong_open: '<strong>'.html_safe, strong_close: '</strong>'.html_safe } + +- locals = { signature: signature, title: title, label: _('Unverified'), css_class: 'invalid', icon: 'status_notfound_borderless' } + += render partial: 'projects/commit/signature_badge', locals: locals diff --git a/app/views/projects/confluences/show.html.haml b/app/views/projects/confluences/show.html.haml index cf4e39f9659..413de90b67b 100644 --- a/app/views/projects/confluences/show.html.haml +++ b/app/views/projects/confluences/show.html.haml @@ -6,9 +6,8 @@ = s_('WikiEmpty|Confluence is enabled') %p - wiki_confluence_epic_link_url = 'https://gitlab.com/groups/gitlab-org/-/epics/3629' - - wiki_confluence_epic_link_start = format('<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe, url: wiki_confluence_epic_link_url) - = format(s_("WikiEmpty|You've enabled the Confluence Workspace integration. Your wiki will be viewable directly within Confluence. We are hard at work integrating Confluence more seamlessly into GitLab. If you'd like to stay up to date, follow our %{wiki_confluence_epic_link_start}Confluence epic%{wiki_confluence_epic_link_end}.").html_safe, wiki_confluence_epic_link_start: wiki_confluence_epic_link_start, wiki_confluence_epic_link_end: '</a>'.html_safe) + - wiki_confluence_epic_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wiki_confluence_epic_link_url } + = html_escape(s_("WikiEmpty|You've enabled the Confluence Workspace integration. Your wiki will be viewable directly within Confluence. We are hard at work integrating Confluence more seamlessly into GitLab. If you'd like to stay up to date, follow our %{wiki_confluence_epic_link_start}Confluence epic%{wiki_confluence_epic_link_end}.")) % { wiki_confluence_epic_link_start: wiki_confluence_epic_link_start, wiki_confluence_epic_link_end: '</a>'.html_safe } = link_to @project.confluence_integration.confluence_url, target: '_blank', rel: 'noopener noreferrer', class: 'gl-button btn btn-success external-url', title: s_('WikiEmpty|Go to Confluence') do - = sprite_icon('external-link') = s_('WikiEmpty|Go to Confluence') - + = sprite_icon('external-link') diff --git a/app/views/projects/cycle_analytics/show.html.haml b/app/views/projects/cycle_analytics/show.html.haml index f398ac6ede7..ba79f0ee3cb 100644 --- a/app/views/projects/cycle_analytics/show.html.haml +++ b/app/views/projects/cycle_analytics/show.html.haml @@ -1,4 +1,6 @@ - page_title _("Value Stream Analytics") +- data_attributes = @request_params.valid? ? @request_params.to_data_attributes : {} +- data_attributes.merge!(cycle_analytics_initial_data(@project, @group)) - add_page_specific_style 'page_bundles/cycle_analytics' -#js-cycle-analytics{ data: cycle_analytics_initial_data(@project, @group) } +#js-cycle-analytics{ data: data_attributes } diff --git a/app/views/projects/deployments/_deployment.html.haml b/app/views/projects/deployments/_deployment.html.haml index 57dfcb8cf4a..f18574c3ad5 100644 --- a/app/views/projects/deployments/_deployment.html.haml +++ b/app/views/projects/deployments/_deployment.html.haml @@ -6,7 +6,7 @@ .table-section.section-10{ role: 'gridcell' } .table-mobile-header{ role: 'rowheader' }= _("ID") - %strong.table-mobile-content ##{deployment.iid} + %strong.table-mobile-content{ data: { testid: 'deployment-id' } } ##{deployment.iid} .table-section.section-10{ role: 'gridcell' } .table-mobile-header{ role: 'rowheader' }= _("Triggerer") diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 926a0610577..6421aef14cf 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -23,7 +23,7 @@ .js-project-permissions-form - if show_visibility_confirm_modal?(@project) = render "visibility_modal" - = f.submit _('Save changes'), class: "btn gl-button btn-confirm #{('js-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } + = f.submit _('Save changes'), class: "btn gl-button btn-confirm #{('js-legacy-confirm-danger' if show_visibility_confirm_modal?(@project))}", data: { qa_selector: 'visibility_features_permissions_save_button', check_field_name: ("project[visibility_level]" if show_visibility_confirm_modal?(@project)), check_compare_value: @project.visibility_level } %section.rspec-merge-request-settings.settings.merge-requests-feature.no-animate#js-merge-request-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)], data: { qa_selector: 'merge_request_settings_content' } } .settings-header diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml index 905794c0730..c3fbf774faa 100644 --- a/app/views/projects/empty.html.haml +++ b/app/views/projects/empty.html.haml @@ -77,5 +77,5 @@ git push -u origin --all git push -u origin --tags -- if @project.empty_repo_upload_experiment? +- if @project.upload_anchor_data.present? = render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, default_branch_name), ref: default_branch_name, method: :post diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 0136184f80d..72ccc8d830c 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -1,10 +1,19 @@ - page_title _("Environments") -- add_page_specific_style 'page_bundles/environments' -#environments-list-view{ data: { environments_data: environments_list_data, - "can-read-environment" => can?(current_user, :read_environment, @project).to_s, - "can-create-environment" => can?(current_user, :create_environment, @project).to_s, - "new-environment-path" => new_project_environment_path(@project), - "help-page-path" => help_page_path("ci/environments/index.md"), - "project-path" => @project.full_path, - "default-branch-name" => @project.default_branch_or_main } } +- if Feature.enabled?(:new_environments_table) + #environments-table{ data: { endpoint: project_environments_path(@project, format: :json), + "can-read-environment" => can?(current_user, :read_environment, @project).to_s, + "can-create-environment" => can?(current_user, :create_environment, @project).to_s, + "new-environment-path" => new_project_environment_path(@project), + "help-page-path" => help_page_path("ci/environments/index.md"), + "project-path" => @project.full_path, + "default-branch-name" => @project.default_branch_or_main } } +- else + - add_page_specific_style 'page_bundles/environments' + #environments-list-view{ data: { environments_data: environments_list_data, + "can-read-environment" => can?(current_user, :read_environment, @project).to_s, + "can-create-environment" => can?(current_user, :create_environment, @project).to_s, + "new-environment-path" => new_project_environment_path(@project), + "help-page-path" => help_page_path("ci/environments/index.md"), + "project-path" => @project.full_path, + "default-branch-name" => @project.default_branch_or_main } } diff --git a/app/views/projects/google_cloud/index.html.haml b/app/views/projects/google_cloud/index.html.haml index 4fc66e17810..69e481501d5 100644 --- a/app/views/projects/google_cloud/index.html.haml +++ b/app/views/projects/google_cloud/index.html.haml @@ -3,81 +3,4 @@ - @content_class = "limit-container-width" unless fluid_layout -#js-google-cloud - - %h1.gl-font-size-h1 Google Cloud - - %section#js-section-google-cloud-service-accounts - - %h2.gl-font-size-h2 Service Accounts - - %p= _('Service Accounts keys are required to authorize GitLab to deploy your Google Cloud project.') - - %table.table.b-table.gl-table - - %thead - %tr - %th Environment - %th GCP Project ID - %th Service Account Key - - %tbody - - %tr - %td * - %td serving-salutes-453 - %td ..... - - %tr - %td production - %td crimson-corey-234 - %td ..... - - %tr - %td review/* - %td roving-river-379 - %td ..... - - %a.gl-button.btn.btn-primary= _('Add new service account') - - %br - - %section#js-section-google-cloud-deployments - - .row.row-fluid - - .col-lg-4 - %h2.gl-font-size-h2 Deployments - %p= _('Google Cloud offers several deployment targets. Select the one most suitable for your project.') - %p - = _('Deployments to Google Kubernetes Engine can be ') - %a{ href: '#' }= _('managed') - = _('in Infrastructure :: Kubernetes clusters') - - .col-lg-8 - - %br - - .gl-card.gl-mb-6 - .gl-card-body - .gl-display-flex.gl-align-items-baseline - %strong.gl-font-lg App Engine - .gl-ml-auto.gl-text-gray-500 Disabled - %p= _('App Engine description and apps that are suitable for this deployment target') - %button.gl-button.btn.btn-default= _('Configure via Merge Request') - - .gl-card.gl-mb-6 - .gl-card-body - .gl-display-flex.gl-align-items-baseline - %strong.gl-font-lg Cloud Functions - .gl-ml-auto.gl-text-gray-500 Disabled - %p= _('Cloud Functions description and apps that are suitable for this deployment target') - %button.gl-button.btn.btn-default= _('Configure via Merge Request') - - .gl-card.gl-mb-6 - .gl-card-body - .gl-display-flex.gl-align-items-baseline - %strong.gl-font-lg Cloud Run - .gl-ml-auto.gl-text-gray-500 Disabled - %p= _('Cloud Run description and apps that are suitable for this deployment target') - %button.gl-button.btn.btn-default= _('Configure via Merge Request') +#js-google-cloud{ data: @js_data } diff --git a/app/views/projects/hook_logs/show.html.haml b/app/views/projects/hook_logs/show.html.haml index 86dfa1929d6..f6861e4119e 100644 --- a/app/views/projects/hook_logs/show.html.haml +++ b/app/views/projects/hook_logs/show.html.haml @@ -2,11 +2,11 @@ - add_to_breadcrumbs _('Webhook Settings'), namespace_project_hooks_path - page_title _('Webhook Logs') -.row.gl-mt-3.gl-mb-3 - .col-lg-3 - %h4.gl-mt-0 - = _("Request details") - .col-lg-9 - = link_to _('Resend Request'), @hook_log.present.retry_path, method: :post, class: "btn gl-button btn-default float-right gl-ml-3" - - = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } +%h3.page-title + = _("Request details") + +%hr + += link_to _("Resend Request"), @hook_log.present.retry_path, method: :post, class: "btn gl-button btn-default float-right gl-ml-3" + += render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } diff --git a/app/views/projects/issues/_discussion.html.haml b/app/views/projects/issues/_discussion.html.haml index 2fbaa5812c0..f1c19756474 100644 --- a/app/views/projects/issues/_discussion.html.haml +++ b/app/views/projects/issues/_discussion.html.haml @@ -1,5 +1,4 @@ -- add_page_startup_api_call discussions_path(@issue) -- add_page_startup_api_call notes_url +- add_page_startup_api_call Feature.enabled?(:paginated_issue_discussions, @project, default_enabled: :yaml) ? discussions_path(@issue, per_page: 20) : discussions_path(@issue) - @gfm_form = true diff --git a/app/views/projects/issues/_issues.html.haml b/app/views/projects/issues/_issues.html.haml index e4d072a9472..1ab51df6d24 100644 --- a/app/views/projects/issues/_issues.html.haml +++ b/app/views/projects/issues/_issues.html.haml @@ -1,5 +1,5 @@ - is_project_overview = local_assigns.fetch(:is_project_overview, false) -= render 'shared/alerts/positioning_disabled' += render 'shared/alerts/positioning_disabled' if @sort == 'relative_position' - if Feature.enabled?(:vue_issuables_list, @project) && !is_project_overview - data_endpoint = local_assigns.fetch(:data_endpoint, expose_path(api_v4_projects_issues_path(id: @project.id))) diff --git a/app/views/projects/issues/_service_desk_empty_state.html.haml b/app/views/projects/issues/_service_desk_empty_state.html.haml index a4251c8e5dc..afeb2a23ea2 100644 --- a/app/views/projects/issues/_service_desk_empty_state.html.haml +++ b/app/views/projects/issues/_service_desk_empty_state.html.haml @@ -16,7 +16,7 @@ = s_("ServiceDesk|Your users can send emails to this address:") %code= @project.service_desk_address - %span= s_("ServiceDesk|Issues created from Service Desk emails appear here. Each comment becomes part of the email conversation.") + %span= s_("ServiceDesk|Issues created from Service Desk emails will appear here. Each comment becomes part of the email conversation.") = link_to _('Learn more.'), help_page_path('user/project/service_desk') - if can_edit_project_settings && !service_desk_enabled diff --git a/app/views/projects/issues/_service_desk_info_content.html.haml b/app/views/projects/issues/_service_desk_info_content.html.haml index 448a341eba6..f0ec68ba54b 100644 --- a/app/views/projects/issues/_service_desk_info_content.html.haml +++ b/app/views/projects/issues/_service_desk_info_content.html.haml @@ -1,16 +1,17 @@ - service_desk_enabled = @project.service_desk_enabled? - can_edit_project_settings = can?(current_user, :admin_project, @project) +- can_admin_issues = can?(current_user, :admin_issue, @project) - title_text = s_("ServiceDesk|Use Service Desk to connect with your users and offer customer support through email right inside GitLab") .non-empty-state.media .svg-content - = render 'shared/empty_states/icons/service_desk_callout.svg' + = render partial: 'shared/empty_states/icons/service_desk_callout', formats: :svg .gl-mt-3.gl-ml-3 %h5= title_text - - if can_edit_project_settings && service_desk_enabled + - if can_admin_issues && service_desk_enabled %p = s_("ServiceDesk|Your users can send emails to this address:") %code= @project.service_desk_address diff --git a/app/views/projects/learn_gitlab/index.html.haml b/app/views/projects/learn_gitlab/index.html.haml index 4935b72d3fa..9b17be99da0 100644 --- a/app/views/projects/learn_gitlab/index.html.haml +++ b/app/views/projects/learn_gitlab/index.html.haml @@ -1,5 +1,12 @@ - breadcrumb_title _("Learn GitLab") - page_title _("Learn GitLab") - add_page_specific_style 'page_bundles/learn_gitlab' +- data = learn_gitlab_data(@project) +- invite_members_open = session.delete(:confetti_post_signup) -#js-learn-gitlab-app{ data: { actions: onboarding_actions_data(@project).to_json, sections: onboarding_sections_data.to_json } } +- experiment(:confetti_post_signup, actor: current_user) do |e| + - e.control do + #js-learn-gitlab-app{ data: data } + - e.candidate do + = render 'projects/invite_members_modal', project: @project + #js-learn-gitlab-app{ data: data.merge(invite_members_open: invite_members_open) } diff --git a/app/views/projects/merge_requests/_widget.html.haml b/app/views/projects/merge_requests/_widget.html.haml index 459742c3b81..0c8af873095 100644 --- a/app/views/projects/merge_requests/_widget.html.haml +++ b/app/views/projects/merge_requests/_widget.html.haml @@ -14,8 +14,8 @@ window.gl.mrWidgetData.pipeline_must_succeed_docs_path = '#{help_page_path('user/project/merge_requests/merge_when_pipeline_succeeds.md', anchor: 'only-allow-merge-requests-to-be-merged-if-the-pipeline-succeeds')}'; window.gl.mrWidgetData.security_approvals_help_page_path = '#{help_page_path('user/application_security/index.md', anchor: 'security-approvals-in-merge-requests')}'; window.gl.mrWidgetData.license_compliance_docs_path = '#{help_page_path('user/compliance/license_compliance/index.md', anchor: 'policies')}'; - window.gl.mrWidgetData.eligible_approvers_docs_path = '#{help_page_path('user/project/merge_requests/merge_request_approvals', anchor: 'eligible-approvers')}'; - window.gl.mrWidgetData.approvals_help_path = '#{help_page_path("user/project/merge_requests/merge_request_approvals")}'; + window.gl.mrWidgetData.eligible_approvers_docs_path = '#{help_page_path('user/project/merge_requests/approvals/rules.md', anchor: 'eligible-approvers')}'; + window.gl.mrWidgetData.approvals_help_path = '#{help_page_path("user/project/merge_requests/approvals/index.md")}'; window.gl.mrWidgetData.pipelines_empty_svg_path = '#{image_path('illustrations/pipelines_empty.svg')}'; window.gl.mrWidgetData.codequality_help_path = '#{help_page_path("user/project/merge_requests/code_quality", anchor: "code-quality-reports")}'; window.gl.mrWidgetData.false_positive_doc_url = '#{help_page_path('user/application_security/vulnerabilities/index')}'; diff --git a/app/views/projects/mirrors/_instructions.html.haml b/app/views/projects/mirrors/_instructions.html.haml index a91751da0aa..2bd2c7cac44 100644 --- a/app/views/projects/mirrors/_instructions.html.haml +++ b/app/views/projects/mirrors/_instructions.html.haml @@ -3,7 +3,7 @@ %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, 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, 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(_('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 diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml index c62853145b6..4e4738ebd25 100644 --- a/app/views/projects/new.html.haml +++ b/app/views/projects/new.html.haml @@ -12,7 +12,7 @@ .row{ 'v-cloak': true } #blank-project-pane.tab-pane.active - = form_for @project, html: { class: 'new_project' } do |f| + = form_for @project, html: { class: 'new_project gl-mt-3' } do |f| = render 'new_project_fields', f: f, project_name_id: "blank-project-name" #create-from-template-pane.tab-pane diff --git a/app/views/projects/pages/_no_domains.html.haml b/app/views/projects/pages/_no_domains.html.haml index 8d6e403b93a..a537bd80d30 100644 --- a/app/views/projects/pages/_no_domains.html.haml +++ b/app/views/projects/pages/_no_domains.html.haml @@ -3,4 +3,4 @@ .card-header = s_('GitLabPages|Domains') .nothing-here-block - = s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.") + = s_("GitLabPages|Support for domains and certificates is disabled. Ask your system's administrator to enable it.") diff --git a/app/views/projects/pipeline_schedules/_tabs.html.haml b/app/views/projects/pipeline_schedules/_tabs.html.haml index f69041e1eb1..f825ef35902 100644 --- a/app/views/projects/pipeline_schedules/_tabs.html.haml +++ b/app/views/projects/pipeline_schedules/_tabs.html.haml @@ -1,18 +1,12 @@ -%ul.nav-links.mobile-separator.nav.nav-tabs - %li{ class: active_when(scope.nil?) }> - = link_to schedule_path_proc.call(nil) do - = s_("PipelineSchedules|All") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm.js-totalbuilds-count - = number_with_delimiter(all_schedules.count(:id)) += gl_tabs_nav({ class: 'gl-display-flex gl-flex-grow-1 gl-border-0' }) do + = gl_tab_link_to schedule_path_proc.call(nil), { item_active: active_when(scope.nil?) } do + = s_("PipelineSchedules|All") + = gl_tab_counter_badge(number_with_delimiter(all_schedules.count(:id)), { class: 'js-totalbuilds-count' }) - %li{ class: active_when(scope == 'active') }> - = link_to schedule_path_proc.call('active') do - = s_("PipelineSchedules|Active") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = number_with_delimiter(all_schedules.active.count(:id)) + = gl_tab_link_to schedule_path_proc.call('active'), { item_active: active_when(scope == 'active') } do + = s_("PipelineSchedules|Active") + = gl_tab_counter_badge(number_with_delimiter(all_schedules.active.count(:id))) - %li{ class: active_when(scope == 'inactive') }> - = link_to schedule_path_proc.call('inactive') do - = s_("PipelineSchedules|Inactive") - %span.badge.gl-tab-counter-badge.badge-muted.badge-pill.gl-badge.sm - = number_with_delimiter(all_schedules.inactive.count(:id)) + = gl_tab_link_to schedule_path_proc.call('inactive'), { item_active: active_when(scope == 'inactive') } do + = s_("PipelineSchedules|Inactive") + = gl_tab_counter_badge(number_with_delimiter(all_schedules.inactive.count(:id))) diff --git a/app/views/projects/pipelines/_info.html.haml b/app/views/projects/pipelines/_info.html.haml index 4a10f6aee1c..0bfdee088b4 100644 --- a/app/views/projects/pipelines/_info.html.haml +++ b/app/views/projects/pipelines/_info.html.haml @@ -17,45 +17,46 @@ - if @pipeline.queued_duration = "(queued for #{time_interval_in_words(@pipeline.queued_duration)})" - .well-segment.qa-pipeline-badges - .icon-container - = sprite_icon('flag') - - if @pipeline.child? - %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-pill.gl-badge.sm.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") } - latest - - if @pipeline.merge_train_pipeline? - %span.js-pipeline-url-train.badge.badge-pill.gl-badge.sm.badge-info.has-tooltip{ title: _("This is a merge train pipeline") } - train - - if @pipeline.has_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-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-pill.gl-badge.sm.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body", - toggle: "popover", - placement: "top", - html: "true", - triggers: "focus", - title: "<div class='gl-font-weight-normal gl-line-height-normal'>#{popover_title_text}</div>", - content: "<a href='#{popover_content_url}' target='_blank' rel='noopener noreferrer nofollow'>#{popover_content_text}</a>", - } } - Auto DevOps - - if @pipeline.detached_merge_request_pipeline? - %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-pill.gl-badge.sm.badge-warning - stuck + - if has_pipeline_badges?(@pipeline) + .well-segment.qa-pipeline-badges + .icon-container + = sprite_icon('flag') + - if @pipeline.child? + %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-pill.gl-badge.sm.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") } + latest + - if @pipeline.merge_train_pipeline? + %span.js-pipeline-url-train.badge.badge-pill.gl-badge.sm.badge-info.has-tooltip{ title: _("This is a merge train pipeline") } + train + - if @pipeline.has_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-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-pill.gl-badge.sm.badge-info.autodevops-badge{ href: "#", tabindex: "0", role: "button", data: { container: "body", + toggle: "popover", + placement: "top", + html: "true", + triggers: "focus", + title: "<div class='gl-font-weight-normal gl-line-height-normal'>#{popover_title_text}</div>", + content: "<a href='#{popover_content_url}' target='_blank' rel='noopener noreferrer nofollow'>#{popover_content_text}</a>", + } } + Auto DevOps + - if @pipeline.detached_merge_request_pipeline? + %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-pill.gl-badge.sm.badge-warning + stuck .well-segment.branch-info .icon-container.commit-icon diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index 992407adf71..21e871246d7 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,4 +1,5 @@ - page_title _('CI/CD Analytics') #js-project-pipelines-charts-app{ data: { project_path: @project.full_path, - should_render_dora_charts: should_render_dora_charts.to_s } } + should_render_dora_charts: should_render_dora_charts.to_s, + should_render_quality_summary: should_render_quality_summary.to_s } } diff --git a/app/views/projects/pipelines/show.html.haml b/app/views/projects/pipelines/show.html.haml index 8fd8d3cf540..c911fc8a203 100644 --- a/app/views/projects/pipelines/show.html.haml +++ b/app/views/projects/pipelines/show.html.haml @@ -22,8 +22,8 @@ %ul - @pipeline.yaml_errors.split(",").each do |error| %li= error - - lint_link_url = project_ci_lint_path(@project) - - lint_link_start = '<a href="%{url}">'.html_safe % { url: lint_link_url } + - lint_link_url = project_ci_pipeline_editor_path(@project, tab: "LINT_TAB") + - lint_link_start = '<a href="%{url}" class="gl-text-blue-500!">'.html_safe % { url: lint_link_url } = s_('You can also test your %{gitlab_ci_yml} in %{lint_link_start}CI Lint%{lint_link_end}').html_safe % { gitlab_ci_yml: '.gitlab-ci.yml', lint_link_start: lint_link_start, lint_link_end: '</a>'.html_safe } = render "projects/pipelines/with_tabs", pipeline: @pipeline, stages: @stages, pipeline_has_errors: pipeline_has_errors diff --git a/app/views/projects/product_analytics/_links.html.haml b/app/views/projects/product_analytics/_links.html.haml index 0797c5baf91..6e5667e2644 100644 --- a/app/views/projects/product_analytics/_links.html.haml +++ b/app/views/projects/product_analytics/_links.html.haml @@ -1,10 +1,5 @@ -.mb-3 - %ul.nav-links - = nav_link(path: 'product_analytics#index') do - = link_to _('Events'), project_product_analytics_path(@project) - = nav_link(path: 'product_analytics#graphs') do - = link_to 'Graphs', graphs_project_product_analytics_path(@project) - = nav_link(path: 'product_analytics#test') do - = link_to _('Test'), test_project_product_analytics_path(@project) - = nav_link(path: 'product_analytics#setup') do - = link_to _('Setup'), setup_project_product_analytics_path(@project) += gl_tabs_nav({ class: 'mb-3'}) do + = gl_tab_link_to _('Events'), project_product_analytics_path(@project) + = gl_tab_link_to _('Graphs'), graphs_project_product_analytics_path(@project) + = gl_tab_link_to _('Test'), test_project_product_analytics_path(@project) + = gl_tab_link_to _('Setup'), setup_project_product_analytics_path(@project) diff --git a/app/views/projects/settings/_general.html.haml b/app/views/projects/settings/_general.html.haml index b185f45d129..0f4d5869cea 100644 --- a/app/views/projects/settings/_general.html.haml +++ b/app/views/projects/settings/_general.html.haml @@ -1,3 +1,4 @@ +- hidden_topics_field_id = 'project_topic_list_field' = form_for [@project], html: { multipart: true, class: "edit-project js-general-settings-form" }, authenticity_token: true do |f| %input{ name: 'update_section', type: 'hidden', value: 'js-general-settings' } @@ -15,9 +16,9 @@ .row .form-group.col-md-9 - = f.label :topics, _('Topics (optional)'), class: 'label-bold' - = f.text_field :topics, value: @project.topic_list.join(', '), maxlength: 2000, class: "form-control gl-form-input" - %p.form-text.text-muted= _('Separate topics with commas.') + = f.label :topics, _('Topics'), class: 'label-bold' + .js-topics-selector{ data: { hidden_input_id: hidden_topics_field_id } } + = f.hidden_field :topics, value: @project.topic_list.join(', '), id: hidden_topics_field_id .row .form-group.col-md-9 diff --git a/app/views/projects/work_items/index.html.haml b/app/views/projects/work_items/index.html.haml index 052db598571..0efd7a740d3 100644 --- a/app/views/projects/work_items/index.html.haml +++ b/app/views/projects/work_items/index.html.haml @@ -1,3 +1,3 @@ - page_title s_('WorkItem|Work Items') -#js-work-items +#js-work-items{ data: { full_path: @project.full_path } } diff --git a/app/views/registrations/welcome/show.html.haml b/app/views/registrations/welcome/show.html.haml index 9356b6ad49c..65a1ffa3e46 100644 --- a/app/views/registrations/welcome/show.html.haml +++ b/app/views/registrations/welcome/show.html.haml @@ -24,9 +24,10 @@ .form-group.col-sm-12.js-other-role-group.hidden = f.label :other_role, _('What is your job title? (optional)'), class: 'form-check-label gl-mb-3' = f.text_field :other_role, class: 'form-control' + = render_if_exists "registrations/welcome/jobs_to_be_done", f: f = render_if_exists "registrations/welcome/setup_for_company", f: f + = render_if_exists "registrations/welcome/joining_project" = render 'devise/shared/email_opted_in', f: f - = render_if_exists "registrations/welcome/jobs_to_be_done", f: f .row .form-group.col-sm-12.gl-mb-0 - if partial_exists? "registrations/welcome/button" diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml index ca6f2369bd8..54aa9aad8a5 100644 --- a/app/views/search/_category.html.haml +++ b/app/views/search/_category.html.haml @@ -5,7 +5,7 @@ .scrolling-tabs-container.inner-page-scroll-tabs.is-smaller .fade-left= sprite_icon('chevron-lg-left', size: 12) .fade-right= sprite_icon('chevron-lg-right', size: 12) - %ul.nav-links.search-filter.scrolling-tabs.nav.nav-tabs + = gl_tabs_nav({ class: 'search-filter scrolling-tabs nav-links'}) do - if @project - if project_search_tabs?(:blobs) = search_filter_link 'blobs', _("Code"), data: { qa_selector: 'code_tab' } diff --git a/app/views/shared/_confirm_modal.html.haml b/app/views/shared/_confirm_modal.html.haml index 8b13bb948ee..4cb3f6d1739 100644 --- a/app/views/shared/_confirm_modal.html.haml +++ b/app/views/shared/_confirm_modal.html.haml @@ -12,10 +12,10 @@ %p %span.js-warning-text= _('This action can lead to data loss. To prevent accidental actions we ask you to confirm your intention.') %br - - phrase_code = '<code class="js-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: phrase } + - phrase_code = '<code class="js-legacy-confirm-danger-match">%{phrase_name}</code>'.html_safe % { phrase_name: phrase } = _('Please type %{phrase_code} to proceed or close this modal to cancel.').html_safe % { phrase_code: phrase_code } .form-group - = text_field_tag 'confirm_name_input', '', class: 'form-control js-confirm-danger-input qa-confirm-input' + = text_field_tag 'confirm_name_input', '', class: 'form-control js-legacy-confirm-danger-input qa-confirm-input' .form-actions - = submit_tag _('Confirm'), class: "gl-button btn btn-danger js-confirm-danger-submit qa-confirm-button" + = submit_tag _('Confirm'), class: "gl-button btn btn-danger js-legacy-confirm-danger-submit qa-confirm-button" diff --git a/app/views/shared/_default_branch_protection.html.haml b/app/views/shared/_default_branch_protection.html.haml index d7ae21debd8..7a6152f6d96 100644 --- a/app/views/shared/_default_branch_protection.html.haml +++ b/app/views/shared/_default_branch_protection.html.haml @@ -1,3 +1,4 @@ -.form-group - = f.label :default_branch_protection, class: 'label-bold' - = f.select :default_branch_protection, options_for_select(Gitlab::Access.protection_options, selected_level), {}, class: 'form-control' +%fieldset.form-group + %legend.h5.gl-border-none.gl-mt-0.gl-mb-3= _('Default branch protection') + - Gitlab::Access.protection_options.each do |option| + = f.gitlab_ui_radio_component :default_branch_protection, option[:value], option[:label], help_text: option[:help_text] diff --git a/app/views/shared/_issues.html.haml b/app/views/shared/_issues.html.haml index 6eb736b0710..4e3b1e02f16 100644 --- a/app/views/shared/_issues.html.haml +++ b/app/views/shared/_issues.html.haml @@ -1,4 +1,4 @@ -= render 'shared/alerts/positioning_disabled' += render 'shared/alerts/positioning_disabled' if @sort == 'relative_position' - if @issues.to_a.any? %ul.content-list.issues-list.issuable-list{ class: issue_manual_ordering_class, data: { group_full_path: @group&.full_path } } diff --git a/app/views/shared/_md_preview.html.haml b/app/views/shared/_md_preview.html.haml index 0976defea1b..a49a0667d84 100644 --- a/app/views/shared/_md_preview.html.haml +++ b/app/views/shared/_md_preview.html.haml @@ -9,7 +9,7 @@ .md-area.position-relative .md-header - %ul.nav.nav-tabs.nav-links.clearfix + = gl_tabs_nav({ class: 'clearfix nav-links'}) do %li.md-header-tab.active %button.js-md-write-button = _("Write") diff --git a/app/views/shared/_new_commit_form.html.haml b/app/views/shared/_new_commit_form.html.haml index 5641c67e462..14ea96f9669 100644 --- a/app/views/shared/_new_commit_form.html.haml +++ b/app/views/shared/_new_commit_form.html.haml @@ -5,9 +5,7 @@ - if project.empty_repo? - ref = local_assigns[:ref] || @ref - - branch_name_class = project.empty_repo_upload_experiment? ? 'js-branch-name' : nil - - = hidden_field_tag 'branch_name', ref, class: branch_name_class + = hidden_field_tag 'branch_name', ref, class: 'js-branch-name' - else - if can?(current_user, :push_code, @project) .form-group.row.branch diff --git a/app/views/shared/_no_password.html.haml b/app/views/shared/_no_password.html.haml index 9c1e5a49b44..d1e1a8a819d 100644 --- a/app/views/shared/_no_password.html.haml +++ b/app/views/shared/_no_password.html.haml @@ -1,12 +1,10 @@ - if show_no_password_message? - .no-password-message.gl-alert.gl-alert-warning - = sprite_icon('warning', 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') + = render 'shared/global_alert', + variant: :warning, + alert_class: 'js-no-password-message', + close_button_class: 'js-hide-no-password-message' do .gl-alert-body - - translation_params = { protocol: gitlab_config.protocol.upcase, set_password_link: link_to_set_password } - - set_password_message = _("You won't be able to pull or push repositories via %{protocol} until you %{set_password_link} on your account") % translation_params - = set_password_message.html_safe + = no_password_message .gl-alert-actions - = link_to _('Remind later'), '#', class: 'hide-no-password-message btn gl-alert-action btn-info btn-md gl-button' - = link_to _("Don't show again"), profile_path(user: {hide_no_password: true}), method: :put, role: 'button', class: 'btn gl-alert-action btn-md btn-default gl-button btn-default-secondary' + = link_to _('Remind later'), '#', class: 'js-hide-no-password-message gl-alert-action btn btn-confirm btn-md gl-button' + = link_to _("Don't show again"), profile_path(user: { hide_no_password: true }), method: :put, role: 'button', class: 'gl-alert-action btn btn-default btn-md gl-button' diff --git a/app/views/shared/_no_ssh.html.haml b/app/views/shared/_no_ssh.html.haml index 2c6ceb58654..20dc1b41970 100644 --- a/app/views/shared/_no_ssh.html.haml +++ b/app/views/shared/_no_ssh.html.haml @@ -1,10 +1,10 @@ - if show_no_ssh_key_message? - %div{ class: 'no-ssh-key-message gl-alert gl-alert-warning', role: 'alert' } - = sprite_icon('warning', css_class: 'gl-icon s16 gl-alert-icon gl-alert-icon-no-title') - %button{ class: 'gl-alert-dismiss hide-no-ssh-message', type: 'button', 'aria-label': _('Dismiss') } - = sprite_icon('close', css_class: 'gl-icon s16') + = render 'shared/global_alert', + variant: :warning, + alert_class: 'js-no-ssh-message', + close_button_class: 'js-hide-no-ssh-message' do .gl-alert-body - = s_("MissingSSHKeyWarningLink|You won't be able to pull or push repositories via SSH until you add an SSH key to your profile") + = s_("MissingSSHKeyWarningLink|You can't push or pull repositories using SSH until you add an SSH key to your profile.") .gl-alert-actions - = link_to s_('MissingSSHKeyWarningLink|Add SSH key'), profile_keys_path, class: "btn gl-alert-action btn-warning btn-md gl-button" - = link_to s_("MissingSSHKeyWarningLink|Don't show again"), profile_path(user: {hide_no_ssh_key: true}), method: :put, role: 'button', class: 'btn gl-alert-action btn-md btn-warning gl-button btn-warning-secondary' + = link_to s_('MissingSSHKeyWarningLink|Add SSH key'), profile_keys_path, class: "gl-alert-action btn btn-confirm btn-md gl-button" + = link_to s_("MissingSSHKeyWarningLink|Don't show again"), profile_path(user: { hide_no_ssh_key: true }), method: :put, role: 'button', class: 'gl-alert-action btn btn-default btn-md gl-button' diff --git a/app/views/shared/_project_creation_levels.html.haml b/app/views/shared/_project_creation_levels.html.haml new file mode 100644 index 00000000000..00f495a26dc --- /dev/null +++ b/app/views/shared/_project_creation_levels.html.haml @@ -0,0 +1,7 @@ +- method = local_assigns.fetch(:method, nil) +- legend = local_assigns.fetch(:legend, nil) + +%fieldset.form-group + %legend.h5.gl-border-none.gl-mt-0.gl-mb-3= legend + - Gitlab::Access.project_creation_options.each do |label, value| + = f.gitlab_ui_radio_component method, value, label diff --git a/app/views/shared/_visibility_radios.html.haml b/app/views/shared/_visibility_radios.html.haml index f48bfcd0e72..760fe18ddec 100644 --- a/app/views/shared/_visibility_radios.html.haml +++ b/app/views/shared/_visibility_radios.html.haml @@ -10,6 +10,7 @@ = visibility_level_label(level) .option-description = visibility_level_description(level, form_model) + .option-disabled-reason .text-muted - if all_visibility_levels_restricted? diff --git a/app/views/shared/alerts/_positioning_disabled.html.haml b/app/views/shared/alerts/_positioning_disabled.html.haml index 91c1d3463d8..59f2fcef24c 100644 --- a/app/views/shared/alerts/_positioning_disabled.html.haml +++ b/app/views/shared/alerts/_positioning_disabled.html.haml @@ -1,2 +1,2 @@ - if issue_repositioning_disabled? - = render 'shared/alert_info', body: _('Issues manual ordering is temporarily disabled for technical reasons.') + = render 'shared/alert_info', body: _('Issues are being rebalanced at the moment, so manual reordering is disabled.') diff --git a/app/views/shared/boards/_switcher.html.haml b/app/views/shared/boards/_switcher.html.haml index 18e0ca20cf7..c667b3a4626 100644 --- a/app/views/shared/boards/_switcher.html.haml +++ b/app/views/shared/boards/_switcher.html.haml @@ -3,15 +3,10 @@ - milestone_filter_opts = milestone_filter_opts.merge(only_group_milestones: true) if board.group_board? - weights = Gitlab.ee? ? ([Issue::WEIGHT_ANY] + Issue.weight_options) : [] -#js-multiple-boards-switcher.inline.boards-switcher{ data: { current_board: current_board_json.to_json, - milestone_path: milestones_filter_path(milestone_filter_opts), +#js-multiple-boards-switcher.inline.boards-switcher{ data: { milestone_path: milestones_filter_path(milestone_filter_opts), board_base_url: board_base_url, has_missing_boards: (!multiple_boards_available? && current_board_parent.boards.size > 1).to_s, can_admin_board: can?(current_user, :admin_issue_board, parent).to_s, multiple_issue_boards_available: parent.multiple_issue_boards_available?.to_s, - labels_path: labels_filter_path_with_defaults(only_group_labels: true, include_descendant_groups: true), - labels_web_url: parent.is_a?(Project) ? project_labels_path(@project) : group_labels_path(@group), - project_id: @project&.id, - group_id: @group&.id, scoped_issue_board_feature_enabled: Gitlab.ee? && parent.feature_available?(:scoped_issue_board) ? 'true' : 'false', weights: weights.to_json } } diff --git a/app/views/shared/deploy_tokens/_form.html.haml b/app/views/shared/deploy_tokens/_form.html.haml index e049afbc40b..902a0cad483 100644 --- a/app/views/shared/deploy_tokens/_form.html.haml +++ b/app/views/shared/deploy_tokens/_form.html.haml @@ -36,7 +36,7 @@ .text-secondary= s_('DeployTokens|Allows read-only access to registry images.') %fieldset.form-group.form-check - = f.check_box :write_registry, class: 'form-check-input' + = f.check_box :write_registry, class: 'form-check-input', data: { qa_selector: 'deploy_token_write_registry_checkbox' } = f.label :write_registry, 'write_registry', class: 'label-bold form-check-label' .text-secondary= s_('DeployTokens|Allows read and write access to registry images.') diff --git a/app/views/shared/doorkeeper/applications/_show.html.haml b/app/views/shared/doorkeeper/applications/_show.html.haml index 8d6b9604c1c..f533b5b5a4d 100644 --- a/app/views/shared/doorkeeper/applications/_show.html.haml +++ b/app/views/shared/doorkeeper/applications/_show.html.haml @@ -39,6 +39,9 @@ = render "shared/tokens/scopes_list", token: @application -.form-actions - = link_to _('Edit'), edit_path, class: 'gl-button btn btn-confirm wide float-left' - = render 'shared/doorkeeper/applications/delete_form', path: delete_path, submit_btn_css: 'gl-button btn btn-danger gl-ml-3' +.form-actions.gl-display-flex.gl-justify-content-space-between + %div + - if @created + = link_to _('Continue'), index_path, class: 'btn btn-confirm btn-md gl-button gl-mr-3' + = link_to _('Edit'), edit_path, class: 'btn btn-default btn-md gl-button' + = render 'shared/doorkeeper/applications/delete_form', path: delete_path, submit_btn_css: 'btn btn-danger btn-md gl-button btn-danger-secondary' diff --git a/app/views/shared/hook_logs/_content.html.haml b/app/views/shared/hook_logs/_content.html.haml index 51f44afe55e..ab6875a09f7 100644 --- a/app/views/shared/hook_logs/_content.html.haml +++ b/app/views/shared/hook_logs/_content.html.haml @@ -1,44 +1,47 @@ -%p - %strong Request URL: - POST - = hook_log.url - = render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log } +%span.gl-display-flex.gl-align-items-center + %h4 + POST + = hook_log.url + %span.badge.gl-badge.badge-pill.badge-muted.sm.gl-ml-3 + = hook_log.trigger.singularize.titleize %p - %strong Trigger: - %td.d-none.d-sm-block - %span.badge.badge-gray.deploy-project-label - = hook_log.trigger.singularize.titleize -%p - %strong Elapsed time: - #{number_with_precision(hook_log.execution_duration, precision: 2)} sec -%p - %strong Request time: - = time_ago_with_tooltip(hook_log.created_at) + = _('Completed in %{duration_seconds} seconds (%{relative_time})').html_safe % { duration_seconds: number_with_precision(hook_log.execution_duration, precision: 2), relative_time: time_ago_with_tooltip(hook_log.created_at) } %hr - if hook_log.internal_error_message.present? - .bs-callout.bs-callout-danger - = hook_log.internal_error_message + .gl-alert-container + .gl-alert.gl-alert-danger + .gl-alert-container + = sprite_icon('error', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + .gl-alert-content + %h4.gl-alert-title= _('Internal error occured while delivering this webhook.') + .gl-alert-body + = _('Error: %{error}') % { error: hook_log.internal_error_message } + +%h4= _('Response') += render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log } +%pre.gl-mt-3 + :escaped + #{hook_log.response_body} -%h5 Request headers: +%h5= _('Headers') %pre - - hook_log.request_headers.each do |k, v| - <strong>#{k}:</strong> #{v} + - hook_log.response_headers.each do |k, v| + <span class="gl-font-weight-bold">#{k}:</span> #{v} %br -%h5 Request body: +%h4.gl-mt-6= _('Request') %pre :escaped #{Gitlab::Json.pretty_generate(hook_log.request_data)} -%h5 Response headers: + +%h5= _('Headers') %pre - - hook_log.response_headers.each do |k, v| - <strong>#{k}:</strong> #{v} + - hook_log.request_headers.each do |k, v| + <span class="gl-font-weight-bold">#{k}:</span> #{v} %br -%h5 Response body: -%pre - :escaped - #{hook_log.response_body} + + diff --git a/app/views/shared/issuable/_search_bar.html.haml b/app/views/shared/issuable/_search_bar.html.haml index 81a7581d392..e097852216c 100644 --- a/app/views/shared/issuable/_search_bar.html.haml +++ b/app/views/shared/issuable/_search_bar.html.haml @@ -15,6 +15,7 @@ .d-flex.flex-column.flex-md-row.flex-grow-1.mb-lg-0.mb-md-2.mb-sm-0.w-100 - if type == :boards = render "shared/boards/switcher", board: board + .js-new-board{ data: { multiple_issue_boards_available: parent.multiple_issue_boards_available?.to_s, can_admin_board: can?(current_user, :admin_issue_board, parent).to_s, } } = form_tag page_filter_path, method: :get, class: 'filter-form js-filter-form w-100' do - if params[:search].present? = hidden_field_tag :search, params[:search] diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index 1f391e8a321..46df9b4ef9a 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -23,7 +23,7 @@ = html_escape(_('From %{code_open}%{source_title}%{code_close} into')) % { source_title: source_title, code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - if issuable.new_record? - %code#js-target-branch-title= target_title + %code#js-target-branch-title{ data: { branch_name: @merge_request.target_branch } }= target_title = link_to _('Change branches'), mr_change_branches_path(issuable) - elsif issuable.for_fork? diff --git a/app/views/shared/issuable/form/_type_selector.html.haml b/app/views/shared/issuable/form/_type_selector.html.haml index f5f6f32d5ba..ae0fe54de4f 100644 --- a/app/views/shared/issuable/form/_type_selector.html.haml +++ b/app/views/shared/issuable/form/_type_selector.html.haml @@ -18,17 +18,19 @@ = sprite_icon('close', size: 16, css_class: 'dropdown-menu-close-icon') .dropdown-content{ data: { testid: 'issue-type-select-dropdown' } } %ul - %li.js-filter-issuable-type - = link_to new_project_issue_path(@project), class: ("is-active" if issuable.issue?) do - #{sprite_icon(work_item_type_icon(:issue), css_class: 'gl-icon')} #{_("Issue")} - %li.js-filter-issuable-type{ data: { track: { action: "select_issue_type_incident", label: "select_issue_type_incident_dropdown_option" } } } - = link_to new_project_issue_path(@project, { issuable_template: 'incident', issue: { issue_type: 'incident' } }), class: ("is-active" if issuable.incident?) do - #{sprite_icon(work_item_type_icon(:incident), css_class: 'gl-icon')} #{_("Incident")} + - if create_issue_type_allowed?(@project, :issue) + %li.js-filter-issuable-type + = link_to new_project_issue_path(@project), class: ("is-active" if issuable.issue?) do + #{sprite_icon(work_item_type_icon(:issue), css_class: 'gl-icon')} #{_('Issue')} + - if create_issue_type_allowed?(@project, :incident) + %li.js-filter-issuable-type{ data: { track: { action: "select_issue_type_incident", label: "select_issue_type_incident_dropdown_option" } } } + = link_to new_project_issue_path(@project, { issuable_template: 'incident', issue: { issue_type: 'incident' } }), class: ("is-active" if issuable.incident?) do + #{sprite_icon(work_item_type_icon(:incident), css_class: 'gl-icon')} #{_('Incident')} #js-type-popover - if issuable.incident? %p.form-text.text-muted - incident_docs_url = help_page_path('operations/incident_management/incidents.md') - - incident_docs_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: incident_docs_url } - = _('A %{incident_docs_start}modified issue%{incident_docs_end} to guide the resolution of incidents.').html_safe % { incident_docs_start: incident_docs_start, incident_docs_end: '</a>'.html_safe } + - incident_docs_start = format('<a href="%{url}" target="_blank" rel="noopener noreferrer">', url: incident_docs_url) + = format(_('A %{incident_docs_start}modified issue%{incident_docs_end} to guide the resolution of incidents.'), incident_docs_start: incident_docs_start, incident_docs_end: '</a>').html_safe diff --git a/app/views/shared/labels/_nav.html.haml b/app/views/shared/labels/_nav.html.haml index a0225e35c90..47e9d9b0e4a 100644 --- a/app/views/shared/labels/_nav.html.haml +++ b/app/views/shared/labels/_nav.html.haml @@ -1,14 +1,10 @@ - subscribed = params[:subscribed] .top-area.adjust - %ul.nav-links.nav.nav-tabs - %li{ class: active_when(subscribed != 'true') }> - = link_to labels_filter_path do - = _('All') + = gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-0' }) do + = gl_tab_link_to _('All'), labels_filter_path, { item_active: subscribed != 'true' } - if current_user - %li{ class: active_when(subscribed == 'true') }> - = link_to labels_filter_path(subscribed: 'true') do - = _('Subscribed') + = gl_tab_link_to _('Subscribed'), labels_filter_path(subscribed: 'true'), { item_active: subscribed == 'true' } .nav-controls = form_tag labels_filter_path, method: :get do = hidden_field_tag :subscribed, params[:subscribed] diff --git a/app/views/shared/nav/_sidebar_menu.html.haml b/app/views/shared/nav/_sidebar_menu.html.haml index 903d2d077ba..3f71368aff3 100644 --- a/app/views/shared/nav/_sidebar_menu.html.haml +++ b/app/views/shared/nav/_sidebar_menu.html.haml @@ -16,15 +16,4 @@ %span.badge.badge-pill.count{ **sidebar_menu.pill_html_options } = number_with_delimiter(sidebar_menu.pill_count) - %ul.sidebar-sub-level-items{ class: ('is-fly-out-only' unless sidebar_menu.has_renderable_items?) } - = nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' } ) do - %span.fly-out-top-item-container - %strong.fly-out-top-item-name - = sidebar_menu.title - - if sidebar_menu.has_pill? - %span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options } - = number_with_delimiter(sidebar_menu.pill_count) - - - if sidebar_menu.has_renderable_items? - %li.divider.fly-out-top-item - = render partial: 'shared/nav/sidebar_menu_item', collection: sidebar_menu.renderable_items + = render partial: 'shared/nav/sidebar_submenu', locals: { sidebar_menu: sidebar_menu } diff --git a/app/views/shared/nav/_sidebar_submenu.html.haml b/app/views/shared/nav/_sidebar_submenu.html.haml new file mode 100644 index 00000000000..750e6c9ee57 --- /dev/null +++ b/app/views/shared/nav/_sidebar_submenu.html.haml @@ -0,0 +1,12 @@ +%ul.sidebar-sub-level-items{ class: ('is-fly-out-only' unless sidebar_menu.has_renderable_items?) } + = nav_link(**sidebar_menu.all_active_routes, html_options: { class: 'fly-out-top-item' } ) do + %span.fly-out-top-item-container + %strong.fly-out-top-item-name + = sidebar_menu.title + - if sidebar_menu.has_pill? + %span.badge.badge-pill.count.fly-out-badge{ **sidebar_menu.pill_html_options } + = number_with_delimiter(sidebar_menu.pill_count) + + - if sidebar_menu.has_renderable_items? + %li.divider.fly-out-top-item + = render partial: 'shared/nav/sidebar_menu_item', collection: sidebar_menu.renderable_items diff --git a/app/views/shared/projects/_topics.html.haml b/app/views/shared/projects/_topics.html.haml index a7429483da1..e303f05c5df 100644 --- a/app/views/shared/projects/_topics.html.haml +++ b/app/views/shared/projects/_topics.html.haml @@ -8,7 +8,7 @@ = sprite_icon('tag', css_class: 'icon gl-relative gl-mr-2') - project.topics_to_show.each do |topic| - - explore_project_topic_path = explore_projects_path(topic: topic) + - explore_project_topic_path = topic_explore_projects_path(topic_name: topic) - if topic.length > max_project_topic_length %a{ class: "#{ project_topics_classes } str-truncated-30 has-tooltip", data: { container: "body" }, title: topic, href: explore_project_topic_path, itemprop: 'keywords' } = truncate(topic, length: max_project_topic_length) @@ -21,7 +21,7 @@ - content = capture do %span.gl-display-inline-flex.gl-flex-wrap - project.topics_not_shown.each do |topic| - - explore_project_topic_path = explore_projects_path(topic: topic) + - explore_project_topic_path = topic_explore_projects_path(topic_name: topic) - if topic.length > max_project_topic_length %a{ class: "#{ project_topics_classes } gl-mb-3 str-truncated has-tooltip", data: { container: "body" }, title: topic, href: explore_project_topic_path, itemprop: 'keywords' } = truncate(topic, length: max_project_topic_length) diff --git a/app/views/shared/runners/_shared_runners_description.html.haml b/app/views/shared/runners/_shared_runners_description.html.haml index a276f725576..e2b57a7fd73 100644 --- a/app/views/shared/runners/_shared_runners_description.html.haml +++ b/app/views/shared/runners/_shared_runners_description.html.haml @@ -1,4 +1,5 @@ -- link = link_to _('MaxBuilds'), 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank' +-# "MaxBuilds" is a runner configuration keyword so it must not be translated. +- link = link_to 'MaxBuilds', 'https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersmachine-section', target: '_blank' %h4 = _('Shared runners') diff --git a/app/views/shared/topics/_list.html.haml b/app/views/shared/topics/_list.html.haml new file mode 100644 index 00000000000..ddf47261d42 --- /dev/null +++ b/app/views/shared/topics/_list.html.haml @@ -0,0 +1,9 @@ +- remote = local_assigns.fetch(:remote, false) + +- if @topics.empty? + = render 'shared/empty_states/topics' +- else + .row.gl-mt-3 + = render partial: 'shared/topics/topic', collection: @topics + + = paginate_collection @topics, remote: remote diff --git a/app/views/shared/topics/_topic.html.haml b/app/views/shared/topics/_topic.html.haml new file mode 100644 index 00000000000..a47d4495777 --- /dev/null +++ b/app/views/shared/topics/_topic.html.haml @@ -0,0 +1,16 @@ +- max_topic_name_length = 30 +- detail_page_link = topic_explore_projects_path(topic_name: topic.name) + +.col-lg-3.col-md-4.col-sm-12 + .gl-card.gl-mb-5 + .gl-card-body.gl-display-flex.gl-align-items-center + .avatar-container.rect-avatar.s40.gl-flex-shrink-0 + = link_to detail_page_link do + = topic_icon(topic, class: "avatar s40") + = link_to detail_page_link do + - if topic.name.length > max_topic_name_length + %h5.str-truncated.has-tooltip{ title: topic.name } + = truncate(topic.name, length: max_topic_name_length) + - else + %h5 + = topic.name diff --git a/app/views/shared/web_hooks/_index.html.haml b/app/views/shared/web_hooks/_index.html.haml index 794418b8336..f1eef5d7f0f 100644 --- a/app/views/shared/web_hooks/_index.html.haml +++ b/app/views/shared/web_hooks/_index.html.haml @@ -3,7 +3,7 @@ .card-header %h5 = hook_class.underscore.humanize.titleize.pluralize - (#{hooks.load.size}) + (#{hooks.size}) - if hooks.any? %ul.content-list diff --git a/app/views/users/_overview.html.haml b/app/views/users/_overview.html.haml index 2e6d335a98d..0d904de9372 100644 --- a/app/views/users/_overview.html.haml +++ b/app/views/users/_overview.html.haml @@ -2,13 +2,28 @@ .row.d-none.d-sm-flex .col-12.calendar-block.gl-my-3 - .user-calendar.light{ data: { calendar_path: user_calendar_path(@user, :json), calendar_activities_path: user_calendar_activities_path, utc_offset: Time.zone.utc_offset } } + .user-calendar.light{ data: { calendar_path: user_calendar_path(@user, :json), calendar_activities_path: user_calendar_activities_path, utc_offset: local_time_instance(@user.timezone).now.utc_offset } } .gl-spinner.gl-spinner-md.gl-my-8 .user-calendar-error.invisible = _('There was an error loading users activity calendar.') %a.js-retry-load{ href: '#' } = s_('UserProfile|Retry') .user-calendar-activities +- if @user.user_readme + .row.justify-content-center + .col-12.col-md-10.col-lg-8.gl-my-6 + .gl-display-flex + %ol.breadcrumb.gl-breadcrumb-list.gl-mb-4 + %li.breadcrumb-item.gl-breadcrumb-item + = link_to @user.username, project_path(@user.user_project) + %span.gl-breadcrumb-separator + = sprite_icon("chevron-right", size: 16) + %li.breadcrumb-item.gl-breadcrumb-item + = link_to @user.user_readme.path, @user.user_project.readme_url + - if current_user == @user + .gl-ml-auto + = link_to _('Edit'), edit_blob_path(@user.user_project, @user.user_project.default_branch, @user.user_readme.path) + = render 'projects/blob/viewer', viewer: @user.user_readme.rich_viewer, load_async: false .row %div{ class: activity_pane_class } - if can?(current_user, :read_cross_project) diff --git a/app/views/users/calendar_activities.html.haml b/app/views/users/calendar_activities.html.haml index 2f44a57c388..cffeb55597f 100644 --- a/app/views/users/calendar_activities.html.haml +++ b/app/views/users/calendar_activities.html.haml @@ -5,9 +5,9 @@ %ul.bordered-list - @events.sort_by(&:created_at).each do |event| %li - %span.light + %span.light.js-localtime{ :data => { :datetime => event.created_at.utc.strftime('%Y-%m-%dT%H:%M:%SZ'), :toggle => 'tooltip', :placement => 'top' } } = sprite_icon('clock', css_class: 'gl-vertical-align-text-bottom') - = event.created_at.to_time.in_time_zone.strftime('%-I:%M%P') + = event.created_at.to_time.in_time_zone(@user.timezone).strftime('%-I:%M%P') - if event.visible_to_user?(current_user) - if event.push_action? #{event.action_name} #{event.ref_type} diff --git a/app/views/users/terms/index.html.haml b/app/views/users/terms/index.html.haml index 771ee693120..92095e78f69 100644 --- a/app/views/users/terms/index.html.haml +++ b/app/views/users/terms/index.html.haml @@ -1,20 +1,23 @@ - redirect_params = { redirect: @redirect } if @redirect - accept_term_link = accept_term_path(@term, redirect_params) -.card-body.rendered-terms{ data: { qa_selector: 'terms_content' } } - = markdown_field(@term, :terms) -- if current_user - = render_if_exists 'devise/shared/form_phone_verification', accept_term_link: accept_term_link, inline: true - .card-footer.footer-block.clearfix - - if can?(current_user, :accept_terms, @term) - .float-right - = button_to accept_term_link, class: 'gl-button btn btn-confirm gl-ml-3', data: { qa_selector: 'accept_terms_button' } do - = _('Accept terms') - - else - .float-right - = link_to root_path, class: 'gl-button btn btn-confirm gl-ml-3' do - = _('Continue') - - if can?(current_user, :decline_terms, @term) - .float-right - = button_to decline_term_path(@term, redirect_params), class: 'gl-button btn btn-default gl-ml-3' do - = _('Decline and sign out') +- if Feature.enabled?(:terms_of_service_vue, current_user, default_enabled: :yaml) + #js-terms-of-service{ data: { terms_data: terms_data(@term, @redirect) } } +- else + .card-body.rendered-terms{ data: { qa_selector: 'terms_content' } } + = markdown_field(@term, :terms) + - if current_user + = render_if_exists 'devise/shared/form_phone_verification', accept_term_link: accept_term_link, inline: true + .card-footer.footer-block.clearfix + - if can?(current_user, :accept_terms, @term) + .float-right + = button_to accept_term_link, class: 'gl-button btn btn-confirm gl-ml-3', data: { qa_selector: 'accept_terms_button' } do + = _('Accept terms') + - else + .float-right + = link_to root_path, class: 'gl-button btn btn-confirm gl-ml-3' do + = _('Continue') + - if can?(current_user, :decline_terms, @term) + .float-right + = button_to decline_term_path(@term, redirect_params), class: 'gl-button btn btn-default gl-ml-3' do + = _('Decline and sign out') |