@@ -1,58 +1,61 | |||
|
1 | 1 | <%= error_messages_for 'issue' %> |
|
2 | 2 | <div class="box"> |
|
3 | 3 | |
|
4 | 4 | <% if @issue.new_record? %> |
|
5 | 5 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> |
|
6 | 6 | <%= observe_field :issue_tracker_id, :url => { :action => :new }, |
|
7 | 7 | :update => :content, |
|
8 | 8 | :with => "Form.serialize('issue-form')" %> |
|
9 | 9 | <% end %> |
|
10 | 10 | |
|
11 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> | |
|
12 | <p><%= f.text_area :description, :required => true, | |
|
13 | :cols => 60, | |
|
14 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), | |
|
15 | :accesskey => accesskey(:edit), | |
|
16 | :class => 'wiki-edit' %></p> | |
|
17 | ||
|
11 | 18 | <div class="splitcontentleft"> |
|
12 | 19 | <% if @issue.new_record? %> |
|
13 | 20 | <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p> |
|
14 | 21 | <% else %> |
|
15 | 22 | <p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p> |
|
16 | 23 | <% end %> |
|
17 | 24 | |
|
18 | 25 | <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p> |
|
19 | 26 | <p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p> |
|
20 | 27 | <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> |
|
21 | 28 | <%= prompt_to_remote(l(:label_issue_category_new), |
|
22 | 29 | l(:label_issue_category_new), 'category[name]', |
|
23 | 30 | {:controller => 'projects', :action => 'add_issue_category', :id => @project}, |
|
24 | 31 | :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p> |
|
32 | <%= content_tag('p', f.select(:fixed_version_id, | |
|
33 | (@project.versions.sort.collect {|v| [v.name, v.id]}), | |
|
34 | { :include_blank => true })) unless @project.versions.empty? %> | |
|
25 | 35 | </div> |
|
26 | 36 | |
|
27 | 37 | <div class="splitcontentright"> |
|
28 | 38 | <p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %></p> |
|
29 | 39 | <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p> |
|
30 | 40 | <p><%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %></p> |
|
31 | 41 | <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p> |
|
32 | 42 | </div> |
|
33 | 43 | |
|
34 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> | |
|
35 | <p><%= f.text_area :description, :required => true, | |
|
36 | :cols => 60, | |
|
37 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), | |
|
38 | :accesskey => accesskey(:edit), | |
|
39 | :class => 'wiki-edit' %></p> | |
|
40 | <p><%= f.select :fixed_version_id, (@project.versions.sort.collect {|v| [v.name, v.id]}), { :include_blank => true } %></p> | |
|
41 | ||
|
44 | <div style="clear:both;"> </div> | |
|
42 | 45 | <%= render :partial => 'form_custom_fields', :locals => {:values => @custom_values} %> |
|
43 | 46 | |
|
44 | 47 | <% if @issue.new_record? %> |
|
45 | 48 | <p id="attachments_p"><label for="attachment_file"><%=l(:label_attachment)%> |
|
46 | 49 | <%= image_to_function "add.png", "addFileField();return false" %></label> |
|
47 | 50 | <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p> |
|
48 | 51 | <% end %> |
|
49 | 52 | </div> |
|
50 | 53 | |
|
51 | 54 | <%= wikitoolbar_for 'issue_description' %> |
|
52 | 55 | |
|
53 | 56 | <% content_for :header_tags do %> |
|
54 | 57 | <%= javascript_include_tag 'calendar/calendar' %> |
|
55 | 58 | <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> |
|
56 | 59 | <%= javascript_include_tag 'calendar/calendar-setup' %> |
|
57 | 60 | <%= stylesheet_link_tag 'calendar' %> |
|
58 | 61 | <% end %> |
@@ -1,11 +1,11 | |||
|
1 | 1 | <div class="splitcontentleft"> |
|
2 | 2 | <% i = 1 %> |
|
3 | 3 | <% for @custom_value in values %> |
|
4 | 4 | <p><%= custom_field_tag_with_label @custom_value %></p> |
|
5 |
<% if i |
|
|
5 | <% if i == values.size / 2 %> | |
|
6 | 6 | </div><div class="splitcontentright"> |
|
7 | 7 | <% end %> |
|
8 | 8 | <% i += 1 %> |
|
9 | 9 | <% end %> |
|
10 | 10 | </div> |
|
11 | 11 | <div style="clear:both;"> </div> |
@@ -1,17 +1,17 | |||
|
1 |
<h2><%=l(:label_issue_new)%> |
|
|
1 | <h2><%=l(:label_issue_new)%></h2> | |
|
2 | 2 | |
|
3 | 3 | <% labelled_tabular_form_for :issue, @issue, |
|
4 | 4 | :html => {:multipart => true, :id => 'issue-form'} do |f| %> |
|
5 | 5 | <%= render :partial => 'issues/form', :locals => {:f => f} %> |
|
6 | 6 | <%= submit_tag l(:button_create) %> |
|
7 | 7 | <%= link_to_remote l(:label_preview), |
|
8 | 8 | { :url => { :controller => 'issues', :action => 'preview', :id => @issue }, |
|
9 | 9 | :method => 'post', |
|
10 | 10 | :update => 'preview', |
|
11 | 11 | :with => "Form.serialize('issue-form')", |
|
12 | 12 | :complete => "location.href='#preview-top'" |
|
13 | 13 | }, :accesskey => accesskey(:preview) %> |
|
14 | 14 | <% end %> |
|
15 | 15 | |
|
16 | 16 | <a name="preview-top"></a> |
|
17 | 17 | <div id="preview" class="wiki"></div> |
General Comments 0
You need to be logged in to leave comments.
Login now