##// END OF EJS Templates
Render projects as a tree in the project select field....
Jean-Philippe Lang -
r8414:c164211c3f35
parent child
Show More
@@ -1,48 +1,48
1 <% labelled_fields_for :issue, @issue do |f| %>
1 <% labelled_fields_for :issue, @issue do |f| %>
2 <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
2 <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
3
3
4 <% if @issue.safe_attribute? 'is_private' %>
4 <% if @issue.safe_attribute? 'is_private' %>
5 <p style="float:right; margin-right:1em;">
5 <p style="float:right; margin-right:1em;">
6 <label class="inline" for="issue_is_private" id="issue_is_private_label"><%= f.check_box :is_private, :no_label => true %> <%= l(:field_is_private) %></label>
6 <label class="inline" for="issue_is_private" id="issue_is_private_label"><%= f.check_box :is_private, :no_label => true %> <%= l(:field_is_private) %></label>
7 </p>
7 </p>
8 <% end %>
8 <% end %>
9
9
10 <% if !@issue.new_record? && @issue.safe_attribute?('project_id') %>
10 <% if !@issue.new_record? && @issue.safe_attribute?('project_id') %>
11 <p><%= f.select :project_id, Issue.allowed_target_projects_on_move.collect {|t| [t.name, t.id]}, :required => true %></p>
11 <p><%= f.select :project_id, project_tree_options_for_select(Issue.allowed_target_projects_on_move, :selected => @issue.project), :required => true %></p>
12 <%= observe_field :issue_project_id, :url => project_issue_form_path(@project, :id => @issue, :project_change => '1'),
12 <%= observe_field :issue_project_id, :url => project_issue_form_path(@project, :id => @issue, :project_change => '1'),
13 :with => "Form.serialize('issue-form')" %>
13 :with => "Form.serialize('issue-form')" %>
14 <% end %>
14 <% end %>
15
15
16 <% if @issue.safe_attribute? 'tracker_id' %>
16 <% if @issue.safe_attribute? 'tracker_id' %>
17 <p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p>
17 <p><%= f.select :tracker_id, @issue.project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p>
18 <%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue),
18 <%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue),
19 :with => "Form.serialize('issue-form')" %>
19 :with => "Form.serialize('issue-form')" %>
20 <% end %>
20 <% end %>
21
21
22 <% if @issue.safe_attribute? 'subject' %>
22 <% if @issue.safe_attribute? 'subject' %>
23 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
23 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
24 <% end %>
24 <% end %>
25
25
26 <% if @issue.safe_attribute? 'description' %>
26 <% if @issue.safe_attribute? 'description' %>
27 <p>
27 <p>
28 <label><%= l(:field_description) %></label>
28 <label><%= l(:field_description) %></label>
29 <%= link_to_function image_tag('edit.png'),
29 <%= link_to_function image_tag('edit.png'),
30 'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %>
30 'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %>
31 <% content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
31 <% content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
32 <%= f.text_area :description,
32 <%= f.text_area :description,
33 :cols => 60,
33 :cols => 60,
34 :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
34 :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
35 :accesskey => accesskey(:edit),
35 :accesskey => accesskey(:edit),
36 :class => 'wiki-edit',
36 :class => 'wiki-edit',
37 :no_label => true %>
37 :no_label => true %>
38 <% end %>
38 <% end %>
39 </p>
39 </p>
40 <%= wikitoolbar_for 'issue_description' %>
40 <%= wikitoolbar_for 'issue_description' %>
41 <% end %>
41 <% end %>
42
42
43 <div id="attributes" class="attributes">
43 <div id="attributes" class="attributes">
44 <%= render :partial => 'issues/attributes' %>
44 <%= render :partial => 'issues/attributes' %>
45 </div>
45 </div>
46
46
47 <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
47 <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
48 <% end %>
48 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now