##// END OF EJS Templates
Moved fields specific to new issues to the new issue form....
Jean-Philippe Lang -
r8079:59c1141e0863
parent child
Show More
@@ -1,46 +1,34
1 1 <%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
2 2
3 3 <% if @issue.safe_attribute_names.include?('is_private') %>
4 4 <p style="float:right; margin-right:1em;">
5 5 <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 6 </p>
7 7 <% end %>
8 8 <p><%= f.select :tracker_id, @project.trackers.collect {|t| [t.name, t.id]}, :required => true %></p>
9 9 <%= observe_field :issue_tracker_id, :url => project_issue_form_path(@project, :id => @issue),
10 10 :update => :attributes,
11 11 :with => "Form.serialize('issue-form')" %>
12 12
13 13 <p><%= f.text_field :subject, :size => 80, :required => true %></p>
14 14 <p>
15 15 <label><%= l(:field_description) %></label>
16 16 <%= link_to_function image_tag('edit.png'),
17 17 'Element.hide(this); Effect.toggle("issue_description_and_toolbar", "appear", {duration:0.3})' unless @issue.new_record? %>
18 18 <% content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
19 19 <%= f.text_area :description,
20 20 :cols => 60,
21 21 :rows => (@issue.description.blank? ? 10 : [[10, @issue.description.length / 50].max, 100].min),
22 22 :accesskey => accesskey(:edit),
23 23 :class => 'wiki-edit',
24 24 :no_label => true %>
25 25 <% end %>
26 26 </p>
27 27
28 28 <div id="attributes" class="attributes">
29 29 <%= render :partial => 'issues/attributes' %>
30 30 </div>
31 31
32 <% if @issue.new_record? %>
33 <p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %></p>
34 <% end %>
35
36 <% if @issue.new_record? && User.current.allowed_to?(:add_issue_watchers, @project) -%>
37 <p id="watchers_form"><label><%= l(:label_issue_watchers) %></label>
38 <% @issue.project.users.sort.each do |user| -%>
39 <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user) %> <%=h user %></label>
40 <% end -%>
41 </p>
42 <% end %>
43
44 32 <%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
45 33
46 34 <%= wikitoolbar_for 'issue_description' %>
@@ -1,29 +1,40
1 1 <h2><%=l(:label_issue_new)%></h2>
2 2
3 3 <%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
4 4
5 5 <% labelled_form_for @issue, :url => project_issues_path(@project),
6 6 :html => {:id => 'issue-form', :multipart => true} do |f| %>
7 <%= error_messages_for 'issue' %>
8 <div class="box tabular">
7 <%= error_messages_for 'issue' %>
8 <div class="box tabular">
9 9 <%= render :partial => 'issues/form', :locals => {:f => f} %>
10 </div>
10
11 <p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %></p>
12
13 <% if User.current.allowed_to?(:add_issue_watchers, @project) -%>
14 <p id="watchers_form"><label><%= l(:label_issue_watchers) %></label>
15 <% @issue.project.users.sort.each do |user| -%>
16 <label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user) %> <%=h user %></label>
17 <% end -%>
18 </p>
19 <% end %>
20 </div>
21
11 22 <%= submit_tag l(:button_create) %>
12 23 <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
13 24 <%= link_to_remote l(:label_preview),
14 25 { :url => preview_issue_path(:project_id => @project),
15 26 :method => 'post',
16 27 :update => 'preview',
17 28 :with => "Form.serialize('issue-form')",
18 29 :complete => "Element.scrollTo('preview')"
19 30 }, :accesskey => accesskey(:preview) %>
20 31
21 32 <%= javascript_tag "Form.Element.focus('issue_subject');" %>
22 33 <% end %>
23 34
24 35 <div id="preview" class="wiki"></div>
25 36
26 37 <% content_for :header_tags do %>
27 38 <%= stylesheet_link_tag 'scm' %>
28 39 <%= robot_exclusion_tag %>
29 40 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now