gitlab-org--gitlab-foss/app/views/shared/issuable/_form.html.haml

111 lines
4.6 KiB
Plaintext
Raw Normal View History

- if issuable.errors.any?
.row
.col-sm-offset-2.col-sm-10
.alert.alert-danger
- issuable.errors.full_messages.each do |msg|
%span= msg
%br
2014-09-03 11:15:03 +00:00
.form-group
= f.label :title, class: 'control-label' do
%strong= 'Title *'
.col-sm-10
= f.text_field :title, maxlength: 255, autofocus: true, autocomplete: 'off',
class: 'form-control pad js-gfm-input js-quick-submit', required: true
- if issuable.is_a?(MergeRequest)
%p.help-block
- if issuable.work_in_progress?
Remove the <code>WIP</code> prefix from the title to allow this
Merge branch 'mr-widget-text' into 'master' Improve text of MR merge widget and manual merge modal Modal with manual merge instructions: ![Screen_Shot_2015-08-08_at_21.30.23](https://gitlab.com/gitlab-org/gitlab-ce/uploads/2bffe42e9ad76afd02efbe5816027767/Screen_Shot_2015-08-08_at_21.30.23.png) Archived: ![archived](https://gitlab.com/gitlab-org/gitlab-ce/uploads/e1efa1d54ce7ead8de6e88ca34095c09/archived.png) WIP: ![wip](https://gitlab.com/gitlab-org/gitlab-ce/uploads/14a831458d0946722559ec643f91678c/wip.png) Missing target branch: ![missing_branch](https://gitlab.com/gitlab-org/gitlab-ce/uploads/340083bbacbc234906e58cf76c586a9e/missing_branch.png) Missing source branch: ![missing_branch_source](https://gitlab.com/gitlab-org/gitlab-ce/uploads/72f80ed58efed88b2bbcf403b55b1a01/missing_branch_source.png) Nothing to merge: ![nothing](https://gitlab.com/gitlab-org/gitlab-ce/uploads/85b0d9da87acacd53cffd0df58d8eed4/nothing.png) Checking ability to merge: ![check](https://gitlab.com/gitlab-org/gitlab-ce/uploads/32d75322e622025610c446e8ca7d892d/check.png) Conflicts when allowed to merge: ![conflicts](https://gitlab.com/gitlab-org/gitlab-ce/uploads/23fdb2c60a27d873b3cc8a008203eb59/conflicts.png) Conflicts when not allowed to merge: ![conflicts_not_allowed](https://gitlab.com/gitlab-org/gitlab-ce/uploads/113462a80fc65bf48b20dc0efd808363/conflicts_not_allowed.png) Mergeable when allowed to merge: ![accept](https://gitlab.com/gitlab-org/gitlab-ce/uploads/1b3bb1a71df21728fe9318e7a083bfba/accept.png) Mergeable when not allowed to merge: ![not_allowed](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d38fa5c96f8f9d7223bb6bc7ad36f29d/not_allowed.png) Merge in progress: ![locked](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b60dcf5eb70e6032b0e8aac766018df3/locked.png) Merge failed: ![failed_2](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3713b9a10298183935b028b658271ac9/failed_2.png) Merged: ![merged](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7f68a48dd197a71351c9a80c59c8ecbe/merged.png) Closed: ![closed](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d5ce040449b7db943bd2fbfffb607a10/closed.png) cc @dzaporozhets @rspeicher See merge request !1120
2015-08-10 12:13:26 +00:00
<strong>Work In Progress</strong> merge request to be merged when it's ready.
- else
Start the title with <code>[WIP]</code> or <code>WIP:</code> to prevent a
Merge branch 'mr-widget-text' into 'master' Improve text of MR merge widget and manual merge modal Modal with manual merge instructions: ![Screen_Shot_2015-08-08_at_21.30.23](https://gitlab.com/gitlab-org/gitlab-ce/uploads/2bffe42e9ad76afd02efbe5816027767/Screen_Shot_2015-08-08_at_21.30.23.png) Archived: ![archived](https://gitlab.com/gitlab-org/gitlab-ce/uploads/e1efa1d54ce7ead8de6e88ca34095c09/archived.png) WIP: ![wip](https://gitlab.com/gitlab-org/gitlab-ce/uploads/14a831458d0946722559ec643f91678c/wip.png) Missing target branch: ![missing_branch](https://gitlab.com/gitlab-org/gitlab-ce/uploads/340083bbacbc234906e58cf76c586a9e/missing_branch.png) Missing source branch: ![missing_branch_source](https://gitlab.com/gitlab-org/gitlab-ce/uploads/72f80ed58efed88b2bbcf403b55b1a01/missing_branch_source.png) Nothing to merge: ![nothing](https://gitlab.com/gitlab-org/gitlab-ce/uploads/85b0d9da87acacd53cffd0df58d8eed4/nothing.png) Checking ability to merge: ![check](https://gitlab.com/gitlab-org/gitlab-ce/uploads/32d75322e622025610c446e8ca7d892d/check.png) Conflicts when allowed to merge: ![conflicts](https://gitlab.com/gitlab-org/gitlab-ce/uploads/23fdb2c60a27d873b3cc8a008203eb59/conflicts.png) Conflicts when not allowed to merge: ![conflicts_not_allowed](https://gitlab.com/gitlab-org/gitlab-ce/uploads/113462a80fc65bf48b20dc0efd808363/conflicts_not_allowed.png) Mergeable when allowed to merge: ![accept](https://gitlab.com/gitlab-org/gitlab-ce/uploads/1b3bb1a71df21728fe9318e7a083bfba/accept.png) Mergeable when not allowed to merge: ![not_allowed](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d38fa5c96f8f9d7223bb6bc7ad36f29d/not_allowed.png) Merge in progress: ![locked](https://gitlab.com/gitlab-org/gitlab-ce/uploads/b60dcf5eb70e6032b0e8aac766018df3/locked.png) Merge failed: ![failed_2](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3713b9a10298183935b028b658271ac9/failed_2.png) Merged: ![merged](https://gitlab.com/gitlab-org/gitlab-ce/uploads/7f68a48dd197a71351c9a80c59c8ecbe/merged.png) Closed: ![closed](https://gitlab.com/gitlab-org/gitlab-ce/uploads/d5ce040449b7db943bd2fbfffb607a10/closed.png) cc @dzaporozhets @rspeicher See merge request !1120
2015-08-10 12:13:26 +00:00
<strong>Work In Progress</strong> merge request from being merged before it's ready.
.form-group.issuable-description
2014-09-03 11:15:03 +00:00
= f.label :description, 'Description', class: 'control-label'
.col-sm-10
= render layout: 'projects/md_preview', locals: { preview_class: "md-preview", referenced_users: true } do
= render 'projects/zen', f: f, attr: :description,
classes: 'description form-control js-quick-submit'
= render 'projects/notes/hints'
.clearfix
.error-alert
%hr
- if can?(current_user, :"admin_#{issuable.to_ability_name}", issuable.project)
.form-group
.issue-assignee
= f.label :assignee_id, class: 'control-label' do
%i.fa.fa-user
Assign to
.col-sm-10
= users_select_tag("#{issuable.class.model_name.param_key}[assignee_id]",
placeholder: 'Select a user', class: 'custom-form-control', null_user: true,
selected: issuable.assignee_id, project: @target_project || @project,
first_user: true, current_user: true)
&nbsp;
= link_to 'Assign to me', '#', class: 'btn assign-to-me-link'
.form-group
.issue-milestone
= f.label :milestone_id, class: 'control-label' do
%i.fa.fa-clock-o
Milestone
.col-sm-10
- if milestone_options(issuable).present?
= f.select(:milestone_id, milestone_options(issuable),
{ include_blank: 'Select milestone' }, { class: 'select2' })
- else
.prepend-top-10
%span.light No open milestones available.
&nbsp;
- 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
= f.label :label_ids, class: 'control-label' do
%i.fa.fa-tag
Labels
.col-sm-10
- if issuable.project.labels.any?
= f.collection_select :label_ids, issuable.project.labels.all, :id, :name,
{ selected: issuable.label_ids }, multiple: true, class: 'select2'
- else
.prepend-top-10
%span.light No labels yet.
&nbsp;
- 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
- if issuable.is_a?(MergeRequest)
%hr
- if @merge_request.new_record?
.form-group
= f.label :source_branch, class: 'control-label' do
%i.fa.fa-code-fork
Source Branch
.col-sm-10
= f.select(:source_branch, [@merge_request.source_branch], { }, { class: 'source_branch select2 span2', disabled: true })
.form-group
= f.label :target_branch, class: 'control-label' do
%i.fa.fa-code-fork
Target Branch
.col-sm-10
= f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, { class: 'target_branch select2 span2', disabled: @merge_request.new_record? })
- if @merge_request.new_record?
%p.help-block
= link_to 'Change branches', mr_change_branches_path(@merge_request)
.form-actions
2015-07-30 13:31:34 +00:00
- if !issuable.project.empty_repo? && (guide_url = contribution_guide_path(issuable.project)) && !issuable.persisted?
%p
Please review the
%strong #{link_to 'guidelines for contribution', guide_url}
to this repository.
- if issuable.new_record?
= f.submit "Submit new #{issuable.class.model_name.human.downcase}", class: 'btn btn-create'
- else
= f.submit 'Save changes', class: 'btn btn-save'
- if issuable.new_record?
- cancel_project = issuable.source_project
- else
- cancel_project = issuable.project
= link_to 'Cancel', [cancel_project.namespace.becomes(Namespace), cancel_project, issuable], class: 'btn btn-cancel'