diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 21:09:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 21:09:17 +0300 |
commit | 0eb4fd2f32e6804bc85868ba167170238e346279 (patch) | |
tree | c020e787ea29c77e1e9f53c21940f88a87a6e905 /app/views | |
parent | 78d8830cec030ff12afed3c8ae1dddec454d0a24 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin/groups/show.html.haml | 7 | ||||
-rw-r--r-- | app/views/admin/users/_user.html.haml | 95 | ||||
-rw-r--r-- | app/views/ci/variables/_index.html.haml | 2 |
3 files changed, 53 insertions, 51 deletions
diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 160c3b4d06d..91ccfb07f49 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -78,14 +78,15 @@ .card-footer = paginate @projects, param_name: 'projects_page', theme: 'gitlab' - - if @group.shared_projects.any? + - shared_projects = @group.shared_projects.sort_by(&:name) + - unless shared_projects.empty? .card .card-header = _('Projects shared with %{group_name}') % { group_name: @group.name } %span.badge.badge-pill - #{@group.shared_projects.count} + #{shared_projects.size} %ul.content-list - - @group.shared_projects.sort_by(&:name).each do |project| + - shared_projects.each do |project| %li %strong = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project] diff --git a/app/views/admin/users/_user.html.haml b/app/views/admin/users/_user.html.haml index 978e830d0e4..440eaac1917 100644 --- a/app/views/admin/users/_user.html.haml +++ b/app/views/admin/users/_user.html.haml @@ -14,51 +14,52 @@ = _('Last activity') .table-mobile-content = user.last_activity_on.nil? ? _('Never') : l(user.last_activity_on, format: :admin) - .table-section.section-20.table-button-footer - .table-action-buttons - = link_to _('Edit'), edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn btn-default' - - unless user == current_user - %button.dropdown-new.btn.btn-default{ type: 'button', data: { toggle: 'dropdown' } } - = sprite_icon('settings') - = sprite_icon('chevron-down') - %ul.dropdown-menu.dropdown-menu-right - %li.dropdown-header - = _('Settings') - %li - - if user.ldap_blocked? - %span.small - = s_('AdminUsers|Cannot unblock LDAP blocked users') - - elsif user.blocked? - = link_to _('Unblock'), unblock_admin_user_path(user), method: :put - - else - %button.btn{ data: { 'gl-modal-action': 'block', - url: block_admin_user_path(user), - username: sanitize_name(user.name) } } - = s_('AdminUsers|Block') - - if user.can_be_deactivated? + - unless user.internal? + .table-section.section-20.table-button-footer + .table-action-buttons + = link_to _('Edit'), edit_admin_user_path(user), id: "edit_#{dom_id(user)}", class: 'btn btn-default' + - unless user == current_user + %button.dropdown-new.btn.btn-default{ type: 'button', data: { toggle: 'dropdown' } } + = sprite_icon('settings') + = sprite_icon('chevron-down') + %ul.dropdown-menu.dropdown-menu-right + %li.dropdown-header + = _('Settings') %li - %button.btn{ data: { 'gl-modal-action': 'deactivate', - url: deactivate_admin_user_path(user), - username: sanitize_name(user.name) } } - = s_('AdminUsers|Deactivate') - - elsif user.deactivated? - %li - = link_to _('Activate'), activate_admin_user_path(user), method: :put - - if user.access_locked? - %li - = link_to _('Unlock'), unlock_admin_user_path(user), method: :put, data: { confirm: _('Are you sure?') } - - if can?(current_user, :destroy_user, user) - %li.divider - - if user.can_be_removed? - %li - %button.delete-user-button.btn.text-danger{ 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.delete-user-button.btn.text-danger{ 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) } } - = s_('AdminUsers|Delete user and contributions') + - if user.ldap_blocked? + %span.small + = s_('AdminUsers|Cannot unblock LDAP blocked users') + - elsif user.blocked? + = link_to _('Unblock'), unblock_admin_user_path(user), method: :put + - else + %button.btn{ data: { 'gl-modal-action': 'block', + url: block_admin_user_path(user), + username: sanitize_name(user.name) } } + = s_('AdminUsers|Block') + - if user.can_be_deactivated? + %li + %button.btn{ data: { 'gl-modal-action': 'deactivate', + url: deactivate_admin_user_path(user), + username: sanitize_name(user.name) } } + = s_('AdminUsers|Deactivate') + - elsif user.deactivated? + %li + = link_to _('Activate'), activate_admin_user_path(user), method: :put + - if user.access_locked? + %li + = link_to _('Unlock'), unlock_admin_user_path(user), method: :put, data: { confirm: _('Are you sure?') } + - if can?(current_user, :destroy_user, user) + %li.divider + - if user.can_be_removed? + %li + %button.delete-user-button.btn.text-danger{ 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.delete-user-button.btn.text-danger{ 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) } } + = s_('AdminUsers|Delete user and contributions') diff --git a/app/views/ci/variables/_index.html.haml b/app/views/ci/variables/_index.html.haml index aadb2c62d83..f11c730eba6 100644 --- a/app/views/ci/variables/_index.html.haml +++ b/app/views/ci/variables/_index.html.haml @@ -5,7 +5,7 @@ - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('ci/variables/README', anchor: 'protected-variables') } = s_('Environment variables are configured by your administrator to be %{link_start}protected%{link_end} by default').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } -- if Feature.enabled?(:new_variables_ui, @project || @group, default_enabled: true) +- if Feature.enabled?(:new_variables_ui, @project || @group) - is_group = !@group.nil? #js-ci-project-variables{ data: { endpoint: save_endpoint, project_id: @project&.id || '', group: is_group.to_s, maskable_regex: ci_variable_maskable_regex} } |