summaryrefslogtreecommitdiffstats
path: root/app/views/issues/_update.rhtml
blob: 49d1473d957b747ef47d1fcaece7803736901ca1 (plain)
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
<% labelled_tabular_form_for(:issue, @issue, :url => {:action => 'update', :id => @issue},
                                             :html => {:multipart => true,
                                                       :id => 'issue-form'}) do |f| %>

<div class="box">
<% unless @status_options.empty? %>
<%= f.hidden_field :lock_version %>
<fieldset><legend><%= l(:label_change_properties) %></legend>
    <div class="splitcontentleft">
    <p><%= f.select :status_id, (@status_options.collect {|p| [p.name, p.id]}), :required => true %></p>
    <p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p>
    </div>
    <div class="splitcontentright">
    <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p>
    <p><%= f.select :fixed_version_id, (@project.versions.sort.collect {|v| [v.name, v.id]}), { :include_blank => true } %></p>
    </div>
</fieldset>
<% end%>
<% if authorize_for('timelog', 'edit') %>
<fieldset><legend><%= l(:button_log_time) %></legend>
    <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
    <div class="splitcontentleft">
    <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
    </div>
    <div class="splitcontentright">
    <p><%= time_entry.text_field :comments, :size => 40 %></p>
    <p><%= time_entry.select :activity_id, (@activities.collect {|p| [p.name, p.id]}) %></p>
    </div>
    <% end %>
</fieldset>
<% end %>

<fieldset><legend><%= l(:field_notes) %></legend>
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'notes' %>

<p id="attachments_p"><label><%=l(:label_attachment_new)%>
<%= image_to_function "add.png", "addFileField();return false" %></label>
<%= file_field_tag 'attachments[]', :size => 30  %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
</fieldset>
</div>

<%= submit_tag l(:button_submit) %>
<%= link_to_remote l(:label_preview), 
                   { :url => { :controller => 'issues', :action => 'preview', :id => @issue },
                     :method => 'post',
                     :update => 'preview',
                     :with => "Form.serialize('issue-form')",
                     :complete => "window.location.hash='preview'"
                   }, :accesskey => accesskey(:preview) %> |
<%= toggle_link l(:button_cancel), 'update' %>
<% end %>

<div id="preview" class="wiki"></div>