diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /app/views/groups | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'app/views/groups')
-rw-r--r-- | app/views/groups/_flash_messages.html.haml | 1 | ||||
-rw-r--r-- | app/views/groups/_home_panel.html.haml | 6 | ||||
-rw-r--r-- | app/views/groups/_import_group_pane.html.haml | 52 | ||||
-rw-r--r-- | app/views/groups/_new_group_fields.html.haml | 22 | ||||
-rw-r--r-- | app/views/groups/imports/show.html.haml | 10 | ||||
-rw-r--r-- | app/views/groups/milestones/_form.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/milestones/_milestone.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/milestones/index.html.haml | 5 | ||||
-rw-r--r-- | app/views/groups/new.html.haml | 73 | ||||
-rw-r--r-- | app/views/groups/registry/repositories/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/settings/_export.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/settings/_general.html.haml | 2 | ||||
-rw-r--r-- | app/views/groups/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/groups/sidebar/_packages.html.haml | 6 |
14 files changed, 138 insertions, 55 deletions
diff --git a/app/views/groups/_flash_messages.html.haml b/app/views/groups/_flash_messages.html.haml index fa1a9d2cca4..ca951f28fcf 100644 --- a/app/views/groups/_flash_messages.html.haml +++ b/app/views/groups/_flash_messages.html.haml @@ -1,2 +1,3 @@ = content_for :flash_message do = render_if_exists 'shared/shared_runners_minutes_limit', namespace: @group, classes: [container_class, ("limit-container-width" unless fluid_layout)] + = render 'shared/namespace_storage_limit_alert', namespace: @group, classes: [container_class, ("limit-container-width" unless fluid_layout)] diff --git a/app/views/groups/_home_panel.html.haml b/app/views/groups/_home_panel.html.haml index d083288edc8..9bf7ad228d9 100644 --- a/app/views/groups/_home_panel.html.haml +++ b/app/views/groups/_home_panel.html.haml @@ -9,15 +9,15 @@ = group_icon(@group, class: 'avatar avatar-tile s64', width: 64, height: 64) .d-flex.flex-column.flex-wrap.align-items-baseline .d-inline-flex.align-items-baseline - %h1.home-panel-title.prepend-top-8.append-bottom-5 + %h1.home-panel-title.gl-mt-3.append-bottom-5 = @group.name - %span.visibility-icon.text-secondary.prepend-left-4.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) } + %span.visibility-icon.text-secondary.gl-ml-2.has-tooltip{ data: { container: 'body' }, title: visibility_icon_description(@group) } = visibility_level_icon(@group.visibility_level, fw: false, options: {class: 'icon'}) .home-panel-metadata.d-flex.align-items-center.text-secondary %span = _("Group ID: %{group_id}") % { group_id: @group.id } - if current_user - %span.access-request-links.prepend-left-8 + %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 diff --git a/app/views/groups/_import_group_pane.html.haml b/app/views/groups/_import_group_pane.html.haml new file mode 100644 index 00000000000..adfac7d59a5 --- /dev/null +++ b/app/views/groups/_import_group_pane.html.haml @@ -0,0 +1,52 @@ +- parent = @group.parent +- group_path = root_url +- group_path << parent.full_path + '/' if parent + += form_with url: import_gitlab_group_path, class: 'group-form gl-show-field-errors', multipart: true do |f| + = form_errors(@group) + + .row + .form-group.group-name.col-sm-12 + = f.label :name, _('Group name'), class: 'label-bold' + = f.text_field :name, placeholder: s_('GroupsNew|My Awesome Group'), class: 'js-autofill-group-name form-control input-lg', + required: true, + title: _('Please fill in a descriptive name for your group.'), + autofocus: true + + .row + .form-group.col-xs-12.col-sm-8 + = f.label :path, _('Group URL'), class: 'label-bold' + .input-group.gl-field-error-anchor + .group-root-path.input-group-prepend.has-tooltip{ title: group_path, :'data-placement' => 'bottom' } + .input-group-text + %span + = root_url + - if parent + %strong= parent.full_path + '/' + = f.hidden_field :parent_id, value: parent&.id + = f.text_field :path, placeholder: 'my-awesome-group', class: 'form-control js-validate-group-path js-autofill-group-path', + id: 'import_group_path', + required: true, + pattern: Gitlab::PathRegex::NAMESPACE_FORMAT_REGEX_JS, + title: _('Please choose a group URL with no special characters.'), + "data-bind-in" => "#{'create_chat_team' if Gitlab.config.mattermost.enabled}" + %p.validation-error.gl-field-error.field-validation.hide + = _('Group path is already taken. Suggestions: ') + %span.gl-path-suggestions + %p.validation-success.gl-field-success.field-validation.hide= _('Group path is available.') + %p.validation-pending.gl-field-error-ignore.field-validation.hide= _('Checking group path availability...') + + .row + .form-group.col-md-12 + = s_('GroupsNew|To copy a GitLab group between installations, navigate to the group settings page for the original installation, generate an export file, and upload it here.') + .row + .form-group.col-sm-12 + = f.label :file, s_('GroupsNew|GitLab group export'), class: 'label-bold' + %div + = render 'shared/file_picker_button', f: f, field: :file, help_text: nil + + .row + .form-actions.col-sm-12 + = f.submit s_('GroupsNew|Import group'), class: 'btn btn-success' + = link_to _('Cancel'), new_group_path, class: 'btn btn-cancel' + diff --git a/app/views/groups/_new_group_fields.html.haml b/app/views/groups/_new_group_fields.html.haml new file mode 100644 index 00000000000..d9706556e79 --- /dev/null +++ b/app/views/groups/_new_group_fields.html.haml @@ -0,0 +1,22 @@ += form_errors(@group) += render 'shared/group_form', f: f, autofocus: true + +.row + .form-group.group-description-holder.col-sm-12 + = f.label :avatar, _("Group avatar"), class: 'label-bold' + %div + = render 'shared/choose_avatar_button', f: f + + .form-group.col-sm-12 + %label.label-bold + = _('Visibility level') + %p + = _('Who will be able to see this group?') + = link_to _('View the documentation'), help_page_path("public_access/public_access"), target: '_blank' + = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group, with_label: false + + = render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled + + .form-actions.col-sm-12 + = f.submit _('Create group'), class: "btn btn-success" + = link_to _('Cancel'), dashboard_groups_path, class: 'btn btn-cancel' diff --git a/app/views/groups/imports/show.html.haml b/app/views/groups/imports/show.html.haml new file mode 100644 index 00000000000..ac8ca8797fe --- /dev/null +++ b/app/views/groups/imports/show.html.haml @@ -0,0 +1,10 @@ +- page_title _('Import in progress') +- @content_class = "limit-container-width" unless fluid_layout + +.save-group-loader + .center + %h2 + %i.loading.spinner.spinner-sm + = page_title + %p + = s_('GroupImport|Please wait while we import the group for you. Refresh at will.') diff --git a/app/views/groups/milestones/_form.html.haml b/app/views/groups/milestones/_form.html.haml index b0ba846f204..7a35bc12eee 100644 --- a/app/views/groups/milestones/_form.html.haml +++ b/app/views/groups/milestones/_form.html.haml @@ -11,8 +11,8 @@ .col-form-label.col-sm-2 = f.label :description, "Description" .col-sm-10 - = render layout: 'projects/md_preview', locals: { url: group_preview_markdown_path } do - = render 'projects/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...', supports_autocomplete: false + = render layout: 'shared/md_preview', locals: { url: group_preview_markdown_path } do + = render 'shared/zen', f: f, attr: :description, classes: 'note-textarea', placeholder: 'Write milestone description...', supports_autocomplete: false .clearfix .error-alert = render "shared/milestones/form_dates", f: f diff --git a/app/views/groups/milestones/_milestone.html.haml b/app/views/groups/milestones/_milestone.html.haml index bae8997e24c..b73626dab81 100644 --- a/app/views/groups/milestones/_milestone.html.haml +++ b/app/views/groups/milestones/_milestone.html.haml @@ -1,6 +1,4 @@ - = render 'shared/milestones/milestone', - milestone_path: group_milestone_route(milestone), issues_path: issues_group_path(@group, milestone_title: milestone.title), merge_requests_path: merge_requests_group_path(@group, milestone_title: milestone.title), milestone: milestone diff --git a/app/views/groups/milestones/index.html.haml b/app/views/groups/milestones/index.html.haml index b6fb908c8f6..03407adb57d 100644 --- a/app/views/groups/milestones/index.html.haml +++ b/app/views/groups/milestones/index.html.haml @@ -16,5 +16,8 @@ .nothing-here-block No milestones to show - else - @milestones.each do |milestone| - = render 'milestone', milestone: milestone + - if milestone.project_milestone? + = render 'projects/milestones/milestone', milestone: milestone + - else + = render 'milestone', milestone: milestone = paginate @milestones, theme: "gitlab" diff --git a/app/views/groups/new.html.haml b/app/views/groups/new.html.haml index 376624f4786..ed016206310 100644 --- a/app/views/groups/new.html.haml +++ b/app/views/groups/new.html.haml @@ -2,43 +2,44 @@ - @hide_top_links = true - page_title _('New Group') - header_title _("Groups"), dashboard_groups_path +- active_tab = local_assigns.fetch(:active_tab, 'create') -.page-title-holder.d-flex.align-items-center - %h1.page-title= _('New group') -.row.prepend-top-default - .col-lg-3.profile-settings-sidebar - %p - - group_docs_path = help_page_path('user/group/index') - - group_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_docs_path } - = s_('%{group_docs_link_start}Groups%{group_docs_link_end} allow you to manage and collaborate across multiple projects. Members of a group have access to all of its projects.').html_safe % { group_docs_link_start: group_docs_link_start, group_docs_link_end: '</a>'.html_safe } - %p - - subgroup_docs_path = help_page_path('user/group/subgroups/index') - - subgroup_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: subgroup_docs_path } - = s_('Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}.').html_safe % { subgroup_docs_link_start: subgroup_docs_link_start, subgroup_docs_link_end: '</a>'.html_safe } - %p - = _('Projects that belong to a group are prefixed with the group namespace. Existing projects may be moved into a group.') +.group-edit-container.prepend-top-default + .row + .col-lg-3.group-settings-sidebar + %h4.prepend-top-0 + = _('New group') + %p + - group_docs_path = help_page_path('user/group/index') + - group_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: group_docs_path } + = s_('%{group_docs_link_start}Groups%{group_docs_link_end} allow you to manage and collaborate across multiple projects. Members of a group have access to all of its projects.').html_safe % { group_docs_link_start: group_docs_link_start, group_docs_link_end: '</a>'.html_safe } + %p + - subgroup_docs_path = help_page_path('user/group/subgroups/index') + - subgroup_docs_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: subgroup_docs_path } + = s_('Groups can also be nested by creating %{subgroup_docs_link_start}subgroups%{subgroup_docs_link_end}.').html_safe % { subgroup_docs_link_start: subgroup_docs_link_start, subgroup_docs_link_end: '</a>'.html_safe } + %p + = _('Projects that belong to a group are prefixed with the group namespace. Existing projects may be moved into a group.') - .col-lg-9 - = form_for @group, html: { class: 'group-form gl-show-field-errors' } do |f| - = form_errors(@group) - = render 'shared/group_form', f: f, autofocus: true + .col-lg-9.js-toggle-container + %ul.nav.nav-tabs.nav-links.gitlab-tabs{ role: 'tablist' } + %li.nav-item{ role: 'presentation' } + %a.nav-link.active{ href: '#create-group-pane', id: 'create-group-tab', role: 'tab', data: { toggle: 'tab', track_label: 'create_group', track_event: 'click_tab', track_value: '' } } + %span.d-none.d-sm-block= s_('GroupsNew|Create group') + %span.d-block.d-sm-none= s_('GroupsNew|Create') + %li.nav-item{ role: 'presentation' } + %a.nav-link{ href: '#import-group-pane', id: 'import-group-tab', role: 'tab', data: { toggle: 'tab', track_label: 'import_group', track_event: 'click_tab', track_value: '' } } + %span.d-none.d-sm-block= s_('GroupsNew|Import group') + %span.d-block.d-sm-none= s_('GroupsNew|Import') - .row - .form-group.group-description-holder.col-sm-12 - = f.label :avatar, _("Group avatar"), class: 'label-bold' - %div - = render 'shared/choose_avatar_button', f: f + .tab-content.gitlab-tab-content + .tab-pane.js-toggle-container{ id: 'create-group-pane', class: active_when(active_tab == 'create'), role: 'tabpanel' } + = form_for @group, html: { class: 'group-form gl-show-field-errors' } do |f| + = render 'new_group_fields', f: f, group_name_id: 'create-group-name' - .form-group.col-sm-12 - %label.label-bold - = _('Visibility level') - %p - = _('Who will be able to see this group?') - = link_to _('View the documentation'), help_page_path("public_access/public_access"), target: '_blank' - = render 'shared/visibility_level', f: f, visibility_level: default_group_visibility, can_change_visibility_level: true, form_model: @group, with_label: false - - = render 'create_chat_team', f: f if Gitlab.config.mattermost.enabled - - .form-actions - = f.submit _('Create group'), class: "btn btn-success" - = link_to _('Cancel'), dashboard_groups_path, class: 'btn btn-cancel' + .tab-pane.js-toggle-container{ id: 'import-group-pane', class: active_when(active_tab) == 'import', role: 'tabpanel' } + - if import_sources_enabled? + = render 'import_group_pane', active_tab: active_tab, autofocus: true + - else + .nothing-here-block + %h4= s_('GroupsNew|No import options available') + %p= s_('GroupsNew|Contact an administrator to enable options for importing your group.') diff --git a/app/views/groups/registry/repositories/index.html.haml b/app/views/groups/registry/repositories/index.html.haml index 41cb073686a..2cac8e653e5 100644 --- a/app/views/groups/registry/repositories/index.html.haml +++ b/app/views/groups/registry/repositories/index.html.haml @@ -12,6 +12,6 @@ "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'), - "is_admin": current_user&.admin, - is_group_page: true, + "is_admin": current_user&.admin.to_s, + is_group_page: "true", character_error: @character_error.to_s } } diff --git a/app/views/groups/settings/_export.html.haml b/app/views/groups/settings/_export.html.haml index ef7bf562c69..94466b76ac8 100644 --- a/app/views/groups/settings/_export.html.haml +++ b/app/views/groups/settings/_export.html.haml @@ -7,7 +7,7 @@ %p= _('Export this group with all related data to a new GitLab instance. Once complete, you can import the data file from the "New Group" page.') .bs-callout.bs-callout-info - %p.append-bottom-0 + %p.gl-mb-0 %p= _('The following items will be exported:') %ul - group_export_descriptions.each do |description| diff --git a/app/views/groups/settings/_general.html.haml b/app/views/groups/settings/_general.html.haml index 73a0c8ff02b..742bf50fb89 100644 --- a/app/views/groups/settings/_general.html.haml +++ b/app/views/groups/settings/_general.html.haml @@ -12,7 +12,7 @@ = f.label :id, _('Group ID'), class: 'label-bold' = f.text_field :id, class: 'form-control w-auto', readonly: true - .row.prepend-top-8 + .row.gl-mt-3 .form-group.col-md-9 = f.label :description, _('Group description (optional)'), class: 'label-bold' = f.text_area :description, class: 'form-control', rows: 3, maxlength: 250 diff --git a/app/views/groups/show.html.haml b/app/views/groups/show.html.haml index 032766327ca..7e5bf6ddde1 100644 --- a/app/views/groups/show.html.haml +++ b/app/views/groups/show.html.haml @@ -1,10 +1,6 @@ - breadcrumb_title _("Details") - @content_class = "limit-container-width" unless fluid_layout -= content_for :flash_message do - - if Feature.enabled?(:subscribable_banner_subscription) - = render_if_exists "layouts/header/ee_subscribable_banner", subscription: true - = content_for :meta_tags do = auto_discovery_link_tag(:atom, group_url(@group, rss_url_options), title: "#{@group.name} activity") diff --git a/app/views/groups/sidebar/_packages.html.haml b/app/views/groups/sidebar/_packages.html.haml index 67e759a4d63..59061a048b3 100644 --- a/app/views/groups/sidebar/_packages.html.haml +++ b/app/views/groups/sidebar/_packages.html.haml @@ -1,16 +1,16 @@ - if group_container_registry_nav? - = nav_link(path: group_packages_nav_link_paths) do + = nav_link(controller: 'groups/registry/repositories') do = link_to group_container_registries_path(@group), title: _('Container Registry') do .nav-icon-container = sprite_icon('package') %span.nav-item-name = _('Packages & Registries') %ul.sidebar-sub-level-items - = nav_link(controller: [:packages, :repositories], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: 'groups/registry/repositories', html_options: { class: "fly-out-top-item" } ) do = link_to group_container_registries_path(@group), title: _('Container Registry') do %strong.fly-out-top-item-name = _('Packages & Registries') %li.divider.fly-out-top-item - = nav_link(controller: 'groups/container_registries') do + = nav_link(controller: 'groups/registry/repositories') do = link_to group_container_registries_path(@group), title: _('Container Registry') do %span= _('Container Registry') |