Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_metadata.html.haml « form « issuable « shared « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9e42c528a1147ad278200c9f3998d0744b297dce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
- project = local_assigns.fetch(:project)
- issuable = local_assigns.fetch(:issuable)
- presenter = local_assigns.fetch(:presenter)
- has_due_date = issuable.has_attribute?(:due_date)
- form = local_assigns.fetch(:form)

- if issuable.respond_to?(:confidential) && can?(current_user, :set_confidentiality, issuable)
  .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.')}

- if can?(current_user, :"set_#{issuable.to_ability_name}_metadata", issuable)
  %hr
  .row
    %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

      - 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

      = render_if_exists "shared/issuable/form/epic", issuable: issuable, form: form, project: project

      - 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')

      .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.hidden_field :label_ids, multiple: true, value: ''
        .col-sm-10{ class: "#{"col-md-8" if has_due_date}" }
          .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"

      = 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
          = form.label :due_date, _('Due date'), class: "col-form-label col-md-2 col-lg-4"
          .col-8
            .issuable-form-select-holder
              = form.text_field :due_date, id: "issuable-due-date", class: "datepicker form-control", placeholder: _('Select due date'), autocomplete: 'off'