diff options
Diffstat (limited to 'app/views/admin')
52 files changed, 244 insertions, 316 deletions
diff --git a/app/views/admin/abuse_reports/_abuse_report.html.haml b/app/views/admin/abuse_reports/_abuse_report.html.haml index 3e1a76f31e1..dbfc7bf1046 100644 --- a/app/views/admin/abuse_reports/_abuse_report.html.haml +++ b/app/views/admin/abuse_reports/_abuse_report.html.haml @@ -25,10 +25,10 @@ %td - if user = link_to _('Remove user & report'), admin_abuse_report_path(abuse_report, remove_user: true), - data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "gl-button btn btn-sm btn-block btn-danger js-remove-tr" + data: { confirm: _("USER %{user} WILL BE REMOVED! Are you sure?") % { user: user.name } }, remote: true, method: :delete, class: "gl-button btn btn-block btn-danger js-remove-tr" - if user && !user.blocked? - = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "gl-button btn btn-sm btn-block" + = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "gl-button btn btn-default btn-block" - else - .btn.btn-sm.disabled.btn-block + .gl-button.btn.btn-default.disabled.btn-block = _('Already blocked') - = link_to _('Remove report'), [:admin, abuse_report], remote: true, method: :delete, class: "gl-button btn btn-sm btn-block btn-close js-remove-tr" + = link_to _('Remove report'), [:admin, abuse_report], remote: true, method: :delete, class: "gl-button btn btn-default btn-block btn-close js-remove-tr" diff --git a/app/views/admin/abuse_reports/index.html.haml b/app/views/admin/abuse_reports/index.html.haml index daa766429e0..8b1bbbc17c7 100644 --- a/app/views/admin/abuse_reports/index.html.haml +++ b/app/views/admin/abuse_reports/index.html.haml @@ -19,13 +19,14 @@ %table.table.responsive-table %thead.d-none.d-md-table-header-group %tr - %th User - %th Reported by - %th.wide Message - %th Action + %th= _('User') + %th= _('Reported by') + %th.wide= _('Message') + %th= _('Action') = render @abuse_reports = paginate @abuse_reports, theme: 'gitlab' - else .empty-state .text-center - %h4 There are no abuse reports! #{emoji_icon('tada')} + %h4= _("There are no abuse reports!") + %h3= emoji_icon('tada') diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml index 2e5cf156a65..1e2c9f821d2 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form' } do |f| += form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form', id: 'account-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_diff_limits.html.haml b/app/views/admin/application_settings/_diff_limits.html.haml index c5ae5c579ad..7286fffcaf6 100644 --- a/app/views/admin/application_settings/_diff_limits.html.haml +++ b/app/views/admin/application_settings/_diff_limits.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-merge-request-settings'), html: { class: 'fieldset-form' } do |f| += form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-merge-request-settings'), html: { class: 'fieldset-form', id: 'merge-request-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_eks.html.haml b/app/views/admin/application_settings/_eks.html.haml index 1ddf927ed13..c44bad132bd 100644 --- a/app/views/admin/application_settings/_eks.html.haml +++ b/app/views/admin/application_settings/_eks.html.haml @@ -9,7 +9,7 @@ = _('Amazon EKS integration allows you to provision EKS clusters from GitLab.') .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-eks-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-eks-settings'), html: { class: 'fieldset-form', id: 'eks-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml index 97e09476e78..abd182027b1 100644 --- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml +++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml @@ -8,7 +8,7 @@ = _('External Classification Policy Authorization') .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form', id: 'external-auth-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_gitpod.html.haml b/app/views/admin/application_settings/_gitpod.html.haml index 48b0c6be0a8..6d335e2db16 100644 --- a/app/views/admin/application_settings/_gitpod.html.haml +++ b/app/views/admin/application_settings/_gitpod.html.haml @@ -12,7 +12,7 @@ .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-gitpod-settings'), html: { class: 'fieldset-form', id: 'gitpod-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml index 18d71a90e34..e584aaf9880 100644 --- a/app/views/admin/application_settings/_ip_limits.html.haml +++ b/app/views/admin/application_settings/_ip_limits.html.haml @@ -8,14 +8,14 @@ .form-check = f.check_box :throttle_unauthenticated_enabled, class: 'form-check-input', data: { qa_selector: 'throttle_unauthenticated_checkbox' } = f.label :throttle_unauthenticated_enabled, class: 'form-check-label label-bold' do - Enable unauthenticated request rate limit + = _("Enable unauthenticated request rate limit") %span.form-text.text-muted - Helps reduce request volume (e.g. from crawlers or abusive bots) + = _("Helps reduce request volume (e.g. from crawlers or abusive bots)") .form-group - = f.label :throttle_unauthenticated_requests_per_period, 'Max unauthenticated requests per period per IP', class: 'label-bold' + = f.label :throttle_unauthenticated_requests_per_period, _('Max unauthenticated requests per period per IP'), class: 'label-bold' = f.number_field :throttle_unauthenticated_requests_per_period, class: 'form-control gl-form-input' .form-group - = f.label :throttle_unauthenticated_period_in_seconds, 'Unauthenticated rate limit period in seconds', class: 'label-bold' + = f.label :throttle_unauthenticated_period_in_seconds, _('Unauthenticated rate limit period in seconds'), class: 'label-bold' = f.number_field :throttle_unauthenticated_period_in_seconds, class: 'form-control gl-form-input' %hr %h5 @@ -24,14 +24,14 @@ .form-check = f.check_box :throttle_authenticated_api_enabled, class: 'form-check-input', data: { qa_selector: 'throttle_authenticated_api_checkbox' } = f.label :throttle_authenticated_api_enabled, class: 'form-check-label label-bold' do - Enable authenticated API request rate limit + = _("Enable authenticated API request rate limit") %span.form-text.text-muted - Helps reduce request volume (e.g. from crawlers or abusive bots) + = _("Helps reduce request volume (e.g. from crawlers or abusive bots)") .form-group - = f.label :throttle_authenticated_api_requests_per_period, 'Max authenticated API requests per period per user', class: 'label-bold' + = f.label :throttle_authenticated_api_requests_per_period, _('Max authenticated API requests per period per user'), class: 'label-bold' = f.number_field :throttle_authenticated_api_requests_per_period, class: 'form-control gl-form-input' .form-group - = f.label :throttle_authenticated_api_period_in_seconds, 'Authenticated API rate limit period in seconds', class: 'label-bold' + = f.label :throttle_authenticated_api_period_in_seconds, _('Authenticated API rate limit period in seconds'), class: 'label-bold' = f.number_field :throttle_authenticated_api_period_in_seconds, class: 'form-control gl-form-input' %hr %h5 @@ -44,10 +44,10 @@ %span.form-text.text-muted Helps reduce request volume (e.g. from crawlers or abusive bots) .form-group - = f.label :throttle_authenticated_web_requests_per_period, 'Max authenticated web requests per period per user', class: 'label-bold' + = f.label :throttle_authenticated_web_requests_per_period, _('Max authenticated web requests per period per user'), class: 'label-bold' = f.number_field :throttle_authenticated_web_requests_per_period, class: 'form-control gl-form-input' .form-group - = f.label :throttle_authenticated_web_period_in_seconds, 'Authenticated web rate limit period in seconds', class: 'label-bold' + = f.label :throttle_authenticated_web_period_in_seconds, _('Authenticated web rate limit period in seconds'), class: 'label-bold' = f.number_field :throttle_authenticated_web_period_in_seconds, class: 'form-control gl-form-input' %hr %h5 @@ -57,4 +57,4 @@ = _('A plain-text response to show to clients that hit the rate limit.') = f.text_area :rate_limiting_response_text, placeholder: ::Gitlab::Throttle::DEFAULT_RATE_LIMITING_RESPONSE_TEXT, class: 'form-control gl-form-input', rows: 5 - = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } + = f.submit _('Save changes'), class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_kroki.html.haml b/app/views/admin/application_settings/_kroki.html.haml index fc51942ed1f..b9da2047453 100644 --- a/app/views/admin/application_settings/_kroki.html.haml +++ b/app/views/admin/application_settings/_kroki.html.haml @@ -8,7 +8,7 @@ %p = _('Allow rendering of diagrams in AsciiDoc and Markdown documents using %{link}.').html_safe % { link: link_to('Kroki', 'https://kroki.io', target: '_blank') } .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-kroki-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-kroki-settings'), html: { class: 'fieldset-form', id: 'kroki-settings' } do |f| = form_errors(@application_setting) if expanded %fieldset diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 8f52e8b8461..5d6443825b7 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -3,7 +3,7 @@ %fieldset .form-group - = f.label :max_pages_size, 'Maximum size of pages (MB)', class: 'label-bold' + = f.label :max_pages_size, _('Maximum size of pages (MB)'), class: 'label-bold' = f.number_field :max_pages_size, class: 'form-control gl-form-input' .form-text.text-muted = _("0 for unlimited") diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml index 5ee68e8fd16..50fc11ec7f3 100644 --- a/app/views/admin/application_settings/_performance.html.haml +++ b/app/views/admin/application_settings/_performance.html.haml @@ -6,7 +6,7 @@ .form-check = f.check_box :authorized_keys_enabled, class: 'form-check-input' = f.label :authorized_keys_enabled, class: 'form-check-label' do - Write to "authorized_keys" file + = _('Write to "authorized_keys" file') .form-text.text-muted By default, we write to the "authorized_keys" file to support Git over SSH without additional configuration. GitLab can be optimized @@ -31,4 +31,4 @@ .form-text.text-muted = _('Number of changes (branches or tags) in a single push to determine whether individual push events or bulk push event will be created. Bulk push event will be created if it surpasses that value.') - = f.submit 'Save changes', class: "gl-button btn btn-confirm" + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml index 8f2bdd109cb..f603dcab407 100644 --- a/app/views/admin/application_settings/_performance_bar.html.haml +++ b/app/views/admin/application_settings/_performance_bar.html.haml @@ -6,9 +6,9 @@ .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 - Enable access to the Performance Bar + = _("Enable access to the Performance Bar") .form-group - = f.label :performance_bar_allowed_group_path, 'Allowed group', class: 'label-bold' + = f.label :performance_bar_allowed_group_path, _('Allowed group'), class: 'label-bold' = f.text_field :performance_bar_allowed_group_path, class: 'form-control gl-form-input', placeholder: 'my-org/my-group', value: @application_setting.performance_bar_allowed_group&.full_path - = f.submit 'Save changes', class: 'gl-button btn btn-confirm qa-save-changes-button' + = f.submit _('Save changes'), class: 'gl-button btn btn-confirm qa-save-changes-button' diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml index e6e9bbf3ee0..d57ae94b084 100644 --- a/app/views/admin/application_settings/_plantuml.html.haml +++ b/app/views/admin/application_settings/_plantuml.html.haml @@ -8,7 +8,7 @@ %p = _('Allow rendering of PlantUML diagrams in Asciidoc documents.') .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form', id: 'plantuml-settings' } do |f| = form_errors(@application_setting) if expanded %fieldset diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml index bee120d2f78..545c27d2a7e 100644 --- a/app/views/admin/application_settings/_realtime.html.haml +++ b/app/views/admin/application_settings/_realtime.html.haml @@ -3,15 +3,10 @@ %fieldset .form-group - = f.label :polling_interval_multiplier, 'Polling interval multiplier', class: 'label-bold' + = f.label :polling_interval_multiplier, _('Polling interval multiplier'), class: 'label-bold' = f.text_field :polling_interval_multiplier, class: 'form-control gl-form-input' .form-text.text-muted - Change this value to influence how frequently the GitLab UI polls for updates. - If you set the value to 2 all polling intervals are multiplied - by 2, which means that polling happens half as frequently. - The multiplier can also have a decimal value. - The default value (1) is a reasonable choice for the majority of GitLab - installations. Set to 0 to completely disable polling. + = _("Change this value to influence how frequently the GitLab UI polls for updates. If you set the value to 2 all polling intervals are multiplied by 2, which means that polling happens half as frequently. The multiplier can also have a decimal value. The default value (1) is a reasonable choice for the majority of GitLab installations. Set to 0 to completely disable polling.") = link_to sprite_icon('question-o'), help_page_path('administration/polling') - = f.submit 'Save changes', class: "gl-button btn btn-confirm" + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index fc03a6dd10c..78d4e8c8cc3 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -3,7 +3,7 @@ %fieldset .form-group - = f.label :container_registry_token_expire_delay, 'Authorization token duration (minutes)', class: 'label-bold' + = f.label :container_registry_token_expire_delay, _('Authorization token duration (minutes)'), class: 'label-bold' = f.number_field :container_registry_token_expire_delay, class: 'form-control gl-form-input' .form-group .form-check @@ -31,4 +31,4 @@ .form-text.text-muted = _("The maximum number of tags that a single worker accepts for cleanup. If the number of tags goes above this limit, the list of tags to delete is truncated to this number. To remove this limit, set it to 0.") - = f.submit 'Save changes', class: "gl-button btn btn-confirm" + = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml index ee0281b6e33..edf6853a1aa 100644 --- a/app/views/admin/application_settings/_repository_check.html.haml +++ b/app/views/admin/application_settings/_repository_check.html.haml @@ -3,56 +3,51 @@ %fieldset .sub-section - %h4 Repository checks + %h4= _("Repository checks") .form-group .form-check = f.check_box :repository_checks_enabled, class: 'form-check-input' = f.label :repository_checks_enabled, class: 'form-check-label' do - Enable Repository Checks + = _("Enable Repository Checks") .form-text.text-muted - GitLab will periodically run - %a{ href: 'https://git-scm.com/docs/git-fsck', target: 'blank' } 'git fsck' - in all project and wiki repositories to look for silent disk corruption issues. + - link_to_git_fsck = link_to('git fsck', 'https://git-scm.com/docs/git-fsck', target: '_blank') + = _("GitLab will periodically run %{link_to_git_fsck} in all project and wiki repositories to look for silent disk corruption issues.").html_safe % { link_to_git_fsck: link_to_git_fsck } .form-group .form-text.text-muted - If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database. + = _("If you got a lot of false alarms from repository checks you can choose to clear all repository check information from the database.") - clear_repository_checks_link = _('Clear all repository checks') - clear_repository_checks_message = _('This will clear repository check states for ALL projects in the database. This cannot be undone. Are you sure?') = link_to clear_repository_checks_link, clear_repository_check_states_admin_application_settings_path, data: { confirm: clear_repository_checks_message }, method: :put, class: "gl-button btn btn-sm btn-danger" .sub-section - %h4 Housekeeping + %h4= _("Housekeeping") .form-group .form-check = f.check_box :housekeeping_enabled, class: 'form-check-input' = f.label :housekeeping_enabled, class: 'form-check-label' do - Enable automatic repository housekeeping (git repack, git gc) + = _("Enable automatic repository housekeeping (git repack, git gc)") .form-text.text-muted - If you keep automatic housekeeping disabled for a long time Git - repository access on your GitLab server will become slower and your - repositories will use more disk space. We recommend to always leave - this enabled. + = _("If you keep automatic housekeeping disabled for a long time Git repository access on your GitLab server will become slower and your repositories will use more disk space. We recommend to always leave this enabled.") .form-check = f.check_box :housekeeping_bitmaps_enabled, class: 'form-check-input' = f.label :housekeeping_bitmaps_enabled, class: 'form-check-label' do - Enable Git pack file bitmap creation + = _("Enable Git pack file bitmap creation") .form-text.text-muted - Creating pack file bitmaps makes housekeeping take a little longer but - bitmaps should accelerate 'git clone' performance. + = _("Creating pack file bitmaps makes housekeeping take a little longer but bitmaps should accelerate 'git clone' performance.") .form-group = f.label :housekeeping_incremental_repack_period, 'Incremental repack period', class: 'label-bold' = f.number_field :housekeeping_incremental_repack_period, class: 'form-control gl-form-input' .form-text.text-muted - Number of Git pushes after which an incremental 'git repack' is run. + = _("Number of Git pushes after which an incremental 'git repack' is run.") .form-group = f.label :housekeeping_full_repack_period, 'Full repack period', class: 'label-bold' = f.number_field :housekeeping_full_repack_period, class: 'form-control gl-form-input' .form-text.text-muted - Number of Git pushes after which a full 'git repack' is run. + = _("Number of Git pushes after which a full 'git repack' is run.") .form-group - = f.label :housekeeping_gc_period, 'Git GC period', class: 'label-bold' + = f.label :housekeeping_gc_period, _('Git GC period'), class: 'label-bold' = f.number_field :housekeeping_gc_period, class: 'form-control gl-form-input' .form-text.text-muted - Number of Git pushes after which 'git gc' is run. + = _("Number of Git pushes after which 'git gc' is run.") = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 54bd5cf4072..62d6c973efe 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form' } do |f| += form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form', id: 'signin-settings' } do |f| = form_errors(@application_setting) %fieldset @@ -32,6 +32,15 @@ = f.label :require_two_factor_authentication, class: 'form-check-label' do Require all users to set up Two-factor authentication .form-group + = f.label :admin_mode, _('Admin Mode'), class: 'label-bold' + = sprite_icon('lock', css_class: 'gl-icon') + .form-check + = f.check_box :admin_mode, class: 'form-check-input' + = f.label :admin_mode, class: 'form-check-label' do + = _('Require additional authentication for administrative tasks') + .form-text.text-muted + = link_to _('Learn more.'), help_page_path('user/admin_area/settings/sign_in_restrictions', anchor: 'admin-mode') + .form-group = f.label :unknown_sign_in, _('Email notification for unknown sign-ins'), class: 'label-bold' .form-check = f.check_box :notify_on_unknown_sign_in, class: 'form-check-input' diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml index 272eba67b1b..a5b47159239 100644 --- a/app/views/admin/application_settings/_signup.html.haml +++ b/app/views/admin/application_settings/_signup.html.haml @@ -1,80 +1,20 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-signup-settings'), html: { class: 'fieldset-form' } do |f| - = form_errors(@application_setting) += form_errors(@application_setting) - %fieldset - .form-group - .form-check - = f.check_box :signup_enabled, class: 'form-check-input', data: { qa_selector: 'signup_enabled_checkbox' } - = f.label :signup_enabled, class: 'form-check-label' do - Sign-up enabled - .form-text.text-muted - = _("When enabled, any user visiting %{host} will be able to create an account.") % { host: "#{new_user_session_url(host: Gitlab.config.gitlab.host)}" } - .form-group - .form-check - = f.check_box :require_admin_approval_after_user_signup, class: 'form-check-input', data: { qa_selector: 'require_admin_approval_after_user_signup_checkbox' } - = f.label :require_admin_approval_after_user_signup, class: 'form-check-label' do - = _('Require admin approval for new sign-ups') - .form-text.text-muted - = _("When enabled, any user visiting %{host} and creating an account will have to be explicitly approved by an admin before they can sign in. This setting is effective only if sign-ups are enabled.") % { host: "#{new_user_session_url(host: Gitlab.config.gitlab.host)}" } - .form-group - .form-check - = f.check_box :send_user_confirmation_email, class: 'form-check-input' - = f.label :send_user_confirmation_email, class: 'form-check-label' do - Send confirmation email on sign-up - - = render_if_exists 'admin/application_settings/new_user_signups_cap', form: f - - .form-group - = f.label :minimum_password_length, _('Minimum password length (number of characters)'), class: 'label-bold' - = f.number_field :minimum_password_length, class: 'form-control gl-form-input', rows: 4, min: ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH, max: Devise.password_length.max - - password_policy_guidelines_link = link_to _('Password Policy Guidelines'), 'https://about.gitlab.com/handbook/security/#gitlab-password-policy-guidelines', target: '_blank', rel: 'noopener noreferrer nofollow' - .form-text.text-muted - = _("See GitLab's %{password_policy_guidelines}").html_safe % { password_policy_guidelines: password_policy_guidelines_link } - .form-group - = f.label :domain_allowlist, _('Allowed domains for sign-ups'), class: 'label-bold' - = f.text_area :domain_allowlist_raw, placeholder: 'domain.com', class: 'form-control gl-form-input', rows: 8 - .form-text.text-muted ONLY users with e-mail addresses that match these domain(s) will be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com - .form-group - = f.label :domain_denylist_enabled, _('Domain denylist'), class: 'label-bold' - .form-check - = f.check_box :domain_denylist_enabled, class: 'form-check-input' - = f.label :domain_denylist_enabled, class: 'form-check-label' do - Enable domain denylist for sign ups - .form-group - .form-check - = radio_button_tag :denylist_type, :file, false, class: 'form-check-input' - = label_tag :denylist_type_file, class: 'form-check-label' do - .option-title - Upload denylist file - .form-check - = radio_button_tag :denylist_type, :raw, @application_setting.domain_denylist.present? || @application_setting.domain_denylist.blank?, class: 'form-check-input' - = label_tag :denylist_type_raw, class: 'form-check-label' do - .option-title - Enter denylist manually - .form-group.js-denylist-file - = f.label :domain_denylist_file, _('Denylist file'), class: 'label-bold' - = f.file_field :domain_denylist_file, class: 'form-control gl-form-input', accept: '.txt,.conf' - .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines or commas for multiple entries. - .form-group.js-denylist-raw - = f.label :domain_denylist, _('Denied domains for sign-ups'), class: 'label-bold' - = f.text_area :domain_denylist_raw, placeholder: 'domain.com', class: 'form-control gl-form-input', rows: 8 - .form-text.text-muted Users with e-mail addresses that match these domain(s) will NOT be able to sign-up. Wildcards allowed. Use separate lines for multiple entries. Ex: domain.com, *.domain.com - .form-group - = f.label :email_restrictions_enabled, _('Email restrictions'), class: 'label-bold' - .form-check - = f.check_box :email_restrictions_enabled, class: 'form-check-input' - = f.label :email_restrictions_enabled, class: 'form-check-label' do - = _('Enable email restrictions for sign ups') - .form-group - = f.label :email_restrictions, _('Email restrictions for sign-ups'), class: 'label-bold' - = f.text_area :email_restrictions, class: 'form-control gl-form-input', rows: 4 - .form-text.text-muted - - supported_syntax_link_url = 'https://github.com/google/re2/wiki/Syntax' - - supported_syntax_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: supported_syntax_link_url } - = _('Restricts sign-ups for email addresses that match the given regex. See the %{supported_syntax_link_start}supported syntax%{supported_syntax_link_end} for more information.').html_safe % { supported_syntax_link_start: supported_syntax_link_start, supported_syntax_link_end: '</a>'.html_safe } - - .form-group - = f.label :after_sign_up_text, class: 'label-bold' - = f.text_area :after_sign_up_text, class: 'form-control gl-form-input', rows: 4 - .form-text.text-muted Markdown enabled - = f.submit 'Save changes', class: "gl-button btn btn-confirm", data: { qa_selector: 'save_changes_button' } +#js-signup-form{ data: { host: new_user_session_url(host: Gitlab.config.gitlab.host), + settings_path: general_admin_application_settings_path(anchor: 'js-signup-settings'), + signup_enabled: @application_setting[:signup_enabled].to_s, + require_admin_approval_after_user_signup: @application_setting[:require_admin_approval_after_user_signup].to_s, + send_user_confirmation_email: @application_setting[:send_user_confirmation_email].to_s, + minimum_password_length: @application_setting[:minimum_password_length], + minimum_password_length_min: ApplicationSetting::DEFAULT_MINIMUM_PASSWORD_LENGTH, + minimum_password_length_max: Devise.password_length.max, + minimum_password_length_help_link: 'https://about.gitlab.com/handbook/security/#gitlab-password-policy-guidelines', + domain_allowlist_raw: @application_setting.domain_allowlist_raw, + new_user_signups_cap: @application_setting[:new_user_signups_cap].to_s, + domain_denylist_enabled: @application_setting[:domain_denylist_enabled].to_s, + denylist_type_raw_selected: (@application_setting.domain_denylist.present? || @application_setting.domain_denylist.blank?).to_s, + domain_denylist_raw: @application_setting.domain_denylist_raw, + email_restrictions_enabled: @application_setting[:email_restrictions_enabled].to_s, + supported_syntax_link_url: 'https://github.com/google/re2/wiki/Syntax', + email_restrictions: @application_setting.email_restrictions, + after_sign_up_text: @application_setting[:after_sign_up_text] } } diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index e6ac2a4db34..5daf220d81c 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -8,7 +8,7 @@ %p = _('Configure the %{link} integration.').html_safe % { link: link_to('Snowplow', 'https://snowplowanalytics.com/', target: '_blank') } .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-snowplow-settings'), html: { class: 'fieldset-form', id: 'snowplow-settings' } do |f| = form_errors(@application_setting) if expanded %fieldset diff --git a/app/views/admin/application_settings/_sourcegraph.html.haml b/app/views/admin/application_settings/_sourcegraph.html.haml index af25577f058..d87ded09a2b 100644 --- a/app/views/admin/application_settings/_sourcegraph.html.haml +++ b/app/views/admin/application_settings/_sourcegraph.html.haml @@ -16,7 +16,7 @@ .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-sourcegraph-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-sourcegraph-settings'), html: { class: 'fieldset-form', id: 'sourcegraph-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_terminal.html.haml b/app/views/admin/application_settings/_terminal.html.haml index 487ce25a4da..482466c4b3b 100644 --- a/app/views/admin/application_settings/_terminal.html.haml +++ b/app/views/admin/application_settings/_terminal.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terminal-settings'), html: { class: 'fieldset-form' } do |f| += form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terminal-settings'), html: { class: 'fieldset-form', id: 'terminal-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml index 8cc4169b383..fe260812ad9 100644 --- a/app/views/admin/application_settings/_terms.html.haml +++ b/app/views/admin/application_settings/_terms.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form' } do |f| += form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form', id: 'terms-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml index 970c9c6b003..5df2454ed2e 100644 --- a/app/views/admin/application_settings/_third_party_offers.html.haml +++ b/app/views/admin/application_settings/_third_party_offers.html.haml @@ -8,7 +8,7 @@ %p = _('Control the display of third party offers.') .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form', id: 'third-party-offers-settings' } do |f| = form_errors(@application_setting) if expanded %fieldset diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 00306e1ba06..a2d61bd010f 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -27,7 +27,7 @@ - usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: usage_ping_path } %p.mb-2= s_('%{usage_ping_link_start}Learn more%{usage_ping_link_end} about what information is shared with GitLab Inc.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: '</a>'.html_safe } - %button.btn.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } } + %button.gl-button.btn.btn-default.js-payload-preview-trigger{ type: 'button', data: { payload_selector: ".#{payload_class}" } } .spinner.js-spinner.d-none .js-text.d-inline= _('Preview payload') %pre.usage-data.js-syntax-highlight.code.highlight.mt-2.d-none{ class: payload_class, data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } 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 e51a41d5254..4bf47c3d60d 100644 --- a/app/views/admin/application_settings/_visibility_and_access.html.haml +++ b/app/views/admin/application_settings/_visibility_and_access.html.haml @@ -1,4 +1,4 @@ -= form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form' } do |f| += 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 diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml index aa4cebdb603..919f501d2ee 100644 --- a/app/views/admin/application_settings/ci/_header.html.haml +++ b/app/views/admin/application_settings/ci/_header.html.haml @@ -8,7 +8,7 @@ %p = _('Variables store information, like passwords and secret keys, that you can use in job scripts. All projects on the instance can use these variables.') - = link_to s_('Learn more.'), help_page_path('ci/variables/README', anchor: 'instance-level-cicd-variables'), target: '_blank', rel: 'noopener noreferrer' + = link_to s_('Learn more.'), help_page_path('ci/variables/README', anchor: 'instance-cicd-variables'), target: '_blank', rel: 'noopener noreferrer' %p = _('Variables can be:') %ul @@ -16,4 +16,4 @@ = html_escape(_('%{code_open}Protected:%{code_close} Only exposed to protected branches or tags.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } %li = html_escape(_('%{code_open}Masked:%{code_close} Hidden in job logs. Must match masking requirements.')) % { code_open: '<code>'.html_safe, code_close: '</code>'.html_safe } - = link_to _('Learn more.'), help_page_path('ci/variables/README', anchor: 'masked-variable-requirements'), target: '_blank', rel: 'noopener noreferrer' + = link_to _('Learn more.'), help_page_path('ci/variables/README', anchor: 'mask-a-cicd-variable'), target: '_blank', rel: 'noopener noreferrer' diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml index 485fb71d111..d38b4cba40a 100644 --- a/app/views/admin/application_settings/ci_cd.html.haml +++ b/app/views/admin/application_settings/ci_cd.html.haml @@ -2,16 +2,15 @@ - page_title _("CI/CD") - @content_class = "limit-container-width" unless fluid_layout -- if ::Gitlab::Ci::Features.instance_variables_ui_enabled? - %section.settings.no-animate#js-ci-cd-variables{ class: ('expanded' if expanded_by_default?) } - .settings-header - = render 'admin/application_settings/ci/header', expanded: expanded_by_default? - .settings-content - - if ci_variable_protected_by_default? - %p.settings-message.text-center - - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/README', anchor: 'protect-a-custom-variable') } - = s_('Environment variables on this GitLab instance are configured to be %{link_start}protected%{link_end} by default.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } - #js-instance-variables{ data: { endpoint: admin_ci_variables_path, group: 'true', maskable_regex: ci_variable_maskable_regex, protected_by_default: ci_variable_protected_by_default?.to_s} } +%section.settings.no-animate#js-ci-cd-variables{ class: ('expanded' if expanded_by_default?) } + .settings-header + = render 'admin/application_settings/ci/header', expanded: expanded_by_default? + .settings-content + - if ci_variable_protected_by_default? + %p.settings-message.text-center + - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/README', anchor: 'protect-a-cicd-variable') } + = s_('Environment variables on this GitLab instance are configured to be %{link_start}protected%{link_end} by default.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + #js-instance-variables{ data: { endpoint: admin_ci_variables_path, group: 'true', maskable_regex: ci_variable_maskable_regex, protected_by_default: ci_variable_protected_by_default?.to_s} } %section.settings.as-ci-cd.no-animate#js-ci-cd-settings{ class: ('expanded' if expanded_by_default?) } .settings-header diff --git a/app/views/admin/application_settings/general.html.haml b/app/views/admin/application_settings/general.html.haml index 3a14b4fbc7b..86226a9de2f 100644 --- a/app/views/admin/application_settings/general.html.haml +++ b/app/views/admin/application_settings/general.html.haml @@ -90,7 +90,7 @@ %p = _('Manage Web IDE features') .settings-content - = form_for @application_setting, url: general_admin_application_settings_path(anchor: "#js-web-ide-settings"), html: { class: 'fieldset-form' } do |f| + = form_for @application_setting, url: general_admin_application_settings_path(anchor: "#js-web-ide-settings"), html: { class: 'fieldset-form', id: 'web-ide-settings' } do |f| = form_errors(@application_setting) %fieldset diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index 949908b09a7..93bc054754e 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -13,8 +13,8 @@ .gl-alert-actions = link_to s_('AdminSettings|Go to General Settings'), general_admin_application_settings_path, class: 'btn gl-alert-action btn-info gl-button' -%h4= s_('AdminSettings|Apply integration settings to all Projects') -%p - = s_('AdminSettings|Integrations configured here will automatically apply to all projects on this instance.') - = link_to _('Learn more'), integrations_help_page_path, target: '_blank', rel: 'noopener noreferrer' +%h3= s_('Integrations|Project integration management') + +- integrations_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: integrations_help_page_path } +%p= s_('Integrations|As a GitLab administrator, you can set default configuration parameters for a given integration that all projects can inherit and use. When you set these parameters, your changes update the integration for all projects that are not already using custom settings. Learn more about %{integrations_link_start}Project integration management%{link_end}.').html_safe % { integrations_link_start: integrations_link_start, link_end: '</a>'.html_safe } = render 'shared/integrations/index', integrations: @integrations diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index 21908c08690..9a4bb9b0a48 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -1,5 +1,5 @@ .broadcast-message.broadcast-banner-message.gl-alert-warning.js-broadcast-banner-message-preview.gl-mt-3{ style: broadcast_message_style(@broadcast_message), class: ('gl-display-none' unless @broadcast_message.banner? ) } - = sprite_icon('bullhorn', css_class:'vertical-align-text-top') + = sprite_icon('bullhorn', css_class: 'vertical-align-text-top') .js-broadcast-message-preview - if @broadcast_message.message.present? = render_broadcast_message(@broadcast_message) @@ -7,7 +7,7 @@ Your message here .d-flex.justify-content-center .broadcast-message.broadcast-notification-message.preview.js-broadcast-notification-message-preview.mt-2{ class: ('hidden' unless @broadcast_message.notification? ) } - = sprite_icon('bullhorn', css_class:'vertical-align-text-top') + = sprite_icon('bullhorn', css_class: 'vertical-align-text-top') .js-broadcast-message-preview - if @broadcast_message.message.present? = render_broadcast_message(@broadcast_message) diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index a14d342bc14..9dce33bf037 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -2,10 +2,9 @@ - page_title _("Broadcast Messages") %h3.page-title - Broadcast Messages + = _('Broadcast Messages') %p.light - Broadcast messages are displayed for every user and can be used to notify - users about scheduled maintenance, recent upgrades and more. + = _('Broadcast messages are displayed for every user and can be used to notify users about scheduled maintenance, recent upgrades and more.') = render 'form' @@ -15,12 +14,12 @@ %table.table.table-responsive %thead %tr - %th Status - %th Preview - %th Starts - %th Ends - %th Target Path - %th Type + %th= _('Status') + %th= _('Preview') + %th= _('Starts') + %th= _('Ends') + %th= _(' Target Path') + %th= _(' Type') %th %tbody - @broadcast_messages.each do |message| @@ -38,7 +37,7 @@ %td = message.broadcast_type.capitalize %td.gl-white-space-nowrap.gl-display-flex - = link_to sprite_icon('pencil-square', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn btn-icon gl-button' - = link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-icon gl-button btn-danger ml-2' + = link_to sprite_icon('pencil-square', css_class: 'gl-icon'), edit_admin_broadcast_message_path(message), title: _('Edit'), class: 'btn btn-icon gl-button' + = link_to sprite_icon('remove', css_class: 'gl-icon'), admin_broadcast_message_path(message), method: :delete, remote: true, title: _('Remove'), class: 'js-remove-tr btn btn-icon gl-button btn-danger ml-2' = paginate @broadcast_messages, theme: 'gitlab' diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index f16158d5656..e34808665bb 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -101,7 +101,7 @@ enabled: Gitlab.config.registry.enabled, doc_href: help_page_path('user/packages/container_registry/index')) - = feature_entry(_('Gitlab Pages'), + = feature_entry(_('GitLab Pages'), enabled: Gitlab.config.pages.enabled, doc_href: help_instance_configuration_url) @@ -119,8 +119,7 @@ %p = link_to _('GitLab'), general_admin_application_settings_path %span.float-right - = Gitlab::VERSION - = "(#{Gitlab.revision})" + = link_to_version %p = _('GitLab Shell') %span.float-right @@ -165,27 +164,30 @@ .gl-card-body %h4= s_('AdminArea|Latest projects') - @projects.each do |project| - %p - = link_to project.full_name, admin_project_path(project), class: 'str-truncated-60' - %span.light.float-right + .gl-display-flex.gl-py-3 + .gl-mr-auto.gl-overflow-hidden.gl-text-overflow-ellipsis + = link_to project.full_name, admin_project_path(project) + %span.gl-white-space-nowrap.gl-text-right #{time_ago_with_tooltip(project.created_at)} .col-md-4.gl-mb-6 .gl-card .gl-card-body %h4= s_('AdminArea|Latest users') - @users.each do |user| - %p - = link_to [:admin, user], class: 'str-truncated-60' do - = user.name - %span.light.float-right + .gl-display-flex.gl-py-3 + .gl-mr-auto.gl-overflow-hidden.gl-text-overflow-ellipsis + = link_to [:admin, user] do + = user.name + %span.gl-white-space-nowrap.gl-text-right #{time_ago_with_tooltip(user.created_at)} .col-md-4.gl-mb-6 .gl-card .gl-card-body %h4= s_('AdminArea|Latest groups') - @groups.each do |group| - %p - = link_to [:admin, group], class: 'str-truncated-60' do - = group.full_name - %span.light.float-right + .gl-display-flex.gl-py-3 + .gl-mr-auto.gl-overflow-hidden.gl-text-overflow-ellipsis + = link_to [:admin, group] do + = group.full_name + %span.gl-white-space-nowrap.gl-text-right #{time_ago_with_tooltip(group.created_at)} diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml index dc49db6557b..0eaf7b60b25 100644 --- a/app/views/admin/deploy_keys/new.html.haml +++ b/app/views/admin/deploy_keys/new.html.haml @@ -1,5 +1,5 @@ - page_title _('New Deploy Key') -%h3.page-title New public deploy key +%h3.page-title= _('New public deploy key') %hr %div diff --git a/app/views/admin/dev_ops_report/_callout.html.haml b/app/views/admin/dev_ops_report/_callout.html.haml index 7507f433af8..f313865478d 100644 --- a/app/views/admin/dev_ops_report/_callout.html.haml +++ b/app/views/admin/dev_ops_report/_callout.html.haml @@ -1,7 +1,7 @@ .gl-mt-3 .user-callout{ data: { uid: 'dev_ops_report_intro_callout_dismissed' } } .bordered-box.landing.content-block - %button.btn.btn-default.close.js-close-callout{ type: 'button', + %button.gl-button.btn.btn-default-tertiary.close.js-close-callout{ type: 'button', 'aria-label' => _('Dismiss DevOps Report introduction') } = sprite_icon('close', size: 16, css_class: 'dismiss-icon') .user-callout-copy diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 15306ab7878..84a9b988d22 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -3,6 +3,8 @@ = render 'shared/group_form', f: f = render 'shared/group_form_description', f: f + = render 'shared/admin/admin_note_form', f: f + = render_if_exists 'shared/old_repository_size_limit_setting', form: f, type: :group = render_if_exists 'admin/namespace_plan', f: f diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index f8c490dd948..5f8ec5086bd 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -62,6 +62,7 @@ = link_to sprite_icon('question-o'), help_page_path('topics/git/lfs/index') = render_if_exists 'namespaces/shared_runner_status', namespace: @group + = render_if_exists 'namespaces/additional_minutes_status', namespace: @group = render 'shared/custom_attributes', custom_attributes: @group.custom_attributes @@ -103,6 +104,8 @@ %span.monospace= project.full_path + '.git' .col-md-6 + = render 'shared/admin/admin_note' + - if can?(current_user, :admin_group_member, @group) .card .card-header @@ -124,7 +127,7 @@ .card .card-header = html_escape(_("%{group_name} group members")) % { group_name: "<strong>#{html_escape(@group.name)}</strong>".html_safe } - %span.badge.badge-pill= @group.members.size + %span.badge.badge-pill= @group.users_count .float-right = link_to group_group_members_path(@group), class: 'btn btn-default gl-button btn-sm' do = sprite_icon('pencil-square', css_class: 'gl-icon') diff --git a/app/views/admin/hook_logs/_index.html.haml b/app/views/admin/hook_logs/_index.html.haml index 5e70e80cff7..61af7535c1e 100644 --- a/app/views/admin/hook_logs/_index.html.haml +++ b/app/views/admin/hook_logs/_index.html.haml @@ -1,18 +1,18 @@ .row.gl-mt-3.gl-mb-3 .col-lg-3 %h4.gl-mt-0 - Recent Deliveries - %p When an event in GitLab triggers a webhook, you can use the request details to figure out if something went wrong. + = _('Recent Deliveries') + %p= _('When an event in GitLab triggers a webhook, you can use the request details to figure out if something went wrong.') .col-lg-9 - if hook_logs.any? %table.table %thead %tr - %th Status - %th Trigger - %th URL - %th Elapsed time - %th Request time + %th= _('Status') + %th= _('Trigger') + %th= _('URL') + %th= _('Elapsed time') + %th= _('Request time') %th - hook_logs.each do |hook_log| %tr @@ -28,10 +28,10 @@ %td.light = time_ago_with_tooltip(hook_log.created_at) %td - = link_to 'View details', admin_hook_hook_log_path(hook, hook_log) + = link_to _('View details'), admin_hook_hook_log_path(hook, hook_log) = paginate hook_logs, theme: 'gitlab' - else .settings-message.text-center - You don't have any webhooks deliveries + = _("You don't have any webhooks deliveries") diff --git a/app/views/admin/labels/_label.html.haml b/app/views/admin/labels/_label.html.haml index b31b9bdab0a..a357c3d9d34 100644 --- a/app/views/admin/labels/_label.html.haml +++ b/app/views/admin/labels/_label.html.haml @@ -1,7 +1,7 @@ %li.label-list-item{ id: dom_id(label) } = render "shared/label_row", label: label.present(issuable_subject: nil) .label-actions-list - = link_to edit_admin_label_path(label), class: 'btn gl-button btn-transparent label-action has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do + = link_to edit_admin_label_path(label), class: 'btn btn-default gl-button btn-default-tertiary label-action has-tooltip', title: _('Edit'), data: { placement: 'bottom' }, aria_label: _('Edit') do = sprite_icon('pencil') - = link_to admin_label_path(label), class: 'btn gl-button btn-transparent remove-row label-action has-tooltip', title: _('Delete'), data: { placement: 'bottom', confirm: "Delete this label? Are you sure?" }, aria_label: _('Delete'), method: :delete, remote: true do + = link_to admin_label_path(label), class: 'btn btn-default gl-button btn-default-tertiary hover-red js-remove-row label-action has-tooltip', title: _('Delete'), data: { placement: 'bottom', confirm: "Delete this label? Are you sure?" }, aria_label: _('Delete'), method: :delete, remote: true do = sprite_icon('remove') diff --git a/app/views/admin/labels/index.html.haml b/app/views/admin/labels/index.html.haml index 6861a802a63..6007d891aad 100644 --- a/app/views/admin/labels/index.html.haml +++ b/app/views/admin/labels/index.html.haml @@ -7,7 +7,7 @@ = _('Labels') %hr -.labels.labels-container.admin-labels +.labels.labels-container.admin-labels.gl-bg-gray-10.gl-border-solid.gl-border-1.gl-border-gray-100 - if @labels.present? %ul.manage-labels-list = render @labels diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index c2e40413a14..7e505729213 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -4,7 +4,7 @@ - @projects.each_with_index do |project| %li.project-row{ class: ('no-description' if project.description.blank?) } .controls - = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn gl-button btn-default" + = link_to _('Edit'), edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn gl-button btn-default" %button.delete-project-button.gl-button.btn.btn-danger{ data: { delete_project_url: admin_project_path(project), project_name: project.name } } = s_('AdminProjects|Delete') @@ -31,6 +31,6 @@ = paginate @projects, theme: 'gitlab' - else - .nothing-here-block No projects found + .nothing-here-block= _('No projects found') #delete-project-modal diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml index 50f3c94bcb3..79d77790b02 100644 --- a/app/views/admin/projects/index.html.haml +++ b/app/views/admin/projects/index.html.haml @@ -18,20 +18,20 @@ .search-holder = render 'shared/projects/search_form', autofocus: true, admin_view: true .dropdown - - toggle_text = 'Namespace' + - toggle_text = _('Namespace') - if params[:namespace_id].present? = hidden_field_tag :namespace_id, params[:namespace_id] - namespace = Namespace.find(params[:namespace_id]) - toggle_text = "#{namespace.kind}: #{namespace.full_path}" = dropdown_toggle(toggle_text, { toggle: 'dropdown', is_filter: 'true' }, { toggle_class: 'js-namespace-select large' }) .dropdown-menu.dropdown-select.dropdown-menu-right - = dropdown_title('Namespaces') - = dropdown_filter("Search for Namespace") + = dropdown_title(_('Namespaces')) + = dropdown_filter(_("Search for Namespace")) = dropdown_content = dropdown_loading = render 'shared/projects/dropdown' = link_to new_project_path, class: 'gl-button btn btn-confirm' do - New Project - = button_tag "Search", class: "gl-button btn btn-confirm btn-search hide" + = _('New Project') + = button_tag _("Search"), class: "gl-button btn btn-confirm btn-search hide" = render 'projects' diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml index 0d819dc5b47..c3e4626c14e 100644 --- a/app/views/admin/runners/_runner.html.haml +++ b/app/views/admin/runners/_runner.html.haml @@ -1,27 +1,28 @@ +-# Note: This file should stay aligned with: +-# `app/views/groups/runners/_runner.html.haml` + .gl-responsive-table-row{ id: dom_id(runner) } .table-section.section-10.section-wrap .table-mobile-header{ role: 'rowheader' }= _('Type') .table-mobile-content - if runner.instance_type? - %span.badge.badge-success shared + %span.badge.badge-pill.gl-badge.sm.badge-success= _("shared") - elsif runner.group_type? - %span.badge.badge-success group + %span.badge.badge-pill.gl-badge.sm.badge-success= _("group") - else - %span.badge.badge-info specific + %span.badge.badge-pill.gl-badge.sm.badge-info= _("specific") - if runner.locked? - %span.badge.badge-warning locked + %span.badge.badge-pill.gl-badge.sm.badge-warning= _("locked") - unless runner.active? - %span.badge.badge-danger paused + %span.badge.badge-pill.gl-badge.sm.badge-danger= _("paused") - .table-section.section-10 - .table-mobile-header{ role: 'rowheader' }= _('Runner token') + .table-section.section-30 + .table-mobile-header{ role: 'rowheader' }= s_('Runners|Runner') .table-mobile-content - = link_to runner.short_sha, admin_runner_path(runner) - - .table-section.section-20 - .table-mobile-header{ role: 'rowheader' }= _('Description') - .table-mobile-content.str-truncated.has-tooltip{ title: runner.description } - = runner.description + = link_to("##{runner.id} (#{runner.short_sha})", admin_runner_path(runner)) + .gl-text-truncate + %span{ title: runner.description, data: { toggle: 'tooltip', container: 'body' } } + = runner.description .table-section.section-10 .table-mobile-header{ role: 'rowheader' }= _('Version') @@ -65,15 +66,15 @@ .table-section.table-button-footer.section-10 .btn-group.table-action-buttons .btn-group - = link_to admin_runner_path(runner), class: 'gl-button btn btn-default has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do - = sprite_icon('pencil') + = link_to admin_runner_path(runner), class: 'gl-button btn btn-default btn-icon has-tooltip', title: _('Edit'), ref: 'tooltip', aria: { label: _('Edit') }, data: { placement: 'top', container: 'body'} do + = sprite_icon('pencil', css_class: 'gl-icon') .btn-group - if runner.active? - = link_to [:pause, :admin, runner], method: :post, class: 'gl-button btn btn-default btn-svg has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do - = sprite_icon('pause') + = link_to [:pause, :admin, runner], method: :post, class: 'gl-button btn btn-default btn-icon has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do + = sprite_icon('pause', css_class: 'gl-icon') - else - = link_to [:resume, :admin, runner], method: :post, class: 'gl-button btn btn-default btn-svg has-tooltip gl-px-3', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do - = sprite_icon('play') + = link_to [:resume, :admin, runner], method: :post, class: 'gl-button btn btn-default btn-icon has-tooltip gl-px-3', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do + = sprite_icon('play', css_class: 'gl-icon') .btn-group - = link_to [:admin, runner], method: :delete, class: 'gl-button btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do - = sprite_icon('close') + = link_to [:admin, runner], method: :delete, class: 'gl-button btn btn-danger btn-icon has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do + = sprite_icon('close', css_class: 'gl-icon') diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 8e62dae6c4d..a38615d9b1b 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -50,7 +50,7 @@ .filtered-search-box = dropdown_tag(_('Recent searches'), options: { wrapper_class: 'filtered-search-history-dropdown-wrapper', - toggle_class: 'btn filtered-search-history-dropdown-toggle-button', + toggle_class: 'gl-button btn btn-default filtered-search-history-dropdown-toggle-button', dropdown_class: 'filtered-search-history-dropdown', content_class: 'filtered-search-history-dropdown-content' }) do .js-filtered-search-history-dropdown{ data: { full_path: admin_runners_path } } @@ -72,7 +72,7 @@ #js-dropdown-operator.filtered-search-input-dropdown-menu.dropdown-menu %ul.filter-dropdown{ data: { dropdown: true, dynamic: true } } %li.filter-dropdown-item{ data: { value: "{{ title }}" } } - %button.btn.btn-link{ type: 'button' } + %button.gl-button.btn.btn-link{ type: 'button' } {{ title }} %span.btn-helptext {{ help }} @@ -100,12 +100,12 @@ #js-dropdown-runner-tag.filtered-search-input-dropdown-menu.dropdown-menu %ul{ data: { dropdown: true } } %li.filter-dropdown-item{ data: { value: 'none' } } - %button.btn.btn-link + %button.gl-button.btn.btn-link = _('No Tag') %li.divider.droplab-item-ignore %ul.filter-dropdown{ data: { dynamic: true, dropdown: true } } %li.filter-dropdown-item - %button.btn.btn-link.js-data-value + %button.gl-button.btn.btn-link.js-data-value %span.dropdown-light-content {{name}} @@ -118,12 +118,11 @@ = _('Runners currently online: %{active_runners_count}') % { active_runners_count: @active_runners_count } - if @runners.any? - .runners-content.content-list + .content-list{ data: { testid: 'runners-table' } } .table-holder .gl-responsive-table-row.table-row-header{ role: 'row' } .table-section.section-10{ role: 'rowheader' }= _('Type/State') - .table-section.section-10{ role: 'rowheader' }= _('Runner token') - .table-section.section-20{ role: 'rowheader' }= _('Description') + .table-section.section-30{ role: 'rowheader' }= s_('Runners|Runner') .table-section.section-10{ role: 'rowheader' }= _('Version') .table-section.section-10{ role: 'rowheader' }= _('IP Address') .table-section.section-5{ role: 'rowheader' }= _('Projects') diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml index aca50de3852..705716c09b7 100644 --- a/app/views/admin/runners/show.html.haml +++ b/app/views/admin/runners/show.html.haml @@ -1,34 +1,17 @@ - add_page_specific_style 'page_bundles/ci_status' -= content_for :title do - %h3.project-title - Runner ##{@runner.id} - .float-right - - if @runner.instance_type? - %span.runner-state.runner-state-shared - Shared - - else - %span.runner-state.runner-state-specific - Specific - - page_title @runner.short_sha -- add_to_breadcrumbs _("Runners"), admin_runners_path -- breadcrumb_title "##{@runner.id}" +- add_to_breadcrumbs _('Runners'), admin_runners_path +- breadcrumb_title page_title -- if @runner.instance_type? - .bs-callout.bs-callout-success - %h4= _('This runner processes jobs for all unassigned projects.') - %p - = _('If you want a runner to build only specific projects, restrict the project in the table below. After you restrict a runner to a project, you cannot change it back to a shared runner.') -- elsif @runner.group_type? - .bs-callout.bs-callout-success - %h4= _('This runner processes jobs for all projects in its group and subgroups.') +- if Feature.enabled?(:runner_detailed_view_vue_ui, current_user, default_enabled: :yaml) + #js-runner-detail{ data: {runner_id: @runner.id} } - else - .bs-callout.bs-callout-info - %h4= _('This runner processes jobs for assigned projects only.') - %p - = _('You cannot make this a shared runner.') -%hr + %h2.page-title + = s_('Runners|Runner #%{runner_id}' % { runner_id: @runner.id }) + = render 'shared/runners/runner_type_badge', runner: @runner + += render 'shared/runners/runner_type_alert', runner: @runner .gl-mb-6 = render 'shared/runners/form', runner: @runner, runner_form_url: admin_runner_path(@runner), in_gitlab_com_admin_context: Gitlab.com? @@ -37,7 +20,7 @@ .col-md-6 %h4= _('Restrict projects for this runner') - if @runner.projects.any? - %table.table.assigned-projects + %table.table{ data: { testid: 'assigned-projects' } } %thead %tr %th= _('Assigned projects') @@ -54,7 +37,7 @@ .gl-alert-actions = link_to s_('Disable'), admin_namespace_project_runner_project_path(project.namespace, project, runner_project), method: :delete, class: 'btn gl-alert-action btn-info btn-md gl-button' - %table.table.unassigned-projects + %table.table{ data: { testid: 'unassigned-projects' } } %thead %tr %th= _('Project') diff --git a/app/views/admin/serverless/domains/index.html.haml b/app/views/admin/serverless/domains/index.html.haml index bd3c6bc6e04..c2b6baed4de 100644 --- a/app/views/admin/serverless/domains/index.html.haml +++ b/app/views/admin/serverless/domains/index.html.haml @@ -10,7 +10,7 @@ .settings-header %h4 = _('Serverless domain') - %button.btn.btn-default.js-settings-toggle{ type: 'button' } + %button.gl-button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') %p = _('Set an instance-wide domain that will be available to all clusters when installing Knative.') diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index c17ab5e08a7..4d9fa6d3d57 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -1,7 +1,9 @@ += render "service_templates_deprecated_alert" + %h3.page-title = @service.title -%p #{@service.description} template. +%p= @service.description = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'fieldset-form js-integration-settings-form' } do |form| = render 'shared/service_settings', form: form, integration: @service diff --git a/app/views/admin/services/_service_templates_deprecated_alert.html.haml b/app/views/admin/services/_service_templates_deprecated_alert.html.haml new file mode 100644 index 00000000000..0cc44099049 --- /dev/null +++ b/app/views/admin/services/_service_templates_deprecated_alert.html.haml @@ -0,0 +1,8 @@ +- doc_link_start = "<a href=\"#{integrations_help_page_path}\" target='_blank' rel='noopener noreferrer'>".html_safe +- settings_link_start = "<a href=\"#{integrations_admin_application_settings_path}\">".html_safe + +.gl-alert.gl-alert-danger.gl-mt-5{ role: 'alert' } + = sprite_icon('error', css_class: 'gl-alert-icon gl-alert-icon-no-title') + %h4.gl-alert-title= s_('AdminSettings|Service templates are deprecated and will be removed in GitLab 14.0.') + .gl-alert-body + = html_escape_once(s_("AdminSettings|You can't add new templates. To migrate or remove a Service template, create a new integration at %{settings_link_start}Settings > Integrations%{link_end}. Learn more about %{doc_link_start}Project integration management%{link_end}.")).html_safe % { settings_link_start: settings_link_start, doc_link_start: doc_link_start, link_end: '</a>'.html_safe } diff --git a/app/views/admin/services/index.html.haml b/app/views/admin/services/index.html.haml index 3517beac976..91706452402 100644 --- a/app/views/admin/services/index.html.haml +++ b/app/views/admin/services/index.html.haml @@ -1,23 +1,13 @@ - page_title _("Service Templates") - @content_class = 'limit-container-width' unless fluid_layout -- if show_service_templates_deprecated? - .gl-alert.gl-alert-tip.js-service-templates-deprecated.gl-mt-5{ role: 'alert', data: { feature_id: UserCalloutsHelper::SERVICE_TEMPLATES_DEPRECATED, dismiss_endpoint: user_callouts_path } } - = sprite_icon('bulb', css_class: 'gl-alert-icon gl-alert-icon-no-title') - %button.js-close.gl-alert-dismiss{ type: 'button', aria: { label: _('Dismiss') } } - = sprite_icon('close') - %h4.gl-alert-title= s_('AdminSettings|Service Templates will soon be deprecated.') - .gl-alert-body - = s_('AdminSettings|Try using the latest version of Integrations instead.') - .gl-alert-actions - = link_to _('Go to Integrations'), integrations_admin_application_settings_path, class: 'btn btn-info gl-alert-action gl-button' - = link_to _('Learn more'), help_page_path('user/admin_area/settings/project_integration_management'), class: 'btn btn-default gl-alert-action btn-secondary gl-button', target: '_blank', rel: 'noopener noreferrer' += render "service_templates_deprecated_alert" -%h3.page-title Service templates -%p.light= s_('AdminSettings|Service template allows you to set default values for integrations') +- if @activated_services.any? + %h3.page-title Service templates + %p= s_('AdminSettings|Service template allows you to set default values for integrations') -.table-holder - %table.table + %table.table.b-table.gl-table %colgroup %col %col @@ -26,10 +16,10 @@ %thead %tr %th - %th Service - %th Description - %th Last edit - - @services.each do |service| + %th= _('Service') + %th= _('Description') + %th= _('Last edit') + - @activated_services.each do |service| - if service.type.in?(@existing_instance_types) %tr %td diff --git a/app/views/admin/spam_logs/_spam_log.html.haml b/app/views/admin/spam_logs/_spam_log.html.haml index 2e7114ddab4..2bfe905fb9d 100644 --- a/app/views/admin/spam_logs/_spam_log.html.haml +++ b/app/views/admin/spam_logs/_spam_log.html.haml @@ -6,9 +6,9 @@ - if user = link_to user.name, [:admin, user] .light.small - Joined #{time_ago_with_tooltip(user.created_at)} + = _('Joined %{user_created_time}').html_safe % { user_created_time: time_ago_with_tooltip(user.created_at) } - else - (removed) + = _('(removed)') %td = spam_log.source_ip %td @@ -23,17 +23,17 @@ = truncate(spam_log.description, length: 100) %td - if user - = link_to 'Remove user', admin_spam_log_path(spam_log, remove_user: true), - data: { confirm: "USER #{user.name} WILL BE REMOVED! Are you sure?" }, method: :delete, class: "gl-button btn btn-sm btn-danger" + = link_to _('Remove user'), admin_spam_log_path(spam_log, remove_user: true), + data: { confirm: _("USER %{user_name} WILL BE REMOVED! Are you sure?") % { user_name: user.name } }, method: :delete, class: "gl-button btn btn-sm btn-danger" %td - if spam_log.submitted_as_ham? - .btn.btn-sm.disabled - Submitted as ham + .gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3 + = _("Submitted as ham") - else - = link_to 'Submit as ham', mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'gl-button btn btn-sm btn-warning' + = link_to _('Submit as ham'), mark_as_ham_admin_spam_log_path(spam_log), method: :post, class: 'gl-button btn btn-default btn-sm gl-mb-3' - if user && !user.blocked? - = link_to 'Block user', block_admin_user_path(user), data: {confirm: 'USER WILL BE BLOCKED! Are you sure?'}, method: :put, class: "gl-button btn btn-sm" + = link_to _('Block user'), block_admin_user_path(user), data: {confirm: _('USER WILL BE BLOCKED! Are you sure?')}, method: :put, class: "gl-button btn btn-default btn-sm gl-mb-3" - else - .btn.btn-sm.disabled + .gl-button.btn.btn-default.btn-sm.disabled.gl-mb-3 Already blocked - = link_to 'Remove log', [:admin, spam_log], remote: true, method: :delete, class: "gl-button btn btn-sm btn-close js-remove-tr" + = link_to _('Remove log'), [:admin, spam_log], remote: true, method: :delete, class: "gl-button btn btn-default btn-sm btn-close js-remove-tr" diff --git a/app/views/admin/users/_admin_notes.html.haml b/app/views/admin/users/_admin_notes.html.haml index a20b2fbffc4..7c3220e2cee 100644 --- a/app/views/admin/users/_admin_notes.html.haml +++ b/app/views/admin/users/_admin_notes.html.haml @@ -2,6 +2,6 @@ %legend= _('Admin notes') .form-group.row .col-sm-2.col-form-label - = f.label :note, s_('AdminNote|Note') + = f.label :note, s_('Admin|Note') .col-sm-10 = f.text_area :note, class: 'form-control gl-form-input gl-form-textarea' diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index 8a4a1a54c58..ade3581e5b9 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -20,20 +20,20 @@ .float-right - if impersonation_enabled? && @user != current_user && @user.can?(:log_in) - = link_to 'Impersonate', impersonate_admin_user_path(@user), method: :post, class: "btn btn-info gl-button btn-grouped", data: { qa_selector: 'impersonate_user_link' } + = link_to _('Impersonate'), impersonate_admin_user_path(@user), method: :post, class: "btn btn-info gl-button btn-grouped", data: { qa_selector: 'impersonate_user_link' } = link_to edit_admin_user_path(@user), class: "btn btn-default gl-button btn-grouped" do - = sprite_icon('pencil-square', css_class: 'gl-icon') + = sprite_icon('pencil-square', css_class: 'gl-icon gl-button-icon') = _('Edit') %hr %ul.nav-links.nav.nav-tabs = nav_link(path: 'users#show') do - = link_to "Account", admin_user_path(@user) + = link_to _("Account"), admin_user_path(@user) = nav_link(path: 'users#projects') do - = link_to "Groups and projects", projects_admin_user_path(@user) + = link_to _("Groups and projects"), projects_admin_user_path(@user) = nav_link(path: 'users#keys') do - = link_to "SSH keys", keys_admin_user_path(@user) + = link_to _("SSH keys"), keys_admin_user_path(@user) = nav_link(controller: :identities) do - = link_to "Identities", admin_user_identities_path(@user) + = link_to _("Identities"), admin_user_identities_path(@user) = nav_link(controller: :impersonation_tokens) do - = link_to "Impersonation Tokens", admin_user_impersonation_tokens_path(@user) + = link_to _("Impersonation Tokens"), admin_user_impersonation_tokens_path(@user) .gl-mb-3 diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 224a3cea28d..f2920579057 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -39,18 +39,18 @@ = link_to s_('AdminUsers|Approve'), approve_admin_user_path(user), method: :put = link_to s_('AdminUsers|Reject'), reject_admin_user_path(user), method: :delete - else - %button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_unblock_data(user) } + %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_unblock_data(user) } = s_('AdminUsers|Unblock') - else - %button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_block_data(user, user_block_effects) } + %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_block_data(user, user_block_effects) } = s_('AdminUsers|Block') - if user.can_be_deactivated? %li - %button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_deactivation_data(user, user_deactivation_effects) } + %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_deactivation_data(user, user_deactivation_effects) } = s_('AdminUsers|Deactivate') - elsif user.deactivated? %li - %button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_activation_data(user) } + %button.gl-button.btn.btn-default-tertiary.js-confirm-modal-button{ data: user_activation_data(user) } = s_('AdminUsers|Activate') - if user.access_locked? %li @@ -59,13 +59,13 @@ %li.divider - if user.can_be_removed? %li - %button.js-delete-user-modal-button.btn.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete', + %button.js-delete-user-modal-button.gl-button.btn.btn-danger-tertiary{ data: { 'gl-modal-action': 'delete', delete_user_url: admin_user_path(user), block_user_url: block_admin_user_path(user), username: sanitize_name(user.name) } } = s_('AdminUsers|Delete user') %li - %button.js-delete-user-modal-button.btn.btn-default-tertiary.text-danger{ data: { 'gl-modal-action': 'delete-with-contributions', + %button.js-delete-user-modal-button.gl-button.btn.btn-danger-tertiary{ data: { 'gl-modal-action': 'delete-with-contributions', delete_user_url: admin_user_path(user, hard_delete: true), block_user_url: block_admin_user_path(user), username: sanitize_name(user.name) } } |