@@ -1,63 +1,65 | |||||
1 | <% if @issue.new_record? %> |
|
1 | <% if @issue.new_record? %> | |
2 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> |
|
2 | <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p> | |
3 | <%= observe_field :issue_tracker_id, :url => { :action => :new }, |
|
3 | <%= observe_field :issue_tracker_id, :url => { :action => :new }, | |
4 | :update => :content, |
|
4 | :update => :content, | |
5 | :with => "Form.serialize('issue-form')" %> |
|
5 | :with => "Form.serialize('issue-form')" %> | |
6 | <hr /> |
|
6 | <hr /> | |
7 | <% end %> |
|
7 | <% end %> | |
8 |
|
8 | |||
9 | <div id="issue_descr_fields" <%= 'style="display:none"' unless @issue.new_record? || @issue.errors.any? %>> |
|
9 | <div id="issue_descr_fields" <%= 'style="display:none"' unless @issue.new_record? || @issue.errors.any? %>> | |
10 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> |
|
10 | <p><%= f.text_field :subject, :size => 80, :required => true %></p> | |
11 | <p><%= f.text_area :description, |
|
11 | <p><%= f.text_area :description, | |
12 | :cols => 60, |
|
12 | :cols => 60, | |
13 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), |
|
13 | :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min), | |
14 | :accesskey => accesskey(:edit), |
|
14 | :accesskey => accesskey(:edit), | |
15 | :class => 'wiki-edit' %></p> |
|
15 | :class => 'wiki-edit' %></p> | |
16 | </div> |
|
16 | </div> | |
17 |
|
17 | |||
18 | <div class="attributes"> |
|
18 | <div class="attributes"> | |
19 | <div class="splitcontentleft"> |
|
19 | <div class="splitcontentleft"> | |
20 | <% if @issue.new_record? || @allowed_statuses.any? %> |
|
20 | <% if @issue.new_record? || @allowed_statuses.any? %> | |
21 | <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p> |
|
21 | <p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), :required => true %></p> | |
22 | <% else %> |
|
22 | <% else %> | |
23 | <p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p> |
|
23 | <p><label><%= l(:field_status) %></label> <%= @issue.status.name %></p> | |
24 | <% end %> |
|
24 | <% end %> | |
25 |
|
25 | |||
26 | <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p> |
|
26 | <p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), :required => true %></p> | |
27 | <p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p> |
|
27 | <p><%= f.select :assigned_to_id, (@issue.assignable_users.collect {|m| [m.name, m.id]}), :include_blank => true %></p> | |
|
28 | <% unless @project.issue_categories.empty? %> | |||
28 | <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> |
|
29 | <p><%= f.select :category_id, (@project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true %> | |
29 | <%= prompt_to_remote(l(:label_issue_category_new), |
|
30 | <%= prompt_to_remote(l(:label_issue_category_new), | |
30 | l(:label_issue_category_new), 'category[name]', |
|
31 | l(:label_issue_category_new), 'category[name]', | |
31 | {:controller => 'projects', :action => 'add_issue_category', :id => @project}, |
|
32 | {:controller => 'projects', :action => 'add_issue_category', :id => @project}, | |
32 | :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p> |
|
33 | :class => 'small', :tabindex => 199) if authorize_for('projects', 'add_issue_category') %></p> | |
|
34 | <% end %> | |||
33 | <%= content_tag('p', f.select(:fixed_version_id, |
|
35 | <%= content_tag('p', f.select(:fixed_version_id, | |
34 | (@project.versions.sort.collect {|v| [v.name, v.id]}), |
|
36 | (@project.versions.sort.collect {|v| [v.name, v.id]}), | |
35 | { :include_blank => true })) unless @project.versions.empty? %> |
|
37 | { :include_blank => true })) unless @project.versions.empty? %> | |
36 | </div> |
|
38 | </div> | |
37 |
|
39 | |||
38 | <div class="splitcontentright"> |
|
40 | <div class="splitcontentright"> | |
39 | <p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %></p> |
|
41 | <p><%= f.text_field :start_date, :size => 10 %><%= calendar_for('issue_start_date') %></p> | |
40 | <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p> |
|
42 | <p><%= f.text_field :due_date, :size => 10 %><%= calendar_for('issue_due_date') %></p> | |
41 | <p><%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %></p> |
|
43 | <p><%= f.text_field :estimated_hours, :size => 3 %> <%= l(:field_hours) %></p> | |
42 | <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p> |
|
44 | <p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %></p> | |
43 | </div> |
|
45 | </div> | |
44 |
|
46 | |||
45 | <div style="clear:both;"> </div> |
|
47 | <div style="clear:both;"> </div> | |
46 | <%= render :partial => 'form_custom_fields' %> |
|
48 | <%= render :partial => 'form_custom_fields' %> | |
47 | </div> |
|
49 | </div> | |
48 |
|
50 | |||
49 | <% if @issue.new_record? %> |
|
51 | <% if @issue.new_record? %> | |
50 | <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p> |
|
52 | <p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p> | |
51 | <% end %> |
|
53 | <% end %> | |
52 |
|
54 | |||
53 | <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> |
|
55 | <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%> | |
54 | <p><label><%= l(:label_issue_watchers) %></label> |
|
56 | <p><label><%= l(:label_issue_watchers) %></label> | |
55 | <% @issue.project.users.sort.each do |user| -%> |
|
57 | <% @issue.project.users.sort.each do |user| -%> | |
56 | <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watcher_user_ids.include?(user.id) %> <%=h user %></label> |
|
58 | <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watcher_user_ids.include?(user.id) %> <%=h user %></label> | |
57 | <% end -%> |
|
59 | <% end -%> | |
58 | </p> |
|
60 | </p> | |
59 | <% end %> |
|
61 | <% end %> | |
60 |
|
62 | |||
61 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> |
|
63 | <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %> | |
62 |
|
64 | |||
63 | <%= wikitoolbar_for 'issue_description' %> |
|
65 | <%= wikitoolbar_for 'issue_description' %> |
General Comments 0
You need to be logged in to leave comments.
Login now