2011-11-25 23:40:12 +02:00
|
|
|
%div.issue-form-holder
|
2012-08-17 09:26:59 +03:00
|
|
|
%h3.page_title= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
|
2012-08-10 18:07:50 -04:00
|
|
|
= form_for [@project, @issue], remote: request.xhr? do |f|
|
2012-01-18 00:46:13 +02:00
|
|
|
-if @issue.errors.any?
|
2012-01-28 01:49:14 +02:00
|
|
|
.alert-message.block-message.error
|
|
|
|
%ul
|
|
|
|
- @issue.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
2012-04-17 00:22:59 +03:00
|
|
|
.issue_form_box
|
|
|
|
.issue_title
|
|
|
|
.clearfix
|
2012-08-17 09:26:59 +03:00
|
|
|
= f.label :title do
|
2012-06-27 21:30:35 +03:00
|
|
|
%strong= "Subject *"
|
2012-04-17 00:22:59 +03:00
|
|
|
.input
|
2012-10-27 11:24:11 +03:00
|
|
|
= f.text_field :title, maxlength: 255, class: "xxlarge js-gfm-input", autofocus: true
|
2012-04-17 00:22:59 +03:00
|
|
|
.issue_middle_block
|
|
|
|
.issue_assignee
|
2012-08-17 09:26:59 +03:00
|
|
|
= f.label :assignee_id do
|
2012-06-27 21:30:35 +03:00
|
|
|
%i.icon-user
|
|
|
|
Assign to
|
2012-09-10 02:09:55 -04:00
|
|
|
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { include_blank: "Select a user" }, {class: 'chosen'})
|
2012-04-17 00:22:59 +03:00
|
|
|
.issue_milestone
|
2012-08-17 09:26:59 +03:00
|
|
|
= f.label :milestone_id do
|
2012-06-27 21:30:35 +03:00
|
|
|
%i.icon-time
|
|
|
|
Milestone
|
2012-09-10 02:09:55 -04:00
|
|
|
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { include_blank: "Select milestone" }, {class: 'chosen'})
|
2012-04-17 00:22:59 +03:00
|
|
|
|
|
|
|
.issue_description
|
|
|
|
.clearfix
|
2012-08-17 09:26:59 +03:00
|
|
|
= f.label :label_list do
|
|
|
|
%i.icon-tag
|
2012-06-27 21:30:35 +03:00
|
|
|
Labels
|
|
|
|
.input
|
2012-08-10 18:07:50 -04:00
|
|
|
= f.text_field :label_list, maxlength: 2000, class: "xxlarge"
|
2012-06-27 21:30:35 +03:00
|
|
|
%p.hint Separate with comma.
|
2012-06-04 01:37:27 +03:00
|
|
|
|
2012-04-17 00:22:59 +03:00
|
|
|
.clearfix
|
2012-06-27 21:30:35 +03:00
|
|
|
= f.label :description, "Details"
|
2012-04-17 00:22:59 +03:00
|
|
|
.input
|
2012-10-11 23:19:34 -07:00
|
|
|
= f.text_area :description, maxlength: 2000, class: "xxlarge js-gfm-input", rows: 14
|
2012-09-06 10:50:47 +03:00
|
|
|
%p.hint Issues are parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}.
|
2011-11-25 23:40:12 +02:00
|
|
|
|
2012-06-27 21:20:35 +03:00
|
|
|
|
2012-01-29 12:04:09 +02:00
|
|
|
.actions
|
2012-03-17 13:02:48 -03:00
|
|
|
- if @issue.new_record?
|
2012-08-29 22:29:50 +03:00
|
|
|
= f.submit 'Submit new issue', class: "btn save-btn"
|
2012-03-17 13:02:48 -03:00
|
|
|
-else
|
2012-08-29 22:29:50 +03:00
|
|
|
= f.submit 'Save changes', class: "save-btn btn"
|
2012-01-28 01:49:14 +02:00
|
|
|
|
2012-08-29 22:29:50 +03:00
|
|
|
- cancel_class = 'btn cancel-btn'
|
2012-01-28 01:49:14 +02:00
|
|
|
- if request.xhr?
|
2012-08-29 22:29:50 +03:00
|
|
|
= link_to "Cancel", "#back", onclick: "backToIssues();", class: cancel_class
|
2012-06-04 01:37:27 +03:00
|
|
|
- else
|
2012-01-28 01:49:14 +02:00
|
|
|
- if @issue.new_record?
|
2012-08-29 22:29:50 +03:00
|
|
|
= link_to "Cancel", project_issues_path(@project), class: cancel_class
|
2012-06-04 01:37:27 +03:00
|
|
|
- else
|
2012-08-29 22:29:50 +03:00
|
|
|
= link_to "Cancel", project_issue_path(@project, @issue), class: cancel_class
|