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