2011-11-25 22:40:12 +01:00
|
|
|
%div.issue-form-holder
|
2011-12-14 07:58:35 +01:00
|
|
|
= form_for [@project, @issue], :remote => request.xhr? do |f|
|
|
|
|
%div
|
|
|
|
%span.entity-info
|
|
|
|
- if request.xhr?
|
|
|
|
= link_to "#back", :onclick => "backToIssues();" do
|
|
|
|
.entity-button
|
2011-12-17 10:18:27 +01:00
|
|
|
Issues
|
2011-12-14 07:58:35 +01:00
|
|
|
%i
|
|
|
|
- else
|
|
|
|
- if @issue.new_record?
|
|
|
|
= link_to project_issues_path(@project) do
|
|
|
|
.entity-button
|
2011-12-17 10:18:27 +01:00
|
|
|
Issues
|
2011-12-14 07:58:35 +01:00
|
|
|
%i
|
|
|
|
- else
|
|
|
|
= link_to project_issue_path(@project, @issue) do
|
|
|
|
.entity-button
|
2011-12-17 10:18:27 +01:00
|
|
|
Show Issue
|
2011-12-14 07:58:35 +01:00
|
|
|
%i
|
|
|
|
|
|
|
|
%h2= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
|
2011-10-08 23:36:38 +02:00
|
|
|
|
2011-12-14 07:58:35 +01:00
|
|
|
%hr
|
|
|
|
%table.no-borders
|
|
|
|
-if @issue.errors.any?
|
|
|
|
%tr
|
|
|
|
%td{:colspan => 2}
|
|
|
|
#error_explanation
|
|
|
|
- @issue.errors.full_messages.each do |msg|
|
|
|
|
%span= msg
|
|
|
|
%br
|
2011-11-25 22:40:12 +01:00
|
|
|
|
|
|
|
|
2011-12-14 07:58:35 +01:00
|
|
|
%tr
|
|
|
|
%td= f.label :assignee_id
|
|
|
|
%td= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Select user" })
|
|
|
|
|
|
|
|
%tr
|
|
|
|
%td= f.label :critical, "Critical"
|
|
|
|
%td= f.check_box :critical
|
|
|
|
|
|
|
|
- unless @issue.new_record?
|
|
|
|
%tr
|
|
|
|
%td= f.label :closed
|
|
|
|
%td= f.check_box :closed
|
|
|
|
|
|
|
|
= f.text_area :title, :style => "width:718px; height:100px", :maxlength => 255
|
|
|
|
%br
|
|
|
|
%br
|
|
|
|
.merge-tabs
|
|
|
|
= f.submit 'Save', :class => "grey-button"
|
|
|
|
|
|
|
|
- unless @issue.new_record?
|
2011-11-25 22:40:12 +01:00
|
|
|
.right
|
2011-12-14 07:58:35 +01:00
|
|
|
= link_to 'Remove', [@project, @issue], :confirm => 'Are you sure?', :method => :delete, :class => "red-button"
|