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