Commit 26d01b90 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Update issue description templates UI settings

parent f8b6dbab
......@@ -2,20 +2,18 @@
- expanded = expanded_by_default?
%section.settings.issues-feature.no-animate#js-issue-settings{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:issues_access_level) == 0)] }
.settings-header
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default issue template')
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default description template for issues')
%button.gl-button.btn.btn-default.js-settings-toggle= expanded ? _('Collapse') : _('Expand')
%p= _('Set a default template for issue descriptions.')
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/project/description_templates', anchor: 'setting-a-default-template-for-merge-requests-and-issues') }
%p#issue-settings-default-template-label= _('Set a default description template to be used for new issues. %{link_start}What are description templates?%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
.settings-content
= form_for @project, remote: true, html: { multipart: true, class: "issue-settings-form" }, authenticity_token: true do |f|
%input{ type: 'hidden', name: 'update_section', value: 'js-issue-settings' }
.row
.form-group.col-md-9
= f.label :issues_template, class: 'label-bold' do
= _('Default description template for issues')
= link_to sprite_icon('question-o'), help_page_path('user/project/description_templates'), target: '_blank'
= f.text_area :issues_template, class: "form-control", rows: 3
= f.text_area :issues_template, class: "form-control", rows: 3, aria: { labelledby: 'issue-settings-default-template-label'}
.text-secondary
- link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: help_page_path('user/markdown') }
= _('Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= _('Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}.').html_safe % { link_start: link_start, link_end: '</a>'.html_safe }
= f.submit _('Save changes'), class: "gl-button btn btn-success"
---
title: Update issue description templates UI settings
merge_request: 50421
author:
type: other
......@@ -19,14 +19,14 @@ RSpec.describe 'Project settings > Issues', :js do
end
it 'shows the Issues settings' do
expect(page).to have_content('Set a default template for issue descriptions.')
expect(page).to have_content('Set a default description template to be used for new issues.')
within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][issues_access_level]"] .project-feature-toggle').click
click_on('Save changes')
end
expect(page).not_to have_content('Set a default template for issue descriptions.')
expect(page).not_to have_content('Set a default description template to be used for new issues.')
end
end
end
......@@ -38,14 +38,14 @@ RSpec.describe 'Project settings > Issues', :js do
end
it 'does not show the Issues settings' do
expect(page).not_to have_content('Set a default template for issue descriptions.')
expect(page).not_to have_content('Set a default description template to be used for new issues.')
within('.sharing-permissions-form') do
find('.project-feature-controls[data-for="project[project_feature_attributes][issues_access_level]"] .project-feature-toggle').click
click_on('Save changes')
end
expect(page).to have_content('Set a default template for issue descriptions.')
expect(page).to have_content('Set a default description template to be used for new issues.')
end
end
......
......@@ -9040,9 +9040,6 @@ msgstr ""
msgid "Default initial branch name"
msgstr ""
msgid "Default issue template"
msgstr ""
msgid "Default project deletion protection"
msgstr ""
......@@ -9586,6 +9583,9 @@ msgstr ""
msgid "Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}"
msgstr ""
msgid "Description parsed with %{link_start}GitLab Flavored Markdown%{link_end}."
msgstr ""
msgid "Description template"
msgstr ""
......@@ -25402,7 +25402,7 @@ msgstr ""
msgid "Set .gitlab-ci.yml to enable or configure SAST security scanning using the GitLab managed template. You can [add variable overrides](https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings) to customize SAST settings."
msgstr ""
msgid "Set a default template for issue descriptions."
msgid "Set a default description template to be used for new issues. %{link_start}What are description templates?%{link_end}"
msgstr ""
msgid "Set a password on your account to pull or push via %{protocol}."
......
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