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