From 1d84a028b42a1a3aed36a0f3a6cae970c8df8e69 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 17 Jul 2020 21:09:23 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/views/shared/issuable/form/_title.html.haml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'app/views/shared/issuable/form/_title.html.haml') diff --git a/app/views/shared/issuable/form/_title.html.haml b/app/views/shared/issuable/form/_title.html.haml index 355a6627b8f..98c9f73fa3a 100644 --- a/app/views/shared/issuable/form/_title.html.haml +++ b/app/views/shared/issuable/form/_title.html.haml @@ -3,6 +3,13 @@ - form = local_assigns.fetch(:form) - no_issuable_templates = issuable_templates(issuable).empty? - div_class = no_issuable_templates ? 'col-sm-10' : 'col-sm-7 col-lg-8' +- toggle_wip_link_start = '' +- toggle_wip_link_end = '' +- draft_snippet = 'Draft:'.html_safe +- wip_snippet = 'WIP:'.html_safe +- draft_or_wip_snippet = 'Draft/WIP'.html_safe +- add_wip_text = (_('%{link_start}Start the title with %{draft_snippet} or %{wip_snippet}%{link_end} to prevent a merge request that is a work in progress from being merged before it\'s ready.') % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_snippet: draft_snippet, wip_snippet: wip_snippet } ).html_safe +- remove_wip_text = (_('%{link_start}Remove the %{draft_or_wip_snippet} prefix%{link_end} from the title to allow this merge request to be merged when it\'s ready.' ) % { link_start: toggle_wip_link_start, link_end: toggle_wip_link_end, draft_or_wip_snippet: draft_or_wip_snippet } ).html_safe %div{ class: div_class } = form.text_field :title, required: true, maxlength: 255, autofocus: true, @@ -11,23 +18,12 @@ - if issuable.respond_to?(:work_in_progress?) .form-text.text-muted .js-wip-explanation - %a.js-toggle-wip{ href: '' } - Remove the - %code WIP: - prefix from the title - to allow this - %strong Work In Progress - merge request to be merged when it's ready. + = remove_wip_text .js-no-wip-explanation - if has_wip_commits - It looks like you have some WIP commits in this branch. + = _('It looks like you have some draft commits in this branch.') %br - %a.js-toggle-wip{ href: '' } - Start the title with - %code WIP: - to prevent a - %strong Work In Progress - merge request from being merged before it's ready. + = add_wip_text - if no_issuable_templates && can?(current_user, :push_code, issuable.project) = render 'shared/issuable/form/default_templates' -- cgit v1.2.1