2014-09-20 12:02:01 -04:00
|
|
|
- if issuable.errors.any?
|
|
|
|
.row
|
2015-06-15 18:48:54 -04:00
|
|
|
.col-sm-offset-2.col-sm-10
|
2014-09-20 12:02:01 -04:00
|
|
|
.alert.alert-danger
|
|
|
|
- issuable.errors.full_messages.each do |msg|
|
|
|
|
%span= msg
|
|
|
|
%br
|
2014-09-03 07:15:03 -04:00
|
|
|
.form-group
|
2015-12-02 08:35:19 -05:00
|
|
|
= f.label :title, class: 'control-label'
|
2014-09-03 07:15:03 -04:00
|
|
|
.col-sm-10
|
2015-09-09 18:04:38 -04:00
|
|
|
= f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off',
|
2015-10-05 18:20:43 -04:00
|
|
|
class: 'form-control pad js-gfm-input js-quick-submit', required: true
|
2015-05-15 07:50:04 -04:00
|
|
|
|
|
|
|
- if issuable.is_a?(MergeRequest)
|
2015-05-20 08:00:45 -04:00
|
|
|
%p.help-block
|
2016-02-26 22:34:32 -05:00
|
|
|
.js-wip-explanation
|
|
|
|
%a{href: "#", class: "js-remove-wip", data: { }}
|
|
|
|
Remove the <code>WIP</code> prefix from the title
|
|
|
|
to allow this
|
2015-08-10 08:13:26 -04:00
|
|
|
<strong>Work In Progress</strong> merge request to be merged when it's ready.
|
2016-02-26 22:34:32 -05:00
|
|
|
.js-no-wip-explanation
|
|
|
|
%a{href: "#", class: "js-add-wip"}
|
|
|
|
Start the title with <code>[WIP]</code> or <code>WIP:</code>
|
|
|
|
to prevent a
|
2015-08-10 08:13:26 -04:00
|
|
|
<strong>Work In Progress</strong> merge request from being merged before it's ready.
|
2015-12-16 10:13:22 -05:00
|
|
|
.form-group.detail-page-description
|
2014-09-03 07:15:03 -04:00
|
|
|
= f.label :description, 'Description', class: 'control-label'
|
|
|
|
.col-sm-10
|
2014-10-15 03:21:21 -04:00
|
|
|
|
2015-09-21 17:08:26 -04:00
|
|
|
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
|
2014-10-15 03:21:21 -04:00
|
|
|
= render 'projects/zen', f: f, attr: :description,
|
2015-10-05 18:20:43 -04:00
|
|
|
classes: 'description form-control js-quick-submit'
|
2015-11-07 14:22:16 -05:00
|
|
|
= render 'projects/notes/hints'
|
2014-10-15 03:21:21 -04:00
|
|
|
.clearfix
|
|
|
|
.error-alert
|
2015-08-20 21:32:32 -04:00
|
|
|
- if can?(current_user, :"admin_#{issuable.to_ability_name}", issuable.project)
|
2015-12-02 08:30:12 -05:00
|
|
|
%hr
|
2015-06-25 09:38:04 -04:00
|
|
|
.form-group
|
|
|
|
.issue-assignee
|
2015-12-02 08:30:12 -05:00
|
|
|
= f.label :assignee_id, "Assignee", class: 'control-label'
|
2015-06-25 09:38:04 -04:00
|
|
|
.col-sm-10
|
|
|
|
= users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]",
|
2015-12-02 08:24:29 -05:00
|
|
|
placeholder: 'Select assignee', class: 'custom-form-control', null_user: true,
|
2015-08-21 00:33:00 -04:00
|
|
|
selected: issuable.assignee_id, project: @target_project || @project,
|
2015-12-02 08:24:29 -05:00
|
|
|
first_user: true, current_user: true, include_blank: true)
|
2015-06-25 09:38:04 -04:00
|
|
|
|
|
|
|
= link_to 'Assign to me', '#', class: 'btn assign-to-me-link'
|
|
|
|
.form-group
|
|
|
|
.issue-milestone
|
2015-12-02 08:30:12 -05:00
|
|
|
= f.label :milestone_id, "Milestone", class: 'control-label'
|
2015-06-25 09:38:04 -04:00
|
|
|
.col-sm-10
|
|
|
|
- if milestone_options(issuable).present?
|
|
|
|
= f.select(:milestone_id, milestone_options(issuable),
|
2015-12-02 08:24:29 -05:00
|
|
|
{ include_blank: true }, { class: 'select2', data: { placeholder: 'Select milestone' } })
|
2015-06-25 09:38:04 -04:00
|
|
|
- else
|
|
|
|
.prepend-top-10
|
|
|
|
%span.light No open milestones available.
|
|
|
|
|
|
|
|
- if can? current_user, :admin_milestone, issuable.project
|
|
|
|
= link_to 'Create new milestone', new_namespace_project_milestone_path(issuable.project.namespace, issuable.project), target: :blank
|
|
|
|
.form-group
|
2015-12-02 08:30:12 -05:00
|
|
|
= f.label :label_ids, "Labels", class: 'control-label'
|
2014-10-02 05:49:31 -04:00
|
|
|
.col-sm-10
|
2015-06-25 09:38:04 -04:00
|
|
|
- if issuable.project.labels.any?
|
|
|
|
= f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
|
2015-12-02 08:24:29 -05:00
|
|
|
{ selected: issuable.label_ids }, multiple: true, class: 'select2', data: { placeholder: "Select labels" }
|
2014-10-02 05:49:31 -04:00
|
|
|
- else
|
2015-03-07 04:06:16 -05:00
|
|
|
.prepend-top-10
|
2015-06-25 09:38:04 -04:00
|
|
|
%span.light No labels yet.
|
2014-10-02 05:49:31 -04:00
|
|
|
|
2015-06-25 09:38:04 -04:00
|
|
|
- if can? current_user, :admin_label, issuable.project
|
|
|
|
= link_to 'Create new label', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank
|
2014-10-02 05:55:02 -04:00
|
|
|
|
2015-05-28 21:00:37 -04:00
|
|
|
- if issuable.is_a?(MergeRequest)
|
|
|
|
%hr
|
2015-06-19 00:55:44 -04:00
|
|
|
- if @merge_request.new_record?
|
2015-05-28 21:00:37 -04:00
|
|
|
.form-group
|
2015-12-02 08:30:12 -05:00
|
|
|
= f.label :source_branch, class: 'control-label'
|
2015-05-28 21:00:37 -04:00
|
|
|
.col-sm-10
|
|
|
|
= f.select(:source_branch, [@merge_request.source_branch], { }, { class: 'source_branch select2 span2', disabled: true })
|
|
|
|
.form-group
|
2015-12-02 08:30:12 -05:00
|
|
|
= f.label :target_branch, class: 'control-label'
|
2015-05-28 21:00:37 -04:00
|
|
|
.col-sm-10
|
2015-12-02 08:24:29 -05:00
|
|
|
= f.select(:target_branch, @merge_request.target_branches, { include_blank: true }, { class: 'target_branch select2 span2', disabled: @merge_request.new_record?, data: {placeholder: "Select branch"} })
|
2015-06-19 00:55:44 -04:00
|
|
|
- if @merge_request.new_record?
|
|
|
|
%p.help-block
|
|
|
|
= link_to 'Change branches', mr_change_branches_path(@merge_request)
|
2015-05-28 21:00:37 -04:00
|
|
|
|
2015-12-02 08:48:06 -05:00
|
|
|
- is_footer = !(issuable.is_a?(MergeRequest) && issuable.new_record?)
|
|
|
|
.gray-content-block{class: (is_footer ? "footer-block" : "middle-block")}
|
2014-09-20 10:06:35 -04:00
|
|
|
- if issuable.new_record?
|
2015-12-02 08:33:14 -05:00
|
|
|
= f.submit "Submit #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
|
2014-09-20 10:06:35 -04:00
|
|
|
- else
|
|
|
|
= f.submit 'Save changes', class: 'btn btn-save'
|
2015-12-02 08:21:03 -05:00
|
|
|
|
|
|
|
- if !issuable.persisted? && !issuable.project.empty_repo? && (guide_url = contribution_guide_path(issuable.project))
|
|
|
|
.inline.prepend-left-10
|
|
|
|
Please review the
|
|
|
|
%strong #{link_to 'contribution guidelines', guide_url}
|
|
|
|
for this project.
|
|
|
|
|
2014-09-20 10:06:35 -04:00
|
|
|
- if issuable.new_record?
|
|
|
|
- cancel_project = issuable.source_project
|
|
|
|
- else
|
|
|
|
- cancel_project = issuable.project
|
2015-01-24 13:02:58 -05:00
|
|
|
= link_to 'Cancel', [cancel_project.namespace.becomes(Namespace), cancel_project, issuable], class: 'btn btn-cancel'
|