/
new.html.haml
56 lines (47 loc) · 2.12 KB
/
new.html.haml
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#block-forms.block
.content
- if @preview
%fieldset.preview
%legend Preview
%h2=h @ticket.title
= textilized @ticket.description
%h2 Create a new ticket
.inner
.flash
= flash[:error]
= error_messages_for :ticket
- form_for([@project, @ticket], :html => {:id => 'ticket_form' , :class => 'form'}) do |f|
.columns
%div{:class => 'column left'}
.group
%label.label{:for => 'ticket[title]'} Title
= f.text_field :title, :size => 40, :class => 'text_field'
.group
%label.label{:for => 'ticket[description]'} Description
= f.text_area(:description, :cols => 40, :rows => 15, :class => 'text_area')
%div{:class => 'column right'}
.group
%label.label{:for => 'ticket[user_assigned_id]'} Who's is responsible ?
= f.collection_select :user_assigned_id, @ticket.project.project_members, :user_id, :user_name, :prompt => '-- None --'
.group
%label.label{:for => 'ticket[state_id]'} Ticket status
= f.collection_select :state_id, State.all, :id, :name
.group
%label.label{:for => 'ticket[priority_id]'} Ticket Priority
= f.collection_select :priority_id, Priority.all, :id, :name, :prompt => '-- None --'
.group
%label.label{:for => 'ticket[milestone_id]'} Milestone
= f.collection_select :milestone_id, @project.milestones, :id, :name, :prompt => '-- None --'
.clear
.group
%label.label{:for => 'ticket[tag_list]'} Choose some tags
= f.text_field :tag_list, :value => @ticket.tag_list, :class => 'text_field'
.clear
.group
%label.label{:for => 'ticket[attachment]'} Attach a file [500MB limit]
= f.file_field :attachment, :class => 'text_field'
%div{:class => 'group navform'}
= submit_tag "Create", :class => 'button'
= submit_tag "Preview", :class => 'button'
or
= link_to 'Cancel', project_tickets_url(@project)