You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

new.html.erb 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <h2><%=l(:label_issue_new)%></h2>
  2. <%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
  3. <%= labelled_form_for @issue, :url => project_issues_path(@project),
  4. :html => {:id => 'issue-form', :multipart => true} do |f| %>
  5. <%= error_messages_for 'issue' %>
  6. <%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
  7. <div class="box tabular">
  8. <div id="all_attributes">
  9. <%= render :partial => 'issues/form', :locals => {:f => f} %>
  10. </div>
  11. <% if @copy_from && @copy_from.attachments.any? %>
  12. <p>
  13. <label for="copy_attachments"><%= l(:label_copy_attachments) %></label>
  14. <%= check_box_tag 'copy_attachments', '1', @copy_attachments %>
  15. </p>
  16. <% end %>
  17. <p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form', :locals => {:container => @issue} %></p>
  18. <% if @issue.safe_attribute? 'watcher_user_ids' -%>
  19. <p id="watchers_form"><label><%= l(:label_issue_watchers) %></label>
  20. <span id="watchers_inputs">
  21. <%= watchers_checkboxes(@issue, @available_watchers) %>
  22. </span>
  23. <span class="search_for_watchers">
  24. <%= link_to_remote l(:label_search_for_watchers),
  25. :url => {:controller => 'watchers', :action => 'new', :project_id => @issue.project},
  26. :method => 'get' %>
  27. </span>
  28. </p>
  29. <% end %>
  30. </div>
  31. <%= submit_tag l(:button_create) %>
  32. <%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
  33. <%= link_to_remote l(:label_preview),
  34. { :url => preview_new_issue_path(:project_id => @project),
  35. :method => 'post',
  36. :update => 'preview',
  37. :with => "Form.serialize('issue-form')",
  38. :complete => "Element.scrollTo('preview')"
  39. }, :accesskey => accesskey(:preview) %>
  40. <%= javascript_tag "Form.Element.focus('issue_subject');" %>
  41. <% end %>
  42. <div id="preview" class="wiki"></div>
  43. <% content_for :header_tags do %>
  44. <%= stylesheet_link_tag 'scm' %>
  45. <%= robot_exclusion_tag %>
  46. <% end %>