diff options
Diffstat (limited to 'app/views/shared/issuable/form/_metadata.html.haml')
-rw-r--r-- | app/views/shared/issuable/form/_metadata.html.haml | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/app/views/shared/issuable/form/_metadata.html.haml b/app/views/shared/issuable/form/_metadata.html.haml index e941eaadbc9..61cc408f6b3 100644 --- a/app/views/shared/issuable/form/_metadata.html.haml +++ b/app/views/shared/issuable/form/_metadata.html.haml @@ -5,24 +5,21 @@ - form = local_assigns.fetch(:form) - if @add_related_issue - .form-group.row - .offset-sm-2.col-sm-10 - .form-check - = check_box_tag :add_related_issue, @add_related_issue.iid, true, class: 'form-check-input' - = label_tag :add_related_issue, class: 'form-check-label' do - - add_related_issue_link = link_to "\##{@add_related_issue.iid}", issue_path(@add_related_issue), class: ['has-tooltip'], title: @add_related_issue.title - #{_('Relate to %{issuable_type} %{add_related_issue_link}').html_safe % { issuable_type: @add_related_issue.issue_type, add_related_issue_link: add_related_issue_link }} - %p.text-muted= _('Adds this %{issuable_type} as related to the %{issuable_type} it was created from') % { issuable_type: @add_related_issue.issue_type } + .form-group + .form-check + = check_box_tag :add_related_issue, @add_related_issue.iid, true, class: 'form-check-input' + = label_tag :add_related_issue, class: 'form-check-label' do + - add_related_issue_link = link_to "\##{@add_related_issue.iid}", issue_path(@add_related_issue), class: ['has-tooltip'], title: @add_related_issue.title + #{_('Relate to %{issuable_type} %{add_related_issue_link}').html_safe % { issuable_type: @add_related_issue.issue_type, add_related_issue_link: add_related_issue_link }} + %p.text-muted= _('Adds this %{issuable_type} as related to the %{issuable_type} it was created from') % { issuable_type: @add_related_issue.issue_type } - if issuable.respond_to?(:confidential) && can?(current_user, :set_confidentiality, issuable) - .form-group.row - .offset-sm-2.col-sm-10 - = form.gitlab_ui_checkbox_component :confidential, - _('This issue is confidential and should only be visible to team members with at least Reporter access.') + .form-group + = form.gitlab_ui_checkbox_component :confidential, + _('This issue is confidential and should only be visible to team members with at least Reporter access.') - if can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable) - %hr - .row + .row.gl-pt-4 %div{ class: (has_due_date ? "col-lg-6" : "col-12") } .form-group.row.merge-request-assignee = render "shared/issuable/form/metadata_issuable_assignee", issuable: issuable, form: form, has_due_date: has_due_date @@ -35,15 +32,15 @@ - if issuable.supports_milestone? .form-group.row.issue-milestone - = form.label :milestone_id, _('Milestone'), class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}" - .col-sm-10{ class: ("col-md-8" if has_due_date) } + = form.label :milestone_id, _('Milestone'), class: "col-12" + .col-12 .issuable-form-select-holder = render "shared/issuable/milestone_dropdown", selected: issuable.milestone, name: "#{issuable.class.model_name.param_key}[milestone_id]", show_any: false, show_upcoming: false, show_started: false, extra_class: "qa-issuable-milestone-dropdown js-issuable-form-dropdown js-dropdown-keep-input", dropdown_title: _('Select milestone') .form-group.row - = form.label :label_ids, _('Labels'), class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}" + = form.label :label_ids, _('Labels'), class: "col-12" = form.hidden_field :label_ids, multiple: true, value: '' - .col-sm-10{ class: "#{"col-md-8" if has_due_date}" } + .col-12 .issuable-form-select-holder = render "shared/issuable/label_dropdown", classes: ["js-issuable-form-dropdown"], selected: issuable.labels, data_options: { field_name: "#{issuable.class.model_name.param_key}[label_ids][]", show_any: false }, dropdown_title: "Select label" @@ -53,7 +50,7 @@ .col-lg-6 = render_if_exists "shared/issuable/form/weight", issuable: issuable, form: form .form-group.row - = form.label :due_date, _('Due date'), class: "col-form-label col-md-2 col-lg-4" - .col-8 + = form.label :due_date, _('Due date'), class: "col-12" + .col-12 .issuable-form-select-holder = form.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: _('Select due date'), autocomplete: 'off' |