gitlabhq/app/views/issues/_form.html.haml

58 lines
2.1 KiB
Text
Raw Normal View History

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