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
- has_due_date = issuable.has_attribute?(:due_date)
- form = local_assigns.fetch(:form)
2022-05-07 20:08:51 +05:30
- if @add_related_issue
2022-07-23 23:45:48 +05:30
.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 }
2022-05-07 20:08:51 +05:30
2021-11-11 11:23:49 +05:30
- if issuable.respond_to?(:confidential) && can?(current_user, :set_confidentiality, issuable)
2022-07-23 23:45:48 +05:30
.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.')
2021-09-04 01:27:46 +05:30
2021-11-11 11:23:49 +05:30
- if can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable)
2022-07-23 23:45:48 +05:30
.row.gl-pt-4
2021-11-11 11:23:49 +05:30
%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
2020-11-24 15:15:51 +05:30
2021-11-11 11:23:49 +05:30
- if issuable.allows_reviewers?
.form-group.row.merge-request-reviewer
= 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
2021-11-11 11:23:49 +05:30
= render_if_exists "shared/issuable/form/epic", issuable: issuable, form: form, project: project
2018-11-08 19:23:39 +05:30
2021-11-11 11:23:49 +05:30
- if issuable.supports_milestone?
.form-group.row.issue-milestone
2022-07-23 23:45:48 +05:30
= form.label :milestone_id, _('Milestone'), class: "col-12"
.col-12
2021-11-11 11:23:49 +05:30
.issuable-form-select-holder
2023-01-13 00:05:48 +05:30
= render "shared/issuable/milestone_dropdown", selected: issuable.milestone, name: "#{issuable.class.model_name.param_key}[milestone_id]"
2018-11-08 19:23:39 +05:30
2023-07-09 08:55:56 +05:30
- if Feature.enabled?(:visible_label_selection_on_metadata, project)
.js-issuable-form-label-selector{ data: issuable_label_selector_data(project, issuable) }
- else
.form-group.row
= form.label :label_ids, _('Labels'), class: "col-12"
= form.hidden_field :label_ids, multiple: true, value: ''
.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"
2021-11-11 11:23:49 +05:30
= render_if_exists "shared/issuable/form/merge_request_blocks", issuable: issuable, form: form
- if has_due_date
.col-lg-6
= render_if_exists "shared/issuable/form/weight", issuable: issuable, form: form
.form-group.row
2022-07-23 23:45:48 +05:30
= form.label :due_date, _('Due date'), class: "col-12"
.col-12
2021-11-11 11:23:49 +05:30
.issuable-form-select-holder
2022-08-27 11:52:29 +05:30
= form.gitlab_ui_datepicker :due_date, placeholder: _('Select due date'), autocomplete: 'off', id: "issuable-due-date"
2023-01-13 00:05:48 +05:30
= render_if_exists "shared/issuable/form/iteration", form: form, group: project.group