2011-11-25 16:40:12 -05:00
|
|
|
%div.issue-form-holder
|
2012-04-16 17:22:59 -04:00
|
|
|
%h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
|
2011-12-14 01:58:35 -05:00
|
|
|
= form_for [@project, @issue], :remote => request.xhr? do |f|
|
2012-01-17 17:46:13 -05:00
|
|
|
-if @issue.errors.any?
|
2012-01-27 18:49:14 -05:00
|
|
|
.alert-message.block-message.error
|
|
|
|
%ul
|
|
|
|
- @issue.errors.full_messages.each do |msg|
|
|
|
|
%li= msg
|
2012-04-16 17:22:59 -04:00
|
|
|
.issue_form_box
|
|
|
|
.issue_title
|
|
|
|
.clearfix
|
|
|
|
= f.label :title, "Issue Subject *"
|
|
|
|
.input
|
|
|
|
= f.text_field :title, :maxlength => 255, :class => "xxlarge"
|
|
|
|
.issue_middle_block
|
|
|
|
.issue_assignee
|
2012-06-26 14:47:25 -04:00
|
|
|
= f.label :assignee_id, "Assign to"
|
2012-04-16 17:22:59 -04:00
|
|
|
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Assign to user" })
|
|
|
|
.issue_milestone
|
|
|
|
= f.label :milestone_id
|
|
|
|
.input= f.select(:milestone_id, @project.milestones.active.all.collect {|p| [ p.title, p.id ] }, { :include_blank => "Select milestone" })
|
|
|
|
|
|
|
|
.issue_description
|
|
|
|
.clearfix
|
|
|
|
= f.label :critical, "Critical"
|
|
|
|
.input= f.check_box :critical
|
2012-06-03 18:37:27 -04:00
|
|
|
|
2012-04-16 17:22:59 -04:00
|
|
|
- unless @issue.new_record?
|
|
|
|
.clearfix
|
|
|
|
= f.label :closed
|
|
|
|
.input= f.check_box :closed
|
|
|
|
.clearfix
|
|
|
|
= f.label :description, "Issue Details"
|
|
|
|
.input
|
|
|
|
= f.text_area :description, :maxlength => 2000, :class => "xxlarge", :rows => 14
|
|
|
|
%p.hint Markdown is enabled.
|
2011-11-25 16:40:12 -05:00
|
|
|
|
2012-06-27 14:20:35 -04:00
|
|
|
.clearfix
|
|
|
|
= f.label :label_list, "Labels"
|
|
|
|
.input
|
|
|
|
= f.text_field :label_list, :maxlength => 2000, :class => "xxlarge"
|
|
|
|
%p.hint Separate with comma.
|
|
|
|
|
2012-01-29 05:04:09 -05:00
|
|
|
.actions
|
2012-03-17 12:02:48 -04:00
|
|
|
- if @issue.new_record?
|
|
|
|
= f.submit 'Submit new issue', :class => "primary btn"
|
|
|
|
-else
|
|
|
|
= f.submit 'Save changes', :class => "primary btn"
|
2012-01-27 18:49:14 -05:00
|
|
|
|
|
|
|
- if request.xhr?
|
2012-06-03 18:37:27 -04:00
|
|
|
= link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn"
|
|
|
|
- else
|
2012-01-27 18:49:14 -05:00
|
|
|
- if @issue.new_record?
|
|
|
|
= link_to "Cancel", project_issues_path(@project), :class => "btn"
|
2012-06-03 18:37:27 -04:00
|
|
|
- else
|
2012-01-27 18:49:14 -05:00
|
|
|
= link_to "Cancel", project_issue_path(@project, @issue), :class => "btn"
|