2016-11-14 12:19:46 +00:00
|
|
|
- form = local_assigns.fetch(:f)
|
2016-12-22 18:45:36 +00:00
|
|
|
- commits = local_assigns[:commits]
|
2016-07-19 09:05:38 +00:00
|
|
|
- project = @target_project || @project
|
2018-09-07 12:29:19 +00:00
|
|
|
- presenter = local_assigns.fetch(:presenter, nil)
|
2016-11-02 17:52:04 +00:00
|
|
|
|
2016-04-05 01:25:38 +00:00
|
|
|
= form_errors(issuable)
|
|
|
|
|
2016-08-01 15:34:17 +00:00
|
|
|
- if @conflict
|
2020-09-07 15:09:04 +00:00
|
|
|
.gl-alert.gl-alert-danger.gl-mb-5
|
2016-08-01 15:34:17 +00:00
|
|
|
Someone edited the #{issuable.class.model_name.human.downcase} the same time you did.
|
|
|
|
Please check out
|
2020-07-27 12:09:50 +00:00
|
|
|
= link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project, issuable]), target: "_blank", rel: 'noopener noreferrer'
|
2016-08-01 15:34:17 +00:00
|
|
|
and make sure your changes will not unintentionally remove theirs
|
|
|
|
|
2019-10-31 12:06:26 +00:00
|
|
|
= render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form
|
|
|
|
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2018-04-13 19:24:01 +00:00
|
|
|
= form.label :title, class: 'col-form-label col-sm-2'
|
2016-06-24 19:43:46 +00:00
|
|
|
|
2016-12-22 18:45:36 +00:00
|
|
|
= render 'shared/issuable/form/title', issuable: issuable, form: form, has_wip_commits: commits && commits.detect(&:work_in_progress?)
|
2019-07-09 12:45:23 +00:00
|
|
|
#js-suggestions{ data: { project_path: @project.full_path } }
|
2016-06-24 19:43:46 +00:00
|
|
|
|
2020-09-10 15:09:10 +00:00
|
|
|
= render 'shared/issuable/form/type_selector', issuable: issuable, form: form
|
2020-09-04 12:08:27 +00:00
|
|
|
|
2017-05-03 15:26:49 +00:00
|
|
|
= render 'shared/form_elements/description', model: issuable, form: form, project: project
|
2014-10-15 07:21:21 +00:00
|
|
|
|
2016-11-15 17:28:14 +00:00
|
|
|
- if issuable.respond_to?(:confidential)
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2018-04-13 17:49:32 +00:00
|
|
|
.offset-sm-2.col-sm-10
|
2018-04-11 18:05:57 +00:00
|
|
|
.form-check
|
2018-05-31 19:20:46 +00:00
|
|
|
= form.check_box :confidential, class: 'form-check-input'
|
|
|
|
= form.label :confidential, class: 'form-check-label' do
|
2016-06-06 19:13:31 +00:00
|
|
|
This issue is confidential and should only be visible to team members with at least Reporter access.
|
2016-03-17 19:16:48 +00:00
|
|
|
|
2020-12-01 15:09:28 +00:00
|
|
|
= render 'shared/issuable/form/metadata', issuable: issuable, form: form, project: project, presenter: presenter
|
2014-10-02 09:55:02 +00:00
|
|
|
|
2018-09-07 12:29:19 +00:00
|
|
|
= render_if_exists 'shared/issuable/approvals', issuable: issuable, presenter: presenter, form: form
|
2018-05-23 15:05:57 +00:00
|
|
|
|
2020-07-06 06:09:59 +00:00
|
|
|
= render 'shared/issuable/form/merge_params', issuable: issuable, project: project
|
2017-02-01 14:28:04 +00:00
|
|
|
|
2018-02-23 17:30:37 +00:00
|
|
|
= render 'shared/issuable/form/contribution', issuable: issuable, form: form
|
|
|
|
|
2017-03-10 08:19:12 +00:00
|
|
|
- if @merge_request_to_resolve_discussions_of
|
2018-04-12 20:11:22 +00:00
|
|
|
.form-group.row
|
2018-04-13 17:49:32 +00:00
|
|
|
.col-sm-10.offset-sm-2
|
2020-09-09 15:08:47 +00:00
|
|
|
= sprite_icon('information-o')
|
2017-03-10 08:19:12 +00:00
|
|
|
- if @merge_request_to_resolve_discussions_of.discussions_can_be_resolved_by?(current_user)
|
|
|
|
= hidden_field_tag 'merge_request_to_resolve_discussions_of', @merge_request_to_resolve_discussions_of.iid
|
2017-02-27 09:23:36 +00:00
|
|
|
- if @discussion_to_resolve
|
|
|
|
= hidden_field_tag 'discussion_to_resolve', @discussion_to_resolve.id
|
2019-06-14 09:04:01 +00:00
|
|
|
Creating this issue will resolve the thread in
|
2017-02-27 09:23:36 +00:00
|
|
|
- else
|
2019-06-14 09:04:01 +00:00
|
|
|
Creating this issue will resolve all threads in
|
2017-03-10 08:19:12 +00:00
|
|
|
= link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve)
|
2016-10-26 21:21:50 +00:00
|
|
|
- else
|
2017-03-09 12:48:07 +00:00
|
|
|
The
|
2019-06-14 09:04:01 +00:00
|
|
|
= @discussion_to_resolve ? 'thread' : 'threads'
|
2017-03-09 12:48:07 +00:00
|
|
|
at
|
2017-03-10 08:19:12 +00:00
|
|
|
= link_to_discussions_to_resolve(@merge_request_to_resolve_discussions_of, @discussion_to_resolve)
|
2017-03-09 12:48:07 +00:00
|
|
|
will stay unresolved. Ask someone with permission to resolve
|
|
|
|
= @discussion_to_resolve ? 'it.' : 'them.'
|
2016-10-26 21:21:50 +00:00
|
|
|
|
2015-12-02 13:48:06 +00:00
|
|
|
- is_footer = !(issuable.is_a?(MergeRequest) && issuable.new_record?)
|
2016-12-26 10:47:16 +00:00
|
|
|
.row-content-block{ class: (is_footer ? "footer-block" : "middle-block") }
|
2018-02-20 14:56:36 +00:00
|
|
|
- if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = issuable.project.present.contribution_guide_path)
|
2021-03-30 06:09:35 +00:00
|
|
|
.gl-mb-5
|
2015-12-02 13:21:03 +00:00
|
|
|
Please review the
|
2017-01-13 16:07:21 +00:00
|
|
|
%strong= link_to('contribution guidelines', guide_url)
|
2015-12-02 13:21:03 +00:00
|
|
|
for this project.
|
|
|
|
|
2021-03-30 06:09:35 +00:00
|
|
|
- if issuable.new_record?
|
|
|
|
= form.submit "Create #{issuable.class.model_name.human.downcase}", class: 'gl-button btn btn-confirm gl-mr-2', data: { qa_selector: 'issuable_create_button' }
|
|
|
|
- else
|
|
|
|
= form.submit 'Save changes', class: 'gl-button btn btn-confirm gl-mr-2'
|
|
|
|
|
|
|
|
- if issuable.new_record?
|
|
|
|
= link_to _('Cancel'), polymorphic_path([@project, issuable.class]), class: 'btn gl-button btn-default'
|
|
|
|
- else
|
|
|
|
= link_to _('Cancel'), polymorphic_path([@project, issuable]), class: 'gl-button btn btn-default'
|
|
|
|
- if can?(current_user, :"destroy_#{issuable.to_ability_name}", @project)
|
|
|
|
= link_to 'Delete', polymorphic_path([@project, issuable], params: { destroy_confirm: true }), data: { confirm: _('%{issuableType} will be removed! Are you sure?') % { issuableType: issuable.human_class_name } }, method: :delete, class: 'btn gl-button btn-danger btn-danger-secondary gl-float-right'
|
|
|
|
|
2018-05-23 15:05:57 +00:00
|
|
|
= render_if_exists 'shared/issuable/remove_approver'
|
2016-08-01 15:34:17 +00:00
|
|
|
|
2020-08-17 12:10:12 +00:00
|
|
|
- if issuable.respond_to?(:issue_type)
|
|
|
|
= form.hidden_field :issue_type
|
|
|
|
|
2016-11-14 12:19:46 +00:00
|
|
|
= form.hidden_field :lock_version
|
2020-12-01 12:09:17 +00:00
|
|
|
|
|
|
|
- if @vulnerability_id
|
|
|
|
= hidden_field_tag 'vulnerability_id', @vulnerability_id
|