Commit 57e37611 authored by Brandon Labuschagne's avatar Brandon Labuschagne

Merge branch 'update-custom-templates-group-settings-UI-text' into 'master'

Update the UI text for custom templates group setting

See merge request gitlab-org/gitlab!65726
parents caa765ac 2a7c9f6e
...@@ -9,25 +9,35 @@ info: To determine the technical writer assigned to the Stage/Group associated w ...@@ -9,25 +9,35 @@ info: To determine the technical writer assigned to the Stage/Group associated w
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/6861) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.6. > [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/6861) in [GitLab Premium](https://about.gitlab.com/pricing/) 11.6.
Custom project templates are useful for organizations that need to create many similar types of [Group owners](../permissions.md#group-members-permissions) can set a subgroup to
[projects](../project/index.md). be the source of project templates that are selectable when a new project is created
Projects created from these templates serve as a common starting point. in the group. These templates can be selected when you go to **New project > Create from template**
in the group and select the **Group** tab.
## Setting up group-level project templates Every project in the subgroup, but not nested subgroups, can be selected by members
of the group when a new project is created.
To use a custom project template for a new project: Repository and database information that is copied over to each new project is identical to the
data exported with the [GitLab Project Import/Export](../project/settings/import_export.md).
To set custom project templates at the instance level, see [Custom instance-level project templates](../admin_area/custom_project_templates.md).
1. [Create a `templates` subgroup](subgroups/index.md). ## Set up group-level project templates
1. [Add repositories (projects) to that new subgroup](index.md#add-projects-to-a-group),
as your templates.
1. Edit your group's settings to look to your _templates_ subgroup for templates:
1. In the left menu, select **Settings > General**. If you don't have access to the To set up custom project templates in a group, add the subgroup that contains the
group's settings, you may not have sufficient privileges (for example, you may need developer project templates to the group settings:
or higher permissions).
1. Scroll to **Custom project templates** and select **Expand**. If no **Custom project templates** 1. In the group, create a [subgroup](subgroups/index.md).
section displays, make sure you've created a subgroup and added a project (repository) to it. 1. [Add projects to the new subgroup](index.md#add-projects-to-a-group) as your templates.
1. Select the **templates** subgroup. 1. In the left menu for the group, go to **Settings > General**.
1. Expand **Custom project templates** and select the subgroup.
If all enabled [project features](../project/settings/index.md#sharing-and-permissions)
(except for GitLab Pages) are set to **Everyone With Access**, then every project
template in the subgroup is available to every member of the group.
Any projects added to the subgroup later can be selected the next time a group member
creates a new project.
### Example structure ### Example structure
...@@ -54,25 +64,6 @@ gitlab.com/acmeco/ ...@@ -54,25 +64,6 @@ gitlab.com/acmeco/
... ...
``` ```
### Adjust Settings
Users can configure a GitLab group that serves as template source under a group's
**Settings > General > Custom project templates**.
NOTE:
GitLab administrators can [set project templates for an entire GitLab instance](../admin_area/custom_project_templates.md).
Within this section, you can configure the group where all the custom project templates are sourced.
If all enabled [project features](../project/settings/index.md#sharing-and-permissions)
(except for GitLab Pages) are set to **Everyone With Access**, then every project template directly
under the group namespace is available to every signed-in user. However, private projects are
available only if the user is a member of the project. Also note that only direct subgroups can be
set as the template source. Projects of nested subgroups of a selected template source cannot be
used.
Repository and database information that are copied over to each new project are identical to the
data exported with the [GitLab Project Import/Export](../project/settings/import_export.md).
<!-- ## Troubleshooting <!-- ## Troubleshooting
Include any troubleshooting steps that you can foresee. If you know beforehand what issues Include any troubleshooting steps that you can foresee. If you know beforehand what issues
......
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
%button.btn.gl-button.js-settings-toggle{ type: 'button' } %button.btn.gl-button.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand') = expanded ? _('Collapse') : _('Expand')
%p %p
= s_('GroupSettings|Select a sub-group as the custom project template source for this group.') = s_('GroupSettings|Select a subgroup to use as the source for custom project templates for this group.')
= link_to s_('GroupSettings|Learn more about group-level project templates.'), help_page_path('user/group/custom_project_templates')
.settings-content .settings-content
= form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f| = form_for @group, html: { multipart: true, class: 'gl-show-field-errors' }, authenticity_token: true do |f|
%input{ type: 'hidden', name: 'update_section', value: 'js-custom-project-templates-settings' } %input{ type: 'hidden', name: 'update_section', value: 'js-custom-project-templates-settings' }
...@@ -18,7 +17,8 @@ ...@@ -18,7 +17,8 @@
%fieldset %fieldset
.form-group .form-group
= f.label :custom_project_templates_group_id, class: 'label-bold' do = f.label :custom_project_templates_group_id, class: 'label-bold' do
= _('Custom project templates') = _('Select subgroup')
= groups_select_tag('group[custom_project_templates_group_id]', data: { groups_filter: 'subgroups', parent_id: @group.id }, selected: @group.custom_project_templates_group_id, class: 'input-clamp allowClear qa-custom-project-template-select', multiple: false) = groups_select_tag('group[custom_project_templates_group_id]', data: { groups_filter: 'subgroups', parent_id: @group.id }, selected: @group.custom_project_templates_group_id, class: 'input-clamp allowClear qa-custom-project-template-select', multiple: false)
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('user/group/custom_project_templates.md') }
= s_("GroupSettings|The projects in this subgroup can be selected as templates for new projects created in the group. %{link_start}Learn more.%{link_end}").html_safe % { link_start: link_start, link_end: "</a>".html_safe }
= f.submit _('Save changes'), class: 'btn gl-button btn-success qa-save-changes-button' = f.submit _('Save changes'), class: 'btn gl-button btn-success qa-save-changes-button'
...@@ -15801,9 +15801,6 @@ msgstr "" ...@@ -15801,9 +15801,6 @@ msgstr ""
msgid "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." msgid "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."
msgstr "" msgstr ""
msgid "GroupSettings|Learn more about group-level project templates."
msgstr ""
msgid "GroupSettings|New runners registration token has been generated!" msgid "GroupSettings|New runners registration token has been generated!"
msgstr "" msgstr ""
...@@ -15831,7 +15828,7 @@ msgstr "" ...@@ -15831,7 +15828,7 @@ msgstr ""
msgid "GroupSettings|Projects will be permanently deleted after a %{waiting_period}-day delay. This delay can be %{link_start}customized by an admin%{link_end} in instance settings. Inherited by subgroups." msgid "GroupSettings|Projects will be permanently deleted after a %{waiting_period}-day delay. This delay can be %{link_start}customized by an admin%{link_end} in instance settings. Inherited by subgroups."
msgstr "" msgstr ""
msgid "GroupSettings|Select a sub-group as the custom project template source for this group." msgid "GroupSettings|Select a subgroup to use as the source for custom project templates for this group."
msgstr "" msgstr ""
msgid "GroupSettings|The Auto DevOps pipeline runs if no alternative CI configuration file is found." msgid "GroupSettings|The Auto DevOps pipeline runs if no alternative CI configuration file is found."
...@@ -15840,6 +15837,9 @@ msgstr "" ...@@ -15840,6 +15837,9 @@ msgstr ""
msgid "GroupSettings|The default name for the initial branch of new repositories created in the group." msgid "GroupSettings|The default name for the initial branch of new repositories created in the group."
msgstr "" msgstr ""
msgid "GroupSettings|The projects in this subgroup can be selected as templates for new projects created in the group. %{link_start}Learn more.%{link_end}"
msgstr ""
msgid "GroupSettings|There was a problem updating Auto DevOps pipeline: %{error_messages}." msgid "GroupSettings|There was a problem updating Auto DevOps pipeline: %{error_messages}."
msgstr "" msgstr ""
...@@ -29437,6 +29437,9 @@ msgstr "" ...@@ -29437,6 +29437,9 @@ msgstr ""
msgid "Select strategy activation method" msgid "Select strategy activation method"
msgstr "" msgstr ""
msgid "Select subgroup"
msgstr ""
msgid "Select subscription" msgid "Select subscription"
msgstr "" msgstr ""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment