Commit d8a1348d authored by Enrique Alcántara's avatar Enrique Alcántara

Merge branch '330161-aqualls-custom-templates' into 'master'

Revise UI to better explain file templates

See merge request gitlab-org/gitlab!70315
parents 82b228a9 bc78336c
......@@ -31,6 +31,8 @@ After you add templates, you can use them for the entire instance.
They are available in the [Web Editor's dropdown](../../project/repository/web_editor.md#template-dropdowns)
and through the [API settings](../../../api/settings.md).
## Supported file types and locations
Templates must be added to a specific subdirectory in the repository,
corresponding to the kind of template. The following types of custom templates
are supported:
......
......@@ -6,7 +6,8 @@
%button.btn.gl-button.btn-default.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
= _('Select a shared template repository for all projects on this instance.')
= _('Select a repository containing templates for common files.')
= link_to _('What templates can I create?'), help_page_path('user/admin_area/settings/instance_template_repository.md', anchor: 'supported-file-types-and-locations'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
= form_for @application_setting, url: templates_admin_application_settings_path, html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
......@@ -18,6 +19,6 @@
= _('Select a template repository')
= project_select_tag('application_setting[file_template_project_id]', class: 'project-item-select hidden-filter-value', toggle_class: 'js-project-search js-project-filter js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit',
placeholder: _('Search projects'), idAttribute: 'id', data: { order_by: 'last_activity_at', idattribute: 'id', all_projects: 'true', simple_filter: true, allow_clear: true }, value: @application_setting.file_template_project_id)
- link_start = '<a href="%{url}">'.html_safe % { url: help_page_path('user/admin_area/settings/instance_template_repository') }
= s_('TemplateRepository|Select a repository to make its templates available to all projects. %{link_start}What should the repository contain?%{link_end} ').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= s_('TemplateRepository|Create common files more quickly, and standardize their format.')
= link_to "How do I use file templates?", help_page_path('user/project/repository/web_editor.md', anchor: 'template-dropdowns'), target: '_blank', rel: 'noopener noreferrer'
= f.submit _('Save changes'), class: "gl-button btn btn-confirm"
......@@ -7,7 +7,8 @@
%button.btn.gl-button.js-settings-toggle{ type: 'button' }
= expanded ? _('Collapse') : _('Expand')
%p
= _('Set a template repository for projects in this group')
= _('Select a repository containing templates for common files.')
= link_to _('What templates can I create?'), help_page_path('user/admin_area/settings/instance_template_repository.md', anchor: 'supported-file-types-and-locations'), target: '_blank', rel: 'noopener noreferrer'
.settings-content
= form_for @group, url: group_path, html: { class: 'fieldset-form' } do |f|
= form_errors(@group)
......@@ -17,7 +18,8 @@
= f.label :file_template_project_id, class: 'label-light' do
.form-text.text-muted
= _('Select a template repository')
= link_to sprite_icon('question-o'), help_page_path('user/group/index.md', anchor: 'group-file-templates'), target: '_blank'
= project_select_tag('group[file_template_project_id]', class: 'project-item-select hidden-filter-value qa-file-template-repository-dropdown', toggle_class: 'js-project-search js-project-filter js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit',
placeholder: _('Search projects'), idAttribute: 'id', data: { order_by: 'last_activity_at', idattribute: 'id', simple_filter: true, allow_clear: true }, value: @group.checked_file_template_project_id)
= s_('Create common files more quickly, and standardize their format.')
= link_to s_("How do I use file templates?"), help_page_path('user/project/repository/web_editor.md', anchor: 'template-dropdowns'), target: '_blank', rel: 'noopener noreferrer'
= f.submit _('Save changes'), class: "btn gl-button btn-success", data: { qa_selector: 'save_changes_button' }
......@@ -9516,6 +9516,9 @@ msgstr ""
msgid "Create commit"
msgstr ""
msgid "Create common files more quickly, and standardize their format."
msgstr ""
msgid "Create confidential merge request"
msgstr ""
......@@ -16829,6 +16832,9 @@ msgstr ""
msgid "How do I use a web terminal?"
msgstr ""
msgid "How do I use file templates?"
msgstr ""
msgid "How it works"
msgstr ""
......@@ -30385,10 +30391,10 @@ msgstr ""
msgid "Select a repository"
msgstr ""
msgid "Select a role"
msgid "Select a repository containing templates for common files."
msgstr ""
msgid "Select a shared template repository for all projects on this instance."
msgid "Select a role"
msgstr ""
msgid "Select a template repository"
......@@ -30793,9 +30799,6 @@ msgstr ""
msgid "Set a password on your account to pull or push via %{protocol}."
msgstr ""
msgid "Set a template repository for projects in this group"
msgstr ""
msgid "Set access permissions for this token."
msgstr ""
......@@ -33110,7 +33113,7 @@ msgstr ""
msgid "Template to append to all Service Desk issues"
msgstr ""
msgid "TemplateRepository|Select a repository to make its templates available to all projects. %{link_start}What should the repository contain?%{link_end} "
msgid "TemplateRepository|Create common files more quickly, and standardize their format."
msgstr ""
msgid "Templates"
......@@ -38018,6 +38021,9 @@ msgstr ""
msgid "What is your job title? (optional)"
msgstr ""
msgid "What templates can I create?"
msgstr ""
msgid "What will you use this group for?"
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