2011-11-25 16:40:12 -05:00
|
|
|
%div.issue-form-holder
|
2011-12-14 01:58:35 -05:00
|
|
|
= form_for [@project, @issue], :remote => request.xhr? do |f|
|
2012-01-27 18:49:14 -05:00
|
|
|
%h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
|
|
|
|
%hr
|
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
|
2011-11-25 16:40:12 -05:00
|
|
|
|
2012-01-27 18:49:14 -05:00
|
|
|
.clearfix
|
|
|
|
= f.label :assignee_id
|
|
|
|
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
|
2011-12-14 01:58:35 -05:00
|
|
|
|
2012-01-27 18:49:14 -05:00
|
|
|
.clearfix
|
|
|
|
= f.label :critical, "Critical"
|
|
|
|
.input= f.check_box :critical
|
2011-12-14 01:58:35 -05:00
|
|
|
|
2012-01-27 18:49:14 -05:00
|
|
|
- unless @issue.new_record?
|
|
|
|
.clearfix
|
|
|
|
= f.label :closed
|
|
|
|
.input= f.check_box :closed
|
|
|
|
|
|
|
|
.clearfix
|
|
|
|
= f.label :title
|
|
|
|
.input= f.text_area :title, :maxlength => 255, :class => "xlarge"
|
|
|
|
.clearfix
|
2012-01-27 02:19:55 -05:00
|
|
|
= f.submit 'Save', :class => "primary btn"
|
2012-01-27 18:49:14 -05:00
|
|
|
|
|
|
|
- if request.xhr?
|
|
|
|
= link_to "Cancel", "#back", :onclick => "backToIssues();", :class => "btn"
|
|
|
|
- else
|
|
|
|
- if @issue.new_record?
|
|
|
|
= link_to "Cancel", project_issues_path(@project), :class => "btn"
|
|
|
|
- else
|
|
|
|
= link_to "Cancel", project_issue_path(@project, @issue), :class => "btn"
|
|
|
|
|
|
|
|
|
|
|
|
-#- unless @issue.new_record?
|
2011-11-25 16:40:12 -05:00
|
|
|
.right
|
2011-12-14 01:58:35 -05:00
|
|
|
= link_to 'Remove', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
|