1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
%div.issue-form-holder
= form_for [@project, @issue], :remote => request.xhr? do |f|
%h3= @issue.new_record? ? "New Issue" : "Edit Issue ##{@issue.id}"
%hr
-if @issue.errors.any?
.alert-message.block-message.error
%ul
- @issue.errors.full_messages.each do |msg|
%li= msg
.clearfix
= f.label :title, "Issue Subject"
.input= f.text_field :title, :maxlength => 255
.clearfix
= f.label :description, "Issue Description"
.input= f.text_area :description, :maxlength => 2000, :class => "xxlarge"
%p.hint Markdown is enabled.
.clearfix
= f.label :assignee_id
.input= f.select(:assignee_id, @project.users.all.collect {|p| [ p.name, p.id ] }, { :include_blank => "Assign to user" })
.clearfix
= f.label :critical, "Critical"
.input= f.check_box :critical
- unless @issue.new_record?
.clearfix
= f.label :closed
.input= f.check_box :closed
.actions
= f.submit 'Submit new issue', :class => "primary btn"
- 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"