diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 10:08:36 +0300 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/views/groups | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/views/groups')
19 files changed, 49 insertions, 27 deletions
diff --git a/app/views/groups/_invite_members_modal.html.haml b/app/views/groups/_invite_members_modal.html.haml new file mode 100644 index 00000000000..51f41d58029 --- /dev/null +++ b/app/views/groups/_invite_members_modal.html.haml @@ -0,0 +1,6 @@ +- if invite_members_allowed?(group) + .js-invite-members-modal{ data: { group_id: group.id, + group_name: group.name, + access_levels: GroupMember.access_level_roles.to_json, + default_access_level: Gitlab::Access::GUEST, + help_link: help_page_url('user/permissions') } } diff --git a/app/views/groups/_invite_members_side_nav_link.html.haml b/app/views/groups/_invite_members_side_nav_link.html.haml new file mode 100644 index 00000000000..1c90eaee992 --- /dev/null +++ b/app/views/groups/_invite_members_side_nav_link.html.haml @@ -0,0 +1,3 @@ +- if invite_members_allowed?(group) && body_data_page == 'groups:show' + %li + .js-invite-members-trigger{ data: { icon: 'plus', display_text: 'Invite team members' } } diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index ed7b201323a..d999f20ef91 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -4,7 +4,6 @@ - show_access_requests = can_manage_members && @requesters.exists? - invited_active = params[:search_invited].present? || params[:invited_members_page].present? - vue_members_list_enabled = Feature.enabled?(:vue_group_members_list, @group) -- data_attributes = { group_id: @group.id } - form_item_label_css_class = 'label-bold gl-mr-2 gl-mb-0 gl-py-2 align-self-md-center' @@ -69,7 +68,7 @@ = label_tag :sort_by, _('Sort by'), class: form_item_label_css_class = render 'shared/members/sort_dropdown' - if vue_members_list_enabled - .js-group-members-list{ data: { members: members_data_json(@group, @members), **data_attributes } } + .js-group-members-list{ data: group_members_list_data_attributes(@group, @members) } - else %ul.content-list.members-list{ data: { qa_selector: 'members_list' } } = render partial: 'shared/members/member', collection: @members, as: :member @@ -81,7 +80,7 @@ = render 'groups/group_members/tab_pane/title' do = html_escape(_('Groups with access to %{strong_start}%{group_name}%{strong_end}')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - if vue_members_list_enabled - .js-group-linked-list{ data: { members: linked_groups_data_json(@group.shared_with_group_links), **data_attributes } } + .js-group-linked-list{ data: linked_groups_list_data_attributes(@group) } - else %ul.content-list.members-list{ data: { qa_selector: 'groups_list' } } - @group.shared_with_group_links.each do |group_link| @@ -95,7 +94,7 @@ = form_tag group_group_members_path(@group), method: :get, class: 'user-search-form', data: { testid: 'user-search-form' } do = render 'shared/members/search_field', name: 'search_invited' - if vue_members_list_enabled - .js-group-invited-members-list{ data: { members: members_data_json(@group, @invited_members), **data_attributes } } + .js-group-invited-members-list{ data: group_members_list_data_attributes(@group, @invited_members) } - else %ul.content-list.members-list = render partial: 'shared/members/member', collection: @invited_members, as: :member @@ -107,7 +106,7 @@ = render 'groups/group_members/tab_pane/title' do = html_escape(_('Users requesting access to %{strong_start}%{group_name}%{strong_end}')) % { group_name: @group.name, strong_start: '<strong>'.html_safe, strong_end: '</strong>'.html_safe } - if vue_members_list_enabled - .js-group-access-requests-list{ data: { members: members_data_json(@group, @requesters), **data_attributes } } + .js-group-access-requests-list{ data: group_members_list_data_attributes(@group, @requesters) } - else %ul.content-list.members-list = render partial: 'shared/members/member', collection: @requesters, as: :member diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 1358e848154..33a9f423da6 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -1,6 +1,7 @@ - @can_bulk_update = can?(current_user, :admin_issue, @group) && @group.feature_available?(:group_bulk_edit) - page_title _("Issues") +- add_page_specific_style 'page_bundles/issues_list' = content_for :meta_tags do = auto_discovery_link_tag(:atom, safe_params.merge(rss_url_options).to_h, title: "#{@group.name} issues") @@ -23,9 +24,12 @@ = render_if_exists 'shared/issuable/group_bulk_update_sidebar', group: @group, type: :issues - if Feature.enabled?(:vue_issuables_list, @group) + - if use_startup_call? + - add_page_startup_api_call(api_v4_groups_issues_path(id: @group.id, params: startup_call_params)) .js-issuables-list{ data: { endpoint: expose_url(api_v4_groups_issues_path(id: @group.id)), 'can-bulk-edit': @can_bulk_update.to_json, 'empty-state-meta': { svg_path: image_path('illustrations/issues.svg') }, - 'sort-key': @sort } } + 'sort-key': @sort, + type: 'issues' } } - else = render 'shared/issues' diff --git a/app/views/groups/labels/destroy.js.haml b/app/views/groups/labels/destroy.js.haml deleted file mode 100644 index 3dfbfc77c0d..00000000000 --- a/app/views/groups/labels/destroy.js.haml +++ /dev/null @@ -1,2 +0,0 @@ -- if @group.labels.empty? - $('.labels').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000) diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml index 3299d127222..debbe95d2aa 100644 --- a/app/views/groups/labels/index.html.haml +++ b/app/views/groups/labels/index.html.haml @@ -27,5 +27,5 @@ = render 'shared/empty_states/labels' %template#js-badge-item-template - %li.label-link-item.js-priority-badge.inline.gl-ml-3 - .label-badge.label-badge-blue= _('Prioritized label') + %li.js-priority-badge.inline.gl-ml-3 + .label-badge.gl-bg-blue-50= _('Prioritized label') diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml index 1685707d457..d20fa938a68 100644 --- a/app/views/groups/milestones/index.html.haml +++ b/app/views/groups/milestones/index.html.haml @@ -1,4 +1,5 @@ - page_title _("Milestones") +- add_page_specific_style 'page_bundles/milestone' .top-area = render 'shared/milestones_filter', counts: @milestone_states diff --git a/app/views/groups/milestones/show.html.haml b/app/views/groups/milestones/show.html.haml index 33e68bc766e..5bbdd3a3b19 100644 --- a/app/views/groups/milestones/show.html.haml +++ b/app/views/groups/milestones/show.html.haml @@ -1,3 +1,4 @@ +- add_page_specific_style 'page_bundles/milestone' = render "header_title" = render 'shared/milestones/top', milestone: @milestone, group: @group = render 'shared/milestones/tabs', milestone: @milestone, show_project_name: true diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index 555c4004a3f..4fa2fc6fd4d 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -15,7 +15,7 @@ .controls = link_to _('Members'), project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn" = link_to _('Edit'), edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn" - = link_to _('Delete'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "btn btn-remove" + = link_to _('Delete'), project, data: { confirm: remove_project_message(project)}, method: :delete, class: "gl-button btn btn-danger" .stats %span.badge.badge-pill diff --git a/app/views/groups/registry/repositories/index.html.haml b/app/views/groups/registry/repositories/index.html.haml index 2cac8e653e5..21882c3e3ce 100644 --- a/app/views/groups/registry/repositories/index.html.haml +++ b/app/views/groups/registry/repositories/index.html.haml @@ -12,6 +12,8 @@ "containers_error_image" => image_path('illustrations/docker-error-state.svg'), "registry_host_url_with_port" => escape_once(registry_config.host_port), "garbage_collection_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'container-registry-garbage-collection'), + "run_cleanup_policies_help_page_path" => help_page_path('administration/packages/container_registry', anchor: 'run-the-cleanup-policy-now'), + "cleanup_policies_help_page_path" => help_page_path('user/packages/container_registry/index', anchor: 'how-the-cleanup-policy-works'), "is_admin": current_user&.admin.to_s, is_group_page: "true", character_error: @character_error.to_s } } diff --git a/app/views/groups/runners/_index.html.haml b/app/views/groups/runners/_index.html.haml index e885fcc08eb..b342b589d93 100644 --- a/app/views/groups/runners/_index.html.haml +++ b/app/views/groups/runners/_index.html.haml @@ -7,6 +7,8 @@ .row .col-sm-6 = render 'groups/runners/group_runners' + .col-sm-6 + = render 'groups/runners/shared_runners' %h4.underlined-title = _('Available Runners: %{runners}').html_safe % { runners: limited_counter_with_delimiter(@all_group_runners) } diff --git a/app/views/groups/runners/_shared_runners.html.haml b/app/views/groups/runners/_shared_runners.html.haml new file mode 100644 index 00000000000..15b1199b8c9 --- /dev/null +++ b/app/views/groups/runners/_shared_runners.html.haml @@ -0,0 +1,3 @@ += render 'shared/runners/shared_runners_description' + +#update-shared-runners-form{ data: group_shared_runners_settings_data(@group) } diff --git a/app/views/groups/settings/_advanced.html.haml b/app/views/groups/settings/_advanced.html.haml index 98f4acaa5e3..c421a569a14 100644 --- a/app/views/groups/settings/_advanced.html.haml +++ b/app/views/groups/settings/_advanced.html.haml @@ -22,8 +22,7 @@ pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, title: s_('GroupSettings|Please choose a group URL with no special characters.'), "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" - .gl-display-flex.gl-justify-content-end - = f.submit s_('GroupSettings|Change group URL'), class: 'btn btn-warning' + = f.submit s_('GroupSettings|Change group URL'), class: 'btn btn-warning' .sub-section %h4.warning-title= s_('GroupSettings|Transfer group') @@ -33,14 +32,13 @@ = hidden_field_tag 'new_parent_group_id' %ul - - side_effects_link_start = '<a href="https://docs.gitlab.com/ce/user/project/index.html#redirects-when-changing-repository-paths" target="_blank">' + - side_effects_link_start = '<a href="https://docs.gitlab.com/ee/user/project/index.html#redirects-when-changing-repository-paths" target="_blank">' - warning_text = s_("GroupSettings|Be careful. Changing a group's parent can have unintended %{side_effects_link_start}side effects%{side_effects_link_end}.") % { side_effects_link_start: side_effects_link_start, side_effects_link_end:'</a>' } %li= warning_text.html_safe %li= s_('GroupSettings|You can only transfer the group to a group you manage.') %li= s_('GroupSettings|You will need to update your local repositories to point to the new location.') %li= s_("GroupSettings|If the parent group's visibility is lower than the group current visibility, visibility levels for subgroups and projects will be changed to match the new parent group's visibility.") - .gl-display-flex.gl-justify-content-end - = f.submit s_('GroupSettings|Transfer group'), class: 'btn btn-warning' + = f.submit s_('GroupSettings|Transfer group'), class: 'btn btn-warning' = render 'groups/settings/remove', group: @group = render_if_exists 'groups/settings/restore', group: @group diff --git a/app/views/groups/settings/_export.html.haml b/app/views/groups/settings/_export.html.haml index af06cfff397..94466b76ac8 100644 --- a/app/views/groups/settings/_export.html.haml +++ b/app/views/groups/settings/_export.html.haml @@ -24,6 +24,5 @@ = link_to _('Download export'), download_export_group_path(group), rel: 'nofollow', method: :get, class: 'btn btn-default', data: { qa_selector: 'download_export_link' } - else - .gl-display-flex.gl-justify-content-end - = link_to _('Export group'), export_group_path(group), - method: :post, class: 'btn btn-default', data: { qa_selector: 'export_group_link' } + = link_to _('Export group'), export_group_path(group), + method: :post, class: 'btn btn-default', data: { qa_selector: 'export_group_link' } diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml index e43d49b229e..35d82084263 100644 --- a/app/views/groups/settings/_general.html.haml +++ b/app/views/groups/settings/_general.html.haml @@ -29,5 +29,4 @@ = link_to _('Remove avatar'), group_avatar_path(@group.to_param), data: { confirm: _('Avatar will be removed. Are you sure?')}, method: :delete, class: 'btn btn-link' = render 'shared/visibility_level', f: f, visibility_level: @group.visibility_level, can_change_visibility_level: can_change_group_visibility_level?(@group), form_model: @group - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: 'btn btn-success mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' } + = f.submit _('Save changes'), class: 'btn btn-success mt-4 js-dirty-submit', data: { qa_selector: 'save_name_visibility_settings_button' } diff --git a/app/views/groups/settings/_permanent_deletion.html.haml b/app/views/groups/settings/_permanent_deletion.html.haml index 063ff6dd132..14719200b45 100644 --- a/app/views/groups/settings/_permanent_deletion.html.haml +++ b/app/views/groups/settings/_permanent_deletion.html.haml @@ -5,5 +5,4 @@ = _('Removing this group also removes all child projects, including archived projects, and their resources.') %br %strong= _('Removed group can not be restored!') - .gl-display-flex.gl-justify-content-end - = button_to _('Remove group'), '#', class: 'btn btn-remove js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) } + = button_to _('Remove group'), '#', class: 'gl-button btn btn-danger js-confirm-danger', data: { 'confirm-danger-message' => remove_group_message(group) } diff --git a/app/views/groups/settings/_permissions.html.haml b/app/views/groups/settings/_permissions.html.haml index 86f49672d66..21d6a888d7b 100644 --- a/app/views/groups/settings/_permissions.html.haml +++ b/app/views/groups/settings/_permissions.html.haml @@ -38,8 +38,7 @@ = render 'groups/settings/project_creation_level', f: f, group: @group = render 'groups/settings/subgroup_creation_level', f: f, group: @group = render_if_exists 'groups/settings/prevent_forking', f: f, group: @group - = render 'groups/settings/two_factor_auth', f: f + = render 'groups/settings/two_factor_auth', f: f, group: @group = render_if_exists 'groups/personal_access_token_expiration_policy', f: f, group: @group = render_if_exists 'groups/member_lock_setting', f: f, group: @group - .gl-display-flex.gl-justify-content-end - = f.submit _('Save changes'), class: 'btn btn-success gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' } + = f.submit _('Save changes'), class: 'btn btn-success gl-mt-3 js-dirty-submit', data: { qa_selector: 'save_permissions_changes_button' } diff --git a/app/views/groups/settings/_two_factor_auth.html.haml b/app/views/groups/settings/_two_factor_auth.html.haml index c49e61c8a31..d2d4c27c826 100644 --- a/app/views/groups/settings/_two_factor_auth.html.haml +++ b/app/views/groups/settings/_two_factor_auth.html.haml @@ -1,3 +1,4 @@ +- return unless group.parent_allows_two_factor_authentication? - docs_link_url = help_page_path('security/two_factor_authentication', anchor: 'enforcing-2fa-for-all-users-in-a-group') - docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: docs_link_url } @@ -9,8 +10,14 @@ .form-check = f.check_box :require_two_factor_authentication, class: 'form-check-input', data: { qa_selector: 'require_2fa_checkbox' } = f.label :require_two_factor_authentication, class: 'form-check-label' do - %span= _('Require all users in this group to setup Two-factor authentication') + %span= _('Require all users in this group to setup two-factor authentication') .form-group = f.label :two_factor_grace_period, _('Time before enforced'), class: 'label-bold' = f.text_field :two_factor_grace_period, class: 'form-control form-control-sm w-auto' .form-text.text-muted= _('Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication') +- unless group.has_parent? + .form-group + .form-check + = f.check_box :allow_mfa_for_subgroups, class: 'form-check-input', checked: group.namespace_settings.allow_mfa_for_subgroups + = f.label :allow_mfa_for_subgroups, class: 'form-check-label' do + = _('Allow subgroups to set up their own two-factor authentication rules') diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index ec4ab603d22..fa560942c5d 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -23,6 +23,8 @@ = render_if_exists 'groups/group_activity_analytics', group: @group += render_if_exists 'groups/invite_members_modal', group: @group + .groups-listing{ data: { endpoints: { default: group_children_path(@group, format: :json), shared: group_shared_projects_path(@group, format: :json) } } } .top-area.group-nav-container.justify-content-between .scrolling-tabs-container.inner-page-scroll-tabs |