diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/views/groups | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/views/groups')
-rw-r--r-- | app/views/groups/_home_panel.html.haml | 39 | ||||
-rw-r--r-- | app/views/groups/_invite_members_modal.html.haml | 5 | ||||
-rw-r--r-- | app/views/groups/_invite_members_side_nav_link.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/dependency_proxies/_url.html.haml | 12 | ||||
-rw-r--r-- | app/views/groups/dependency_proxies/show.html.haml | 28 | ||||
-rw-r--r-- | app/views/groups/group_members/index.html.haml | 29 | ||||
-rw-r--r-- | app/views/groups/issues.html.haml | 3 | ||||
-rw-r--r-- | app/views/groups/labels/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/milestones/_form.html.haml | 8 | ||||
-rw-r--r-- | app/views/groups/milestones/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/runners/_group_runners.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/settings/repository/_initial_branch_name.html.haml | 22 | ||||
-rw-r--r-- | app/views/groups/settings/repository/show.html.haml | 1 | ||||
-rw-r--r-- | app/views/groups/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/sidebar/_packages.html.haml | 6 |
15 files changed, 120 insertions, 47 deletions
diff --git a/app/views/groups/_home_panel.html.haml b/app/views/groups/_home_panel.html.haml index 97e48cdec8c..ee08829d990 100644 --- a/app/views/groups/_home_panel.html.haml +++ b/app/views/groups/_home_panel.html.haml @@ -20,37 +20,16 @@ %span.access-request-links.gl-ml-3 = render 'shared/members/access_request_links', source: @group - .home-panel-buttons.col-md-12.col-lg-6.d-inline-flex.flex-wrap.justify-content-lg-end + .home-panel-buttons.col-md-12.col-lg-6 - if current_user - .group-buttons - = render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn', emails_disabled: emails_disabled - - new_project_label = _("New project") - - new_subgroup_label = _("New subgroup") - - if can_create_projects and can_create_subgroups - .btn-group.new-project-subgroup.droplab-dropdown.home-panel-action-button.gl-mt-3.js-new-project-subgroup.qa-new-project-or-subgroup-dropdown{ data: { project_path: new_project_path(namespace_id: @group.id), subgroup_path: new_group_path(parent_id: @group.id) } } - %input.btn.btn-success.dropdown-primary.js-new-group-child.qa-new-in-group-button{ type: "button", value: new_project_label, data: { action: "new-project" } } - %button.btn.btn-success.dropdown-toggle.js-dropdown-toggle.qa-new-project-or-subgroup-dropdown-toggle{ type: "button", data: { "dropdown-trigger" => "#new-project-or-subgroup-dropdown", 'display' => 'static' } } - = sprite_icon("chevron-down", css_class: "icon dropdown-btn-icon") - %ul#new-project-or-subgroup-dropdown.dropdown-menu.dropdown-menu-right{ data: { dropdown: true } } - %li.droplab-item-selected.qa-new-project-option{ role: "button", data: { value: "new-project", text: new_project_label } } - .menu-item - .icon-container - = icon("check", class: "list-item-checkmark") - .description - %strong= new_project_label - %span= s_("GroupsTree|Create a project in this group.") - %li.divider.droplap-item-ignore - %li.qa-new-subgroup-option{ role: "button", data: { value: "new-subgroup", text: new_subgroup_label } } - .menu-item - .icon-container - = icon("check", class: "list-item-checkmark") - .description - %strong= new_subgroup_label - %span= s_("GroupsTree|Create a subgroup in this group.") - - elsif can_create_projects - = link_to new_project_label, new_project_path(namespace_id: @group.id), class: "btn btn-success gl-mt-3" - - elsif can_create_subgroups - = link_to new_subgroup_label, new_group_path(parent_id: @group.id), class: "btn btn-success gl-mt-3" + .gl-display-flex.gl-flex-wrap.gl-lg-justify-content-end.gl-mx-n2{ data: { testid: 'group-buttons' } } + = render 'shared/notifications/new_button', notification_setting: @notification_setting, btn_class: 'btn gl-button gl-sm-w-auto gl-w-full', dropdown_container_class: 'gl-mr-0 gl-px-2 gl-sm-w-auto gl-w-full', emails_disabled: emails_disabled + - if can_create_subgroups + .gl-px-2.gl-sm-w-auto.gl-w-full + = link_to _("New subgroup"), new_group_path(parent_id: @group.id), class: "btn btn-success btn-md gl-button btn-success-secondary gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_subgroup_button' } + - if can_create_projects + .gl-px-2.gl-sm-w-auto.gl-w-full + = link_to _("New project"), new_project_path(namespace_id: @group.id), class: "btn btn-success btn-md gl-button gl-mt-3 gl-sm-w-auto gl-w-full", data: { qa_selector: 'new_project_button' } - if @group.description.present? .group-home-desc.mt-1 diff --git a/app/views/groups/_invite_members_modal.html.haml b/app/views/groups/_invite_members_modal.html.haml index 51f41d58029..3aae81cef8d 100644 --- a/app/views/groups/_invite_members_modal.html.haml +++ b/app/views/groups/_invite_members_modal.html.haml @@ -1,6 +1,7 @@ - if invite_members_allowed?(group) - .js-invite-members-modal{ data: { group_id: group.id, - group_name: group.name, + .js-invite-members-modal{ data: { id: group.id, + name: group.name, + is_project: false, 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 index 1c90eaee992..4f1c06d9fe3 100644 --- a/app/views/groups/_invite_members_side_nav_link.html.haml +++ b/app/views/groups/_invite_members_side_nav_link.html.haml @@ -1,3 +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' } } + .js-invite-members-trigger{ data: { icon: 'plus', display_text: _('Invite team members') } } diff --git a/app/views/groups/dependency_proxies/_url.html.haml b/app/views/groups/dependency_proxies/_url.html.haml new file mode 100644 index 00000000000..9242954b684 --- /dev/null +++ b/app/views/groups/dependency_proxies/_url.html.haml @@ -0,0 +1,12 @@ +- proxy_url = "#{group_url(@group)}/dependency_proxy/containers" + +%h5.prepend-top-20= _('Dependency proxy URL') + +.row + .col-lg-8.col-md-12.input-group + = text_field_tag :url, "#{proxy_url}", class: 'js-dependency-proxy-url form-control', readonly: true + = clipboard_button(text: "#{proxy_url}", title: _("Copy %{proxy_url}") % { proxy_url: proxy_url }) + +.row + .col-12.help-block.gl-mt-3 + = _('Contains %{count} blobs of images (%{size})') % { count: @blobs_count, size: number_to_human_size(@blobs_total_size) } diff --git a/app/views/groups/dependency_proxies/show.html.haml b/app/views/groups/dependency_proxies/show.html.haml new file mode 100644 index 00000000000..ff1312eb763 --- /dev/null +++ b/app/views/groups/dependency_proxies/show.html.haml @@ -0,0 +1,28 @@ +- page_title _("Dependency Proxy") + +.settings-header + %h4= _('Dependency proxy') + + %p + - link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('user/packages/dependency_proxy/index') } + = _('Create a local proxy for storing frequently used upstream images. %{link_start}Learn more%{link_end} about dependency proxies.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe } + +- if @group.public? + - if can?(current_user, :admin_dependency_proxy, @group) + = form_for(@dependency_proxy, method: :put, url: group_dependency_proxy_path(@group)) do |f| + .form-group + %h5.prepend-top-20= _('Enable proxy') + .js-dependency-proxy-toggle-area + = render "shared/buttons/project_feature_toggle", is_checked: @dependency_proxy.enabled?, label: s_("DependencyProxy|Toggle Dependency Proxy") do + = f.hidden_field :enabled, { class: 'js-project-feature-toggle-input'} + + - if @dependency_proxy.enabled + = render 'groups/dependency_proxies/url' + + - else + - if @dependency_proxy.enabled + = render 'groups/dependency_proxies/url' +- else + .gl-alert.gl-alert-info + = sprite_icon('information-o', size: 16, css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') + = _('Dependency proxy feature is limited to public groups for now.') diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index d999f20ef91..2a87b42ef13 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -3,7 +3,8 @@ - show_invited_members = can_manage_members && @invited_members.exists? - 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) +- vue_members_list_enabled = Feature.enabled?(:vue_group_members_list, @group, default_enabled: true) +- current_user_is_group_owner = @group && @group.has_owner?(current_user) - form_item_label_css_class = 'label-bold gl-mr-2 gl-mb-0 gl-py-2 align-self-md-center' @@ -69,9 +70,15 @@ = render 'shared/members/sort_dropdown' - if vue_members_list_enabled .js-group-members-list{ data: group_members_list_data_attributes(@group, @members) } + .loading + .spinner.spinner-md - else %ul.content-list.members-list{ data: { qa_selector: 'members_list' } } - = render partial: 'shared/members/member', collection: @members, as: :member + = render partial: 'shared/members/member', + collection: @members, as: :member, + locals: { membership_source: @group, + group: @group, + current_user_is_group_owner: current_user_is_group_owner } = paginate @members, theme: 'gitlab', params: { invited_members_page: nil, search_invited: nil } - if @group.shared_with_group_links.any? #tab-groups.tab-pane @@ -81,6 +88,8 @@ = 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: linked_groups_list_data_attributes(@group) } + .loading + .spinner.spinner-md - else %ul.content-list.members-list{ data: { qa_selector: 'groups_list' } } - @group.shared_with_group_links.each do |group_link| @@ -95,9 +104,15 @@ = render 'shared/members/search_field', name: 'search_invited' - if vue_members_list_enabled .js-group-invited-members-list{ data: group_members_list_data_attributes(@group, @invited_members) } + .loading + .spinner.spinner-md - else %ul.content-list.members-list - = render partial: 'shared/members/member', collection: @invited_members, as: :member + = render partial: 'shared/members/member', + collection: @invited_members, as: :member, + locals: { membership_source: @group, + group: @group, + current_user_is_group_owner: current_user_is_group_owner } = paginate @invited_members, param_name: 'invited_members_page', theme: 'gitlab', params: { page: nil } - if show_access_requests #tab-access-requests.tab-pane @@ -107,6 +122,12 @@ = 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: group_members_list_data_attributes(@group, @requesters) } + .loading + .spinner.spinner-md - else %ul.content-list.members-list - = render partial: 'shared/members/member', collection: @requesters, as: :member + = render partial: 'shared/members/member', + collection: @requesters, as: :member, + locals: { membership_source: @group, + group: @group, + current_user_is_group_owner: current_user_is_group_owner } diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml index 33a9f423da6..ef7e3efdc68 100644 --- a/app/views/groups/issues.html.haml +++ b/app/views/groups/issues.html.haml @@ -30,6 +30,7 @@ 'can-bulk-edit': @can_bulk_update.to_json, 'empty-state-meta': { svg_path: image_path('illustrations/issues.svg') }, 'sort-key': @sort, - type: 'issues' } } + type: 'issues', + 'scoped-labels-available': scoped_labels_available?(@group).to_json } } - else = render 'shared/issues' diff --git a/app/views/groups/labels/index.html.haml b/app/views/groups/labels/index.html.haml index debbe95d2aa..804d2da2c4b 100644 --- a/app/views/groups/labels/index.html.haml +++ b/app/views/groups/labels/index.html.haml @@ -5,7 +5,7 @@ - labels_or_filters = @labels.exists? || search.present? || subscribed.present? - if labels_or_filters - #promote-label-modal + #js-promote-label-modal = render 'shared/labels/nav', labels_or_filters: labels_or_filters, can_admin_label: can_admin_label .labels-container.gl-mt-2 diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index df82b264f9a..ffb0ade4f73 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -19,8 +19,8 @@ .form-actions - if @milestone.new_record? - = f.submit 'Create milestone', class: "btn-success btn", data: { qa_selector: "create_milestone_button" } - = link_to "Cancel", group_milestones_path(@group), class: "btn btn-cancel" + = f.submit 'Create milestone', class: "btn-success gl-button btn", data: { qa_selector: "create_milestone_button" } + = link_to "Cancel", group_milestones_path(@group), class: "btn gl-button btn-cancel" - else - = f.submit 'Update milestone', class: "btn-success btn" - = link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn btn-cancel" + = f.submit 'Update milestone', class: "btn-success gl-button btn" + = link_to "Cancel", group_milestone_path(@group, @milestone), class: "btn gl-button btn-cancel" diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml index d20fa938a68..c93b24d14f0 100644 --- a/app/views/groups/milestones/index.html.haml +++ b/app/views/groups/milestones/index.html.haml @@ -8,7 +8,7 @@ = render 'shared/milestones/search_form' = render 'shared/milestones_sort_dropdown' - if can?(current_user, :admin_milestone, @group) - = link_to "New milestone", new_group_milestone_path(@group), class: "btn btn-success", data: { qa_selector: "new_group_milestone_link" } + = link_to "New milestone", new_group_milestone_path(@group), class: "btn gl-button btn-success", data: { qa_selector: "new_group_milestone_link" } .milestones %ul.content-list diff --git a/app/views/groups/runners/_group_runners.html.haml b/app/views/groups/runners/_group_runners.html.haml index 554240b7aef..087c38c7b86 100644 --- a/app/views/groups/runners/_group_runners.html.haml +++ b/app/views/groups/runners/_group_runners.html.haml @@ -17,4 +17,6 @@ = render partial: 'ci/runner/how_to_setup_runner', locals: { registration_token: @group.runners_token, type: 'group', - reset_token_url: reset_registration_token_group_settings_ci_cd_path } + reset_token_url: reset_registration_token_group_settings_ci_cd_path, + project_path: '', + group_path: @group.path } diff --git a/app/views/groups/settings/repository/_initial_branch_name.html.haml b/app/views/groups/settings/repository/_initial_branch_name.html.haml new file mode 100644 index 00000000000..3ef8dccae08 --- /dev/null +++ b/app/views/groups/settings/repository/_initial_branch_name.html.haml @@ -0,0 +1,22 @@ +%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 + = form_for @group, url: group_path(@group, anchor: 'js-default-branch-name'), html: { class: 'fieldset-form' } do |f| + = form_errors(@group) + - 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, value: group.namespace_settings&.default_branch_name, placeholder: 'master', class: 'form-control' + %span.form-text.text-muted + = (_("Changes affect new repositories only. If not specified, either the configured application-wide default or Git's default name %{branch_name_default} will be used.") % { branch_name_default: fallback_branch_name }).html_safe + + = f.hidden_field :redirect_target, value: "repository_settings" + = f.submit _('Save changes'), class: 'gl-button btn-success' diff --git a/app/views/groups/settings/repository/show.html.haml b/app/views/groups/settings/repository/show.html.haml index ff0c9de4fef..a5819320405 100644 --- a/app/views/groups/settings/repository/show.html.haml +++ b/app/views/groups/settings/repository/show.html.haml @@ -4,3 +4,4 @@ - deploy_token_description = s_('DeployTokens|Group deploy tokens allow access to the packages, repositories, and registry images within the group.') = render "shared/deploy_tokens/index", group_or_project: @group, description: deploy_token_description += render "initial_branch_name", group: @group diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index fa560942c5d..9d5ec5008dc 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -1,7 +1,9 @@ - breadcrumb_title _("Details") -- page_title _("Groups") - @content_class = "limit-container-width" unless fluid_layout +- if show_thanks_for_purchase_banner? + = render_if_exists 'shared/thanks_for_purchase_banner', plan_title: plan_title, quantity: params[:purchased_quantity].to_i + - if show_invite_banner?(@group) = content_for :group_invite_members_banner do .container-fluid.container-limited{ class: "gl-pb-2! gl-pt-6! #{@content_class}" } diff --git a/app/views/groups/sidebar/_packages.html.haml b/app/views/groups/sidebar/_packages.html.haml index 54510d5df0c..7e0ee032aeb 100644 --- a/app/views/groups/sidebar/_packages.html.haml +++ b/app/views/groups/sidebar/_packages.html.haml @@ -1,7 +1,7 @@ - packages_link = group_packages_list_nav? ? group_packages_path(@group) : group_container_registries_path(@group) - if group_packages_nav? - = nav_link(controller: ['groups/packages', 'groups/registry/repositories']) do + = nav_link(controller: ['groups/packages', 'groups/registry/repositories', 'groups/dependency_proxies']) do = link_to packages_link, title: _('Packages') do .nav-icon-container = sprite_icon('package') @@ -21,3 +21,7 @@ = nav_link(controller: 'groups/registry/repositories') do = link_to group_container_registries_path(@group), title: _('Container Registry') do %span= _('Container Registry') + - if group_dependency_proxy_nav? + = nav_link(controller: 'groups/dependency_proxies') do + = link_to group_dependency_proxy_path(@group), title: _('Dependency Proxy') do + %span= _('Dependency Proxy') |