debian-mirror-gitlab/app/views/shared/issuable/form/_metadata.html.haml

54 lines
2.9 KiB
Text
Raw Normal View History

2020-06-23 00:09:42 +05:30
- project = local_assigns.fetch(:project)
2017-08-17 22:00:37 +05:30
- issuable = local_assigns.fetch(:issuable)
2021-02-22 17:27:13 +05:30
- presenter = local_assigns.fetch(:presenter)
2017-08-17 22:00:37 +05:30
2021-09-04 01:27:46 +05:30
- return unless can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable)
2017-08-17 22:00:37 +05:30
- has_due_date = issuable.has_attribute?(:due_date)
- form = local_assigns.fetch(:form)
2021-09-04 01:27:46 +05:30
- if issuable.respond_to?(:confidential)
.form-group.row
.offset-sm-2.col-sm-10
.form-check
= form.check_box :confidential, class: 'form-check-input'
= form.label :confidential, class: 'form-check-label' do
This issue is confidential and should only be visible to team members with at least Reporter access.
2017-08-17 22:00:37 +05:30
%hr
.row
2018-11-08 19:23:39 +05:30
%div{ class: (has_due_date ? "col-lg-6" : "col-12") }
2019-07-31 22:56:46 +05:30
.form-group.row.merge-request-assignee
= render "shared/issuable/form/metadata_issuable_assignee", issuable: issuable, form: form, has_due_date: has_due_date
2020-06-23 00:09:42 +05:30
2020-11-24 15:15:51 +05:30
- if issuable.allows_reviewers?
.form-group.row.merge-request-reviewer
2021-02-22 17:27:13 +05:30
= render "shared/issuable/form/metadata_issuable_reviewer", issuable: issuable, form: form, has_due_date: has_due_date, presenter: presenter
2020-11-24 15:15:51 +05:30
2020-06-23 00:09:42 +05:30
= render_if_exists "shared/issuable/form/epic", issuable: issuable, form: form, project: project
2020-11-24 15:15:51 +05:30
- 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) }
.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"
2018-11-08 19:23:39 +05:30
.form-group.row
= form.label :label_ids, "Labels", class: "col-form-label #{has_due_date ? "col-md-2 col-lg-4" : "col-sm-2"}"
2017-08-17 22:00:37 +05:30
= form.hidden_field :label_ids, multiple: true, value: ''
2019-02-15 15:39:39 +05:30
.col-sm-10{ class: "#{"col-md-8" if has_due_date}" }
2017-08-17 22:00:37 +05:30
.issuable-form-select-holder
2018-11-08 19:23:39 +05:30
= 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"
2019-10-12 21:52:04 +05:30
= render_if_exists "shared/issuable/form/merge_request_blocks", issuable: issuable, form: form
2018-11-08 19:23:39 +05:30
2020-11-24 15:15:51 +05:30
- if has_due_date
2017-08-17 22:00:37 +05:30
.col-lg-6
2020-06-23 00:09:42 +05:30
= render_if_exists "shared/issuable/form/weight", issuable: issuable, form: form
2018-11-08 19:23:39 +05:30
.form-group.row
= form.label :due_date, "Due date", class: "col-form-label col-md-2 col-lg-4"
.col-8
2017-08-17 22:00:37 +05:30
.issuable-form-select-holder
2018-12-05 23:21:45 +05:30
= form.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: "Select due date", autocomplete: 'off'