diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 12:26:25 +0000 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /app/views/admin | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) | |
download | gitlab-ce-a09983ae35713f5a2bbb100981116d31ce99826e.tar.gz |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'app/views/admin')
57 files changed, 248 insertions, 145 deletions
diff --git a/app/views/admin/appearances/_form.html.haml b/app/views/admin/appearances/_form.html.haml index aa47daf4a57..fcb1c1a6f3e 100644 --- a/app/views/admin/appearances/_form.html.haml +++ b/app/views/admin/appearances/_form.html.haml @@ -1,6 +1,6 @@ - parsed_with_gfm = "Content parsed with #{link_to('GitLab Flavored Markdown', help_page_path('user/markdown'), target: '_blank')}.".html_safe -= form_for @appearance, url: admin_appearances_path, html: { class: 'prepend-top-default' } do |f| += form_for @appearance, url: admin_appearances_path, html: { class: 'gl-mt-3' } do |f| = form_errors(@appearance) @@ -100,7 +100,7 @@ .hint = parsed_with_gfm - .prepend-top-default.append-bottom-default + .gl-mt-3.gl-mb-3 = f.submit 'Update appearance settings', class: 'btn btn-success' - if @appearance.persisted? || @appearance.updated_at .mt-4 diff --git a/app/views/admin/appearances/show.html.haml b/app/views/admin/appearances/show.html.haml index ccf6f960cf2..77a08913666 100644 --- a/app/views/admin/appearances/show.html.haml +++ b/app/views/admin/appearances/show.html.haml @@ -1,4 +1,4 @@ -- page_title "Appearance" +- page_title _("Appearance") - @content_class = "limit-container-width" unless fluid_layout = render 'form' 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 ceec8901951..65a2f1d42e1 100644 --- a/app/views/admin/application_settings/_account_and_limit.html.haml +++ b/app/views/admin/application_settings/_account_and_limit.html.haml @@ -54,10 +54,10 @@ = _('Newly registered users will by default be external') .prepend-top-10 = _('Internal users') - = f.text_field :user_default_internal_regex, placeholder: _('Regex pattern'), class: 'form-control prepend-top-5' + = f.text_field :user_default_internal_regex, placeholder: _('Regex pattern'), class: 'form-control gl-mt-2' .help-block = _('Specify an e-mail address regex pattern to identify default internal users.') - = link_to _('More information'), help_page_path('user/permissions', anchor: 'external-users-permissions'), + = link_to _('More information'), help_page_path('user/permissions', anchor: 'setting-new-users-to-external'), target: '_blank' .form-group = f.label :user_show_add_ssh_key_message, _('Prompt users to upload SSH keys'), class: 'label-bold' diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml index c7918881bdf..410820dfb85 100644 --- a/app/views/admin/application_settings/_ci_cd.html.haml +++ b/app/views/admin/application_settings/_ci_cd.html.haml @@ -40,7 +40,7 @@ = f.text_field :default_artifacts_expire_in, class: 'form-control' .form-text.text-muted = _("Set the default expiration time for each job's artifacts. 0 for unlimited. The default unit is in seconds, but you can define an alternative. For example: <code>4 mins 2 sec</code>, <code>2h42min</code>.").html_safe - = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration') + = link_to icon('question-circle'), help_page_path('user/admin_area/settings/continuous_integration', anchor: 'default-artifacts-expiration-core-only') .form-group = f.label :archive_builds_in_human_readable, _('Archive jobs'), class: 'label-bold' = f.text_field :archive_builds_in_human_readable, class: 'form-control', placeholder: 'never' diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml index 3dd72909805..49747f2bfd4 100644 --- a/app/views/admin/application_settings/_email.html.haml +++ b/app/views/admin/application_settings/_email.html.haml @@ -20,7 +20,7 @@ = f.label :commit_email_hostname, _('Custom hostname (for private commit emails)'), class: 'label-bold' = f.text_field :commit_email_hostname, class: 'form-control' .form-text.text-muted - - commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('user/admin_area/settings/email', anchor: 'custom-private-commit-email-hostname'), target: '_blank' + - commit_email_hostname_docs_link = link_to _('Learn more'), help_page_path('user/admin_area/settings/email.md', anchor: 'custom-hostname-for-private-commit-emails'), target: '_blank' = _("This setting will update the hostname that is used to generate private commit emails. %{learn_more}").html_safe % { learn_more: commit_email_hostname_docs_link } = render_if_exists 'admin/application_settings/email_additional_text_setting', form: f diff --git a/app/views/admin/application_settings/_import_export_limits.html.haml b/app/views/admin/application_settings/_import_export_limits.html.haml new file mode 100644 index 00000000000..d26c3376391 --- /dev/null +++ b/app/views/admin/application_settings/_import_export_limits.html.haml @@ -0,0 +1,34 @@ += form_for @application_setting, url: network_admin_application_settings_path(anchor: 'js-import-export-limits-settings'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) + + %fieldset + .form-group + = f.label :project_import_limit, _('Max Project Import requests per minute per user'), class: 'label-bold' + = f.number_field :project_import_limit, class: 'form-control' + + %fieldset + .form-group + = f.label :project_export_limit, _('Max Project Export requests per minute per user'), class: 'label-bold' + = f.number_field :project_export_limit, class: 'form-control' + + %fieldset + .form-group + = f.label :project_download_export_limit, _('Max Project Export Download requests per minute per user'), class: 'label-bold' + = f.number_field :project_download_export_limit, class: 'form-control' + + %fieldset + .form-group + = f.label :group_import_limit, _('Max Group Import requests per minute per user'), class: 'label-bold' + = f.number_field :group_import_limit, class: 'form-control' + + %fieldset + .form-group + = f.label :group_export_limit, _('Max Group Export requests per minute per user'), class: 'label-bold' + = f.number_field :group_export_limit, class: 'form-control' + + %fieldset + .form-group + = f.label :group_download_export_limit, _('Max Group Export Download requests per minute per user'), class: 'label-bold' + = f.number_field :group_download_export_limit, class: 'form-control' + + = f.submit 'Save changes', class: "btn btn-success", data: { qa_selector: 'save_changes_button' } diff --git a/app/views/admin/application_settings/_initial_branch_name.html.haml b/app/views/admin/application_settings/_initial_branch_name.html.haml new file mode 100644 index 00000000000..e76374e88a8 --- /dev/null +++ b/app/views/admin/application_settings/_initial_branch_name.html.haml @@ -0,0 +1,12 @@ += form_for @application_setting, url: general_admin_application_settings_path(anchor: 'js-default-branch-name'), html: { class: 'fieldset-form' } do |f| + = form_errors(@application_setting) + + - fallback_branch_name = '<code>master</code>' + + %fieldset + .form-group + = f.label :default_branch_name, _('Default initial branch name'), class: 'label-light' + = f.text_field :default_branch_name, placeholder: 'master', class: 'form-control' + %span.form-text.text-muted + = (_("Changes affect new repositories only. If not specified, Git's default name %{branch_name_default} will be used.") % { branch_name_default: fallback_branch_name } ).html_safe + = f.submit _('Save changes'), class: 'gl-button btn-success' diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml index 0631c024eb8..fea3ff4c3ba 100644 --- a/app/views/admin/application_settings/_registry.html.haml +++ b/app/views/admin/application_settings/_registry.html.haml @@ -10,7 +10,7 @@ = f.check_box :container_expiration_policies_enable_historic_entries, class: 'form-check-input' = f.label :container_expiration_policies_enable_historic_entries, class: 'form-check-label' do = _("Enable container expiration and retention policies for projects created earlier than GitLab 12.7.") - = link_to icon('question-circle'), help_page_path('user/packages/container_registry/index', anchor: 'expiration-policy') + = link_to icon('question-circle'), help_page_path('user/packages/container_registry/index', anchor: 'cleanup-policy') .form-text.text-muted = _("Existing projects will be able to use expiration policies. Avoid enabling this if an external Container Registry is being used, as there is a performance risk if many images exist on one project.") = link_to icon('question-circle'), help_page_path('user/packages/container_registry/index', anchor: 'use-with-external-container-registries') diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml index ed276da08f2..ecae720cd49 100644 --- a/app/views/admin/application_settings/_repository_storage.html.haml +++ b/app/views/admin/application_settings/_repository_storage.html.haml @@ -15,7 +15,7 @@ .form-group .form-text %p.text-secondary - = _('Select a weight for the storage new repositories will be placed on.') + = _('Enter weights for storages for new repositories.') = link_to icon('question-circle'), help_page_path('administration/repository_storage_paths') .form-check - storage_weights.each do |attribute| diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml index 007cd343339..0972e10e12c 100644 --- a/app/views/admin/application_settings/_signin.html.haml +++ b/app/views/admin/application_settings/_signin.html.haml @@ -33,6 +33,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 :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' + = f.label :notify_on_unknown_sign_in, class: 'form-check-label' do + = _('Notify users by email when sign-in location is not recognized') + = link_to icon('question-circle'), + 'https://docs.gitlab.com/ee/user/profile/unknown_sign_in_notification.html', + target: '_blank' + .form-group = f.label :two_factor_authentication, 'Two-factor grace period (hours)', class: 'label-bold' = f.number_field :two_factor_grace_period, min: 0, class: 'form-control', placeholder: '0' .form-text.text-muted Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index 9421585b70c..d8a4c601b77 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -31,7 +31,7 @@ %pre.usage-data.js-usage-ping-payload.js-syntax-highlight.code.highlight.mt-2.d-none{ data: { endpoint: usage_data_admin_application_settings_path(format: :html) } } - else = _('The usage ping is disabled, and cannot be configured through this form.') - - deactivating_usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'deactivate-the-usage-ping') + - deactivating_usage_ping_path = help_page_path('development/telemetry/usage_ping', anchor: 'disable-usage-ping') - deactivating_usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: deactivating_usage_ping_path } = s_('For more information, see the documentation on %{deactivating_usage_ping_link_start}deactivating the usage ping%{deactivating_usage_ping_link_end}.').html_safe % { deactivating_usage_ping_link_start: deactivating_usage_ping_link_start, deactivating_usage_ping_link_end: '</a>'.html_safe } .form-group.mt-3 diff --git a/app/views/admin/application_settings/ci/_header.html.haml b/app/views/admin/application_settings/ci/_header.html.haml index 9f03936f64a..fe86284ba2f 100644 --- a/app/views/admin/application_settings/ci/_header.html.haml +++ b/app/views/admin/application_settings/ci/_header.html.haml @@ -2,7 +2,7 @@ %h4 = _('Variables') - = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'variables'), target: '_blank', rel: 'noopener noreferrer' + = link_to icon('question-circle'), help_page_path('ci/variables/README', anchor: 'custom-environment-variables'), target: '_blank', rel: 'noopener noreferrer' %button.btn.btn-default.js-settings-toggle{ type: 'button' } = expanded ? _('Collapse') : _('Expand') diff --git a/app/views/admin/application_settings/ci_cd.html.haml b/app/views/admin/application_settings/ci_cd.html.haml index 2452ab794fc..cdb69d33b12 100644 --- a/app/views/admin/application_settings/ci_cd.html.haml +++ b/app/views/admin/application_settings/ci_cd.html.haml @@ -9,7 +9,7 @@ .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: 'protected-variables') } + - 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} } diff --git a/app/views/admin/application_settings/integrations.html.haml b/app/views/admin/application_settings/integrations.html.haml index a8eff26b94c..cca0240462f 100644 --- a/app/views/admin/application_settings/integrations.html.haml +++ b/app/views/admin/application_settings/integrations.html.haml @@ -12,7 +12,7 @@ %h4.gl-alert-title= s_('AdminSettings|Some settings have moved') = s_('AdminSettings|Elasticsearch, PlantUML, Slack application, Third party offers, Snowplow, Amazon EKS have moved to Settings > General.') .gl-alert-actions - = link_to s_('AdminSettings|Go to General Settings'), admin_application_settings_path, class: 'btn gl-alert-action btn-info new-gl-button' + = link_to s_('AdminSettings|Go to General Settings'), general_admin_application_settings_path, class: 'btn gl-alert-action btn-info new-gl-button' %h4= s_('AdminSettings|Apply integration settings to all Projects') %p diff --git a/app/views/admin/application_settings/network.html.haml b/app/views/admin/application_settings/network.html.haml index db4611964b4..15149e46f9c 100644 --- a/app/views/admin/application_settings/network.html.haml +++ b/app/views/admin/application_settings/network.html.haml @@ -57,4 +57,15 @@ .settings-content = render 'issue_limits' +%section.settings.as-import-export-limits.no-animate#js-import-export-limits-settings{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4 + = _('Import/Export Rate Limits') + %button.btn.btn-default.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _('Configure limits for Project/Group Import/Export.') + .settings-content + = render 'import_export_limits' + = render_if_exists 'admin/application_settings/ee_network_settings' diff --git a/app/views/admin/application_settings/repository.html.haml b/app/views/admin/application_settings/repository.html.haml index b0934a9d9fb..33a6715d424 100644 --- a/app/views/admin/application_settings/repository.html.haml +++ b/app/views/admin/application_settings/repository.html.haml @@ -2,6 +2,18 @@ - page_title _("Repository") - @content_class = "limit-container-width" unless fluid_layout +- if Feature.enabled?(:global_default_branch_name, default_enabled: true) + %section.settings.as-default-branch-name.no-animate#js-default-branch-name{ class: ('expanded' if expanded_by_default?) } + .settings-header + %h4 + = _('Default initial branch name') + %button.gl-button.js-settings-toggle{ type: 'button' } + = expanded_by_default? ? _('Collapse') : _('Expand') + %p + = _('Set the default name of the initial branch when creating new repositories through the user interface.') + .settings-content + = render 'initial_branch_name' + %section.settings.as-mirror.no-animate#js-mirror-settings{ class: ('expanded' if expanded_by_default?) } .settings-header %h4 diff --git a/app/views/admin/applications/edit.html.haml b/app/views/admin/applications/edit.html.haml index 13c408914bb..4f737a14e12 100644 --- a/app/views/admin/applications/edit.html.haml +++ b/app/views/admin/applications/edit.html.haml @@ -1,6 +1,6 @@ -- add_to_breadcrumbs "Applications", admin_applications_path +- add_to_breadcrumbs _("Applications"), admin_applications_path - breadcrumb_title @application.name -- page_title "Edit", @application.name, "Applications" +- page_title _("Edit"), @application.name, _("Applications") %h3.page-title Edit application - @url = admin_application_path(@application) diff --git a/app/views/admin/applications/index.html.haml b/app/views/admin/applications/index.html.haml index c3861f335b8..0119cabf1ad 100644 --- a/app/views/admin/applications/index.html.haml +++ b/app/views/admin/applications/index.html.haml @@ -1,4 +1,4 @@ -- page_title "Applications" +- page_title _("Applications") %h3.page-title System OAuth applications %p.light diff --git a/app/views/admin/applications/new.html.haml b/app/views/admin/applications/new.html.haml index 346c58877d9..4d4b6b0c994 100644 --- a/app/views/admin/applications/new.html.haml +++ b/app/views/admin/applications/new.html.haml @@ -1,5 +1,5 @@ -- breadcrumb_title "Applications" -- page_title "New Application" +- breadcrumb_title _("Applications") +- page_title _("New Application") %h3.page-title New application - @url = admin_applications_path diff --git a/app/views/admin/applications/show.html.haml b/app/views/admin/applications/show.html.haml index 146674a2fac..5259dd56df5 100644 --- a/app/views/admin/applications/show.html.haml +++ b/app/views/admin/applications/show.html.haml @@ -1,4 +1,4 @@ -- page_title @application.name, "Applications" +- page_title @application.name, _("Applications") %h3.page-title Application: #{@application.name} @@ -46,4 +46,4 @@ .form-actions = link_to 'Edit', edit_admin_application_path(@application), class: 'btn btn-primary wide float-left' - = render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger prepend-left-10' + = render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger gl-ml-3' diff --git a/app/views/admin/background_jobs/show.html.haml b/app/views/admin/background_jobs/show.html.haml index 1001a69b787..bbb47e29bb9 100644 --- a/app/views/admin/background_jobs/show.html.haml +++ b/app/views/admin/background_jobs/show.html.haml @@ -1,4 +1,4 @@ -- page_title "Background Jobs" +- page_title _("Background Jobs") %h3.page-title Background Jobs %p.light GitLab uses #{link_to "sidekiq", "http://sidekiq.org/"} library for async job processing diff --git a/app/views/admin/broadcast_messages/edit.html.haml b/app/views/admin/broadcast_messages/edit.html.haml index 8cbc4597e32..569aaa29cc4 100644 --- a/app/views/admin/broadcast_messages/edit.html.haml +++ b/app/views/admin/broadcast_messages/edit.html.haml @@ -1,4 +1,4 @@ -- breadcrumb_title "Messages" -- page_title "Broadcast Messages" +- breadcrumb_title _("Messages") +- page_title _("Broadcast Messages") = render 'form' diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index e7a7ee96508..bca74f71c5c 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -1,5 +1,5 @@ -- breadcrumb_title "Messages" -- page_title "Broadcast Messages" +- breadcrumb_title _("Messages") +- page_title _("Broadcast Messages") %h3.page-title Broadcast Messages diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml index 951e5364ad8..7c6c21bc509 100644 --- a/app/views/admin/dashboard/index.html.haml +++ b/app/views/admin/dashboard/index.html.haml @@ -1,4 +1,5 @@ -- breadcrumb_title "Dashboard" +- breadcrumb_title _("Dashboard") +- page_title _("Dashboard") - if show_license_breakdown? = render_if_exists 'admin/licenses/breakdown', license: @license @@ -9,7 +10,7 @@ dismissible: true.to_s } } = notice[:message].html_safe -.admin-dashboard.prepend-top-default +.admin-dashboard.gl-mt-3 .row .col-sm-4 .info-well.dark-well diff --git a/app/views/admin/deploy_keys/new.html.haml b/app/views/admin/deploy_keys/new.html.haml index 9a563a5bc78..f43c1447f09 100644 --- a/app/views/admin/deploy_keys/new.html.haml +++ b/app/views/admin/deploy_keys/new.html.haml @@ -1,4 +1,4 @@ -- page_title 'New Deploy Key' +- page_title _('New Deploy Key') %h3.page-title New public deploy key %hr diff --git a/app/views/admin/gitaly_servers/index.html.haml b/app/views/admin/gitaly_servers/index.html.haml index 9b24f411a75..0b06f145687 100644 --- a/app/views/admin/gitaly_servers/index.html.haml +++ b/app/views/admin/gitaly_servers/index.html.haml @@ -1,4 +1,5 @@ - breadcrumb_title _("Gitaly Servers") +- page_title _("Gitaly Servers") %h3.page-title= _("Gitaly Servers") %hr diff --git a/app/views/admin/groups/index.html.haml b/app/views/admin/groups/index.html.haml index f295e5a06cb..da2b2c60b15 100644 --- a/app/views/admin/groups/index.html.haml +++ b/app/views/admin/groups/index.html.haml @@ -1,7 +1,7 @@ - page_title _("Groups") .top-area - .prepend-top-default.append-bottom-default + .gl-mt-3.gl-mb-3 = form_tag admin_groups_path, method: :get, class: 'js-search-form' do |f| = hidden_field_tag :sort, @sort .search-holder diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index e105091e773..4b0e0b9c697 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -1,6 +1,8 @@ - add_to_breadcrumbs _("Groups"), admin_groups_path - breadcrumb_title @group.name - page_title @group.name, _("Groups") + +.js-remove-member-modal %h3.page-title = _('Group: %{group_name}') % { group_name: @group.full_name } diff --git a/app/views/admin/hook_logs/_index.html.haml b/app/views/admin/hook_logs/_index.html.haml index 841640efad2..5e70e80cff7 100644 --- a/app/views/admin/hook_logs/_index.html.haml +++ b/app/views/admin/hook_logs/_index.html.haml @@ -1,4 +1,4 @@ -.row.prepend-top-default.append-bottom-default +.row.gl-mt-3.gl-mb-3 .col-lg-3 %h4.gl-mt-0 Recent Deliveries diff --git a/app/views/admin/hook_logs/show.html.haml b/app/views/admin/hook_logs/show.html.haml index 86729dbe7bc..4d534c59c40 100644 --- a/app/views/admin/hook_logs/show.html.haml +++ b/app/views/admin/hook_logs/show.html.haml @@ -1,9 +1,9 @@ -- page_title 'Request details' +- page_title _('Request details') %h3.page-title Request details %hr -= link_to 'Resend Request', retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn btn-default float-right prepend-left-10" += link_to 'Resend Request', retry_admin_hook_hook_log_path(@hook, @hook_log), method: :post, class: "btn btn-default float-right gl-ml-3" = render partial: 'shared/hook_logs/content', locals: { hook_log: @hook_log } diff --git a/app/views/admin/hooks/_form.html.haml b/app/views/admin/hooks/_form.html.haml index 072f80b56b9..17bb054b869 100644 --- a/app/views/admin/hooks/_form.html.haml +++ b/app/views/admin/hooks/_form.html.haml @@ -16,7 +16,7 @@ System hook will be triggered on set of events like creating project or adding ssh key. But you can also enable extra triggers like Push events. - .prepend-top-default + .gl-mt-3 = form.check_box :repository_update_events, class: 'float-left' .prepend-left-20 = form.label :repository_update_events, class: 'list-label' do diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml index 636dd6bdfc1..f9faf5b11fa 100644 --- a/app/views/admin/hooks/edit.html.haml +++ b/app/views/admin/hooks/edit.html.haml @@ -1,11 +1,11 @@ - add_to_breadcrumbs @hook.pluralized_name, admin_hooks_path - page_title _('Edit System Hook') -.row.prepend-top-default +.row.gl-mt-3 .col-lg-3 = render 'shared/web_hooks/title_and_docs', hook: @hook - .col-lg-9.append-bottom-default + .col-lg-9.gl-mb-3 = form_for @hook, as: :hook, url: admin_hook_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } .form-actions diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index 1c14291b58e..d70baa592ea 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -1,10 +1,10 @@ - page_title @hook.pluralized_name -.row.prepend-top-default +.row.gl-mt-3 .col-lg-4 = render 'shared/web_hooks/title_and_docs', hook: @hook - .col-lg-8.append-bottom-default + .col-lg-8.gl-mb-3 = form_for @hook, as: :hook, url: admin_hooks_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } = f.submit _('Add system hook'), class: 'btn btn-success' diff --git a/app/views/admin/impersonation_tokens/index.html.haml b/app/views/admin/impersonation_tokens/index.html.haml index 8342507d8a6..ec393fdd794 100644 --- a/app/views/admin/impersonation_tokens/index.html.haml +++ b/app/views/admin/impersonation_tokens/index.html.haml @@ -6,7 +6,7 @@ = render 'admin/users/head' -.row.prepend-top-default +.row.gl-mt-3 .col-lg-12 - if @new_impersonation_token = render 'shared/access_tokens/created_container', diff --git a/app/views/admin/jobs/index.html.haml b/app/views/admin/jobs/index.html.haml index f1bdd52b399..32c0a801a1d 100644 --- a/app/views/admin/jobs/index.html.haml +++ b/app/views/admin/jobs/index.html.haml @@ -1,4 +1,5 @@ -- breadcrumb_title "Jobs" +- breadcrumb_title _("Jobs") +- page_title _("Jobs") .top-area.scrolling-tabs-container.inner-page-scroll-tabs - build_path_proc = ->(scope) { admin_jobs_path(scope: scope) } diff --git a/app/views/admin/keys/show.html.haml b/app/views/admin/keys/show.html.haml index 9ee77c77398..03cc0ae15be 100644 --- a/app/views/admin/keys/show.html.haml +++ b/app/views/admin/keys/show.html.haml @@ -1,2 +1,2 @@ -- page_title @key.title, "Keys" +- page_title @key.title, _("Keys") = render "profiles/keys/key_details", admin: true diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index f9d42d3f53b..96337d357eb 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -1,13 +1,14 @@ -- add_to_breadcrumbs "Projects", admin_projects_path +- add_to_breadcrumbs _("Projects"), admin_projects_path - breadcrumb_title @project.full_name -- page_title @project.full_name, "Projects" +- page_title @project.full_name, _("Projects") - @content_class = "admin-projects" +.js-remove-member-modal %h3.page-title - Project: #{@project.full_name} + = _('Project: %{name}') % { name: @project.full_name } = link_to edit_project_path(@project), class: "btn btn-nr float-right" do %i.fa.fa-pencil-square-o - Edit + = _('Edit') %hr - if @project.last_repository_check_failed? .row @@ -21,57 +22,67 @@ .col-md-6 .card .card-header - Project info: + = _('Project info:') %ul.content-list %li - %span.light Name: + %span.light + = _('Name:') %strong = link_to @project.name, project_path(@project) %li - %span.light Namespace: + %span.light + = _('Namespace:') %strong - if @project.namespace = link_to @project.namespace.human_name, [:admin, @project.group || @project.owner] - else - Global + = s_('ProjectSettings|Global') %li - %span.light Owned by: + %span.light + = _('Owned by:') %strong - if @project.owner = link_to @project.owner_name, [:admin, @project.owner] - else - (deleted) + = _('(deleted)') %li - %span.light Created by: + %span.light + = _('Created by:') %strong - = @project.creator.try(:name) || '(deleted)' + = @project.creator.try(:name) || _('(deleted)') %li - %span.light Created on: + %span.light + = _('Created on:') %strong = @project.created_at.to_s(:medium) %li - %span.light ID: + %span.light + = _('ID:') %strong = @project.id %li - %span.light http: + %span.light + = _('http:') %strong = link_to @project.http_url_to_repo, project_path(@project) %li - %span.light ssh: + %span.light + = _('ssh:') %strong = link_to @project.ssh_url_to_repo, project_path(@project) - if @project.repository.exists? %li - %span.light Gitaly storage name: + %span.light + = _('Gitaly storage name:') %strong = @project.repository.storage %li - %span.light Gitaly relative path: + %span.light + = _('Gitaly relative path:') %strong = @project.repository.relative_path @@ -79,30 +90,36 @@ = render 'shared/storage_counter_statistics', storage_size: @project.statistics&.storage_size, storage_details: @project.statistics %li - %span.light last commit: + %span.light + = _('last commit:') %strong = last_commit(@project) %li - %span.light Git LFS status: + %span.light + = _('Git LFS status:') %strong = project_lfs_status(@project) = link_to icon('question-circle'), help_page_path('topics/git/lfs/index') - else %li - %span.light repository: + %span.light + = _('repository:') %strong.cred - does not exist + = _('does not exist') - if @project.archived? %li - %span.light archived: - %strong project is read-only + %span.light + = _('archived:') + %strong + = _('project is read-only') = render_if_exists "shared_runner_status", project: @project %li - %span.light access: + %span.light + = _('access:') %strong %span{ class: visibility_level_color(@project.visibility_level) } = visibility_level_icon(@project.visibility_level) @@ -114,24 +131,24 @@ .card .card-header - Transfer project + = s_('ProjectSettings|Transfer project') .card-body = form_for @project, url: transfer_admin_project_path(@project), method: :put do |f| .form-group.row .col-sm-3.col-form-label - = f.label :new_namespace_id, "Namespace" + = f.label :new_namespace_id, _("Namespace") .col-sm-9 .dropdown - = dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id' }, { toggle_class: 'js-namespace-select large' }) + = dropdown_toggle(_('Search for Namespace'), { toggle: 'dropdown', field_name: 'new_namespace_id' }, { toggle_class: 'js-namespace-select large' }) .dropdown-menu.dropdown-select - = dropdown_title('Namespaces') - = dropdown_filter("Search for Namespace") + = dropdown_title(_('Namespaces')) + = dropdown_filter(_('Search for Namespace')) = dropdown_content = dropdown_loading .form-group.row .offset-sm-3.col-sm-9 - = f.submit 'Transfer', class: 'btn btn-primary' + = f.submit _('Transfer'), class: 'btn btn-primary' .card.repository-check .card-header @@ -151,18 +168,18 @@ = link_to icon('question-circle'), help_page_path('administration/repository_checks') .form-group - = f.submit 'Trigger repository check', class: 'btn btn-primary' + = f.submit _('Trigger repository check'), class: 'btn btn-primary' .col-md-6 - if @group .card .card-header %strong= @group.name - group members + = _('group members') %span.badge.badge-pill= @group_members.size .float-right = link_to admin_group_path(@group), class: 'btn btn-sm' do - = icon('pencil-square-o', text: 'Manage access') + = icon('pencil-square-o', text: _('Manage access')) %ul.content-list.members-list = render partial: 'shared/members/member', collection: @group_members, as: :member, locals: { show_controls: false } .card-footer @@ -173,10 +190,10 @@ .card .card-header %strong= @project.name - project members + = _('project members') %span.badge.badge-pill= @project.users.size .float-right - = link_to icon('pencil-square-o', text: 'Manage access'), project_project_members_path(@project), class: "btn btn-sm" + = link_to icon('pencil-square-o', text: _('Manage access')), project_project_members_path(@project), class: "btn btn-sm" %ul.content-list.project_members.members-list = render partial: 'shared/members/member', collection: @project_members, as: :member, locals: { show_controls: false } .card-footer diff --git a/app/views/admin/requests_profiles/index.html.haml b/app/views/admin/requests_profiles/index.html.haml index efc16bb4d3b..6e1ac452d52 100644 --- a/app/views/admin/requests_profiles/index.html.haml +++ b/app/views/admin/requests_profiles/index.html.haml @@ -1,4 +1,4 @@ -- page_title 'Requests Profiles' +- page_title _('Requests Profiles') %h3.page-title = page_title @@ -9,7 +9,7 @@ to profile the request - if @profiles.present? - .prepend-top-default + .gl-mt-3 - @profiles.each do |path, profiles| .card.card-small .card-header diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml index 423472324fe..5c834c2125f 100644 --- a/app/views/admin/runners/_runner.html.haml +++ b/app/views/admin/runners/_runner.html.haml @@ -72,8 +72,8 @@ = link_to [:pause, :admin, runner], method: :get, class: 'btn btn-default has-tooltip', title: _('Pause'), ref: 'tooltip', aria: { label: _('Pause') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do = icon('pause') - else - = link_to [:resume, :admin, runner], method: :get, class: 'btn btn-default has-tooltip', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do - = icon('play') + = link_to [:resume, :admin, runner], method: :get, class: 'btn btn-default has-tooltip gl-px-3', title: _('Resume'), ref: 'tooltip', aria: { label: _('Resume') }, data: { placement: 'top', container: 'body'} do + = sprite_icon('play') .btn-group = link_to [:admin, runner], method: :delete, class: 'btn btn-danger has-tooltip', title: _('Remove'), ref: 'tooltip', aria: { label: _('Remove') }, data: { placement: 'top', container: 'body', confirm: _('Are you sure?') } do = icon('remove') diff --git a/app/views/admin/runners/_sort_dropdown.html.haml b/app/views/admin/runners/_sort_dropdown.html.haml index 4f4f0a543e0..3b3de042511 100644 --- a/app/views/admin/runners/_sort_dropdown.html.haml +++ b/app/views/admin/runners/_sort_dropdown.html.haml @@ -1,6 +1,6 @@ - sorted_by = sort_options_hash[@sort] -.dropdown.inline.prepend-left-10 +.dropdown.inline.gl-ml-3 %button.dropdown-menu-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' } } = sorted_by = icon('chevron-down') diff --git a/app/views/admin/runners/index.html.haml b/app/views/admin/runners/index.html.haml index 59e28a3b244..08d65819476 100644 --- a/app/views/admin/runners/index.html.haml +++ b/app/views/admin/runners/index.html.haml @@ -1,4 +1,5 @@ - breadcrumb_title _('Runners') +- page_title _('Runners') .row .col-sm-6 diff --git a/app/views/admin/runners/show.html.haml b/app/views/admin/runners/show.html.haml index 0120d4038b9..0c2b9bab357 100644 --- a/app/views/admin/runners/show.html.haml +++ b/app/views/admin/runners/show.html.haml @@ -9,6 +9,7 @@ %span.runner-state.runner-state-specific Specific +- page_title _("Runners") - add_to_breadcrumbs _("Runners"), admin_runners_path - breadcrumb_title "##{@runner.id}" diff --git a/app/views/admin/services/_form.html.haml b/app/views/admin/services/_form.html.haml index d18e91c0b14..f2153e503af 100644 --- a/app/views/admin/services/_form.html.haml +++ b/app/views/admin/services/_form.html.haml @@ -4,7 +4,7 @@ %p #{@service.description} template. = form_for :service, url: admin_application_settings_service_path, method: :put, html: { class: 'fieldset-form' } do |form| - = render 'shared/service_settings', form: form, service: @service + = render 'shared/service_settings', form: form, integration: @service .footer-block.row-content-block = form.submit 'Save', class: 'btn btn-success' diff --git a/app/views/admin/services/edit.html.haml b/app/views/admin/services/edit.html.haml index 00ed5464a44..d13b5a34dac 100644 --- a/app/views/admin/services/edit.html.haml +++ b/app/views/admin/services/edit.html.haml @@ -1,5 +1,6 @@ -- add_to_breadcrumbs "Service Templates", admin_application_settings_services_path +- add_to_breadcrumbs _("Service Templates"), admin_application_settings_services_path +- page_title @service.title, _("Service Templates") - breadcrumb_title @service.title -- page_title @service.title, "Service Templates" +- @content_class = 'limit-container-width' unless fluid_layout = render 'form' diff --git a/app/views/admin/services/index.html.haml b/app/views/admin/services/index.html.haml index e0a1a3549a5..ec343c38470 100644 --- a/app/views/admin/services/index.html.haml +++ b/app/views/admin/services/index.html.haml @@ -1,4 +1,4 @@ -- page_title "Service Templates" +- page_title _("Service Templates") %h3.page-title Service templates %p.light= s_('AdminSettings|Service template allows you to set default values for integrations') @@ -11,13 +11,24 @@ %th Description %th Last edit - @services.each do |service| - %tr - %td - = boolean_to_icon service.activated? - %td - = link_to edit_admin_application_settings_service_path(service.id) do - %strong= service.title - %td - = service.description - %td.light - = time_ago_with_tooltip service.updated_at + - if service.type.in?(@existing_instance_types) + %tr + %td + %td + = link_to edit_admin_application_settings_integration_path(service.to_param), class: 'gl-text-blue-300!' do + %strong.has-tooltip{ title: s_('AdminSettings|Moved to integrations'), data: { container: 'body' } } + = service.title + %td.gl-cursor-default.gl-text-gray-600 + = service.description + %td + - else + %tr + %td + = boolean_to_icon service.activated? + %td + = link_to edit_admin_application_settings_service_path(service.id) do + %strong= service.title + %td + = service.description + %td.light + = time_ago_with_tooltip service.updated_at diff --git a/app/views/admin/sessions/new.html.haml b/app/views/admin/sessions/new.html.haml index 4ce1629bb53..67c607270a5 100644 --- a/app/views/admin/sessions/new.html.haml +++ b/app/views/admin/sessions/new.html.haml @@ -15,7 +15,7 @@ -# Show a message if none of the mechanisms above are enabled - if !allow_admin_mode_password_authentication_for_web? && !ldap_sign_in_enabled? && !omniauth_enabled? - .prepend-top-default.center + .gl-mt-3.center = _('No authentication methods configured.') - if omniauth_enabled? && button_based_providers_enabled? diff --git a/app/views/admin/spam_logs/index.html.haml b/app/views/admin/spam_logs/index.html.haml index b45d3e4823b..40fbc559d72 100644 --- a/app/views/admin/spam_logs/index.html.haml +++ b/app/views/admin/spam_logs/index.html.haml @@ -1,4 +1,4 @@ -- page_title "Spam Logs" +- page_title _("Spam Logs") %h3.page-title Spam Logs %hr - if @spam_logs.present? diff --git a/app/views/admin/system_info/show.html.haml b/app/views/admin/system_info/show.html.haml index b7648979edd..312ca62cfdf 100644 --- a/app/views/admin/system_info/show.html.haml +++ b/app/views/admin/system_info/show.html.haml @@ -1,6 +1,6 @@ - page_title _('System Info') -.prepend-top-default +.gl-mt-3 .row .col-sm .bg-light.light-well @@ -11,7 +11,7 @@ - else = icon('warning', class: 'text-warning') = _('Unable to collect CPU info') - .bg-light.light-well.prepend-top-default + .bg-light.light-well.gl-mt-3 %h4= _('Memory Usage') .data - if @memory @@ -19,7 +19,7 @@ - else = icon('warning', class: 'text-warning') = _('Unable to collect memory info') - .bg-light.light-well.prepend-top-default + .bg-light.light-well.gl-mt-3 %h4= _('Uptime') .data %h2= distance_of_time_in_words_to_now(Rails.application.config.booted_at) diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index e3ab2e4f9bd..3ba01e8a350 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -1,5 +1,6 @@ %fieldset - %legend Access + %legend + = s_('AdminUsers|Access') .form-group.row .col-sm-2.col-form-label = f.label :projects_limit @@ -7,43 +8,43 @@ = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control' .form-group.row - .col-sm-2.col-form-label + .col-sm-2.col-form-label.gl-pt-0 = f.label :can_create_group .col-sm-10 = f.check_box :can_create_group .form-group.row - .col-sm-2.col-form-label + .col-sm-2.col-form-label.gl-pt-0 = f.label :access_level .col-sm-10 - editing_current_user = (current_user == @user) = f.radio_button :access_level, :regular, disabled: editing_current_user = f.label :access_level_regular, class: 'font-weight-bold' do - Regular + = s_('AdminUsers|Regular') %p.light - Regular users have access to their groups and projects + = s_('AdminUsers|Regular users have access to their groups and projects') = render_if_exists 'admin/users/auditor_access_level_radio', f: f, disabled: editing_current_user = f.radio_button :access_level, :admin, disabled: editing_current_user = f.label :access_level_admin, class: 'font-weight-bold' do - Admin + = s_('AdminUsers|Admin') %p.light - Administrators have access to all groups, projects and users and can manage all features in this installation + = s_('AdminUsers|Administrators have access to all groups, projects and users and can manage all features in this installation') - if editing_current_user %p.light - You cannot remove your own admin rights. + = s_('AdminUsers|You cannot remove your own admin rights.') .form-group.row - .col-sm-2.col-form-label + .col-sm-2.col-form-label.gl-pt-0 = f.label :external .hidden{ data: user_internal_regex_data } - .col-sm-10 + .col-sm-10.gl-display-flex.gl-align-items-baseline = f.check_box :external do - External - %p.light - External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets. + = s_('AdminUsers|External') + %p.light.gl-pl-2 + = s_('AdminUsers|External users cannot see internal or private projects unless access is explicitly granted. Also, external users cannot create projects, groups, or personal snippets.') %row.hidden#warning_external_automatically_set.hidden .badge.badge-warning.text-white - = _('Automatically marked as default internal user') + = s_('AdminUsers|Automatically marked as default internal user') diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index a218885a00e..3403e9e5abf 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -28,4 +28,4 @@ = link_to "Identities", admin_user_identities_path(@user) = nav_link(controller: :impersonation_tokens) do = link_to "Impersonation Tokens", admin_user_impersonation_tokens_path(@user) -.append-bottom-default +.gl-mb-3 diff --git a/app/views/admin/users/_user_listing_note.html.haml b/app/views/admin/users/_user_listing_note.html.haml index df4af009c5c..b6c9bc43339 100644 --- a/app/views/admin/users/_user_listing_note.html.haml +++ b/app/views/admin/users/_user_listing_note.html.haml @@ -1,3 +1,3 @@ - if user.note.present? %span.has-tooltip.user-note{ title: user.note } - = icon("sticky-note-o cgrey") + = sprite_icon('document', size: 16, css_class: 'gl-vertical-align-middle') diff --git a/app/views/admin/users/edit.html.haml b/app/views/admin/users/edit.html.haml index 3b6fd71500d..7d10e839cd6 100644 --- a/app/views/admin/users/edit.html.haml +++ b/app/views/admin/users/edit.html.haml @@ -1,4 +1,4 @@ -- page_title "Edit", @user.name, "Users" +- page_title _("Edit"), @user.name, _("Users") %h3.page-title Edit user: #{@user.name} %hr diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index ecbabab3e7f..05988c17412 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -1,10 +1,10 @@ -- page_title "Users" +- page_title _("Users") .top-area.scrolling-tabs-container.inner-page-scroll-tabs .fade-left - = icon('angle-left') + = sprite_icon('chevron-lg-left', size: 12) .fade-right - = icon('angle-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 diff --git a/app/views/admin/users/keys.html.haml b/app/views/admin/users/keys.html.haml index 103bbb3b063..5f9d11af7c1 100644 --- a/app/views/admin/users/keys.html.haml +++ b/app/views/admin/users/keys.html.haml @@ -1,5 +1,5 @@ -- add_to_breadcrumbs "Users", admin_users_path +- add_to_breadcrumbs _("Users"), admin_users_path - breadcrumb_title @user.name -- page_title "SSH Keys", @user.name, "Users" +- page_title _("SSH Keys"), @user.name, _("Users") = render 'admin/users/head' = render 'profiles/keys/key_table', admin: true diff --git a/app/views/admin/users/new.html.haml b/app/views/admin/users/new.html.haml index bfc36ed7373..e5e6790b789 100644 --- a/app/views/admin/users/new.html.haml +++ b/app/views/admin/users/new.html.haml @@ -1,4 +1,4 @@ -- page_title "New User" +- page_title _("New User") %h3.page-title New user %hr diff --git a/app/views/admin/users/projects.html.haml b/app/views/admin/users/projects.html.haml index e6da81831ab..f66d9b76afc 100644 --- a/app/views/admin/users/projects.html.haml +++ b/app/views/admin/users/projects.html.haml @@ -1,6 +1,6 @@ -- add_to_breadcrumbs "Users", admin_users_path +- add_to_breadcrumbs _("Users"), admin_users_path - breadcrumb_title @user.name -- page_title "Groups and projects", @user.name, "Users" +- page_title _("Groups and projects"), @user.name, _("Users") = render 'admin/users/head' - if @user.groups.any? @@ -16,7 +16,7 @@ .float-right %span.light.vertical-align-middle= group_member.human_access - unless group_member.owner? - = link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member) }, method: :delete, remote: true, class: "btn-sm btn btn-remove prepend-left-10", title: 'Remove user from group' do + = link_to group_group_member_path(group, group_member), data: { confirm: remove_member_message(group_member) }, method: :delete, remote: true, class: "btn-sm btn btn-remove gl-ml-3", title: 'Remove user from group' do %i.fa.fa-times.fa-inverse .row @@ -46,5 +46,5 @@ %span.light.vertical-align-middle= member.human_access - if member.respond_to? :project - = link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn-sm btn btn-remove prepend-left-10", title: 'Remove user from project' do + = link_to project_project_member_path(project, member), data: { confirm: remove_member_message(member) }, remote: true, method: :delete, class: "btn-sm btn btn-remove gl-ml-3", title: 'Remove user from project' do %i.fa.fa-times diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index e76f1f6444c..2bc39a23b2d 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -1,6 +1,6 @@ -- add_to_breadcrumbs "Users", admin_users_path +- add_to_breadcrumbs _("Users"), admin_users_path - breadcrumb_title @user.name -- page_title @user.name, "Users" +- page_title @user.name, _("Users") = render 'admin/users/head' .row @@ -86,34 +86,22 @@ %li %span.light Current sign-in IP: %strong - - if @user.current_sign_in_ip # rubocop:disable Style/RedundantCondition - = @user.current_sign_in_ip - - else - never + = @user.current_sign_in_ip || _('never') %li %span.light Current sign-in at: %strong - - if @user.current_sign_in_at - = @user.current_sign_in_at.to_s(:medium) - - else - never + = @user.current_sign_in_at&.to_s(:medium) || _('never') %li %span.light Last sign-in IP: %strong - - if @user.last_sign_in_ip # rubocop:disable Style/RedundantCondition - = @user.last_sign_in_ip - - else - never + = @user.last_sign_in_ip || _('never') %li %span.light Last sign-in at: %strong - - if @user.last_sign_in_at - = @user.last_sign_in_at.to_s(:medium) - - else - never + = @user.last_sign_in_at&.to_s(:medium) || _('never') %li %span.light Sign-in count: |