2008-01-23 22:58:11 +03:00
|
|
|
<h2><%=l(:label_issue_new)%></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2011-12-12 22:12:03 +04:00
|
|
|
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
|
|
|
|
|
2011-12-06 22:02:10 +04:00
|
|
|
<% labelled_form_for @issue, :url => project_issues_path(@project),
|
|
|
|
:html => {:id => 'issue-form', :multipart => true} do |f| %>
|
2011-12-14 00:02:49 +04:00
|
|
|
<%= error_messages_for 'issue' %>
|
2012-02-16 05:34:28 +04:00
|
|
|
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
2011-12-14 00:02:49 +04:00
|
|
|
<div class="box tabular">
|
2012-02-16 05:34:28 +04:00
|
|
|
<div id="all_attributes">
|
2007-10-28 17:31:59 +03:00
|
|
|
<%= render :partial => 'issues/form', :locals => {:f => f} %>
|
2012-01-08 15:16:54 +04:00
|
|
|
</div>
|
2011-12-14 00:02:49 +04:00
|
|
|
|
2012-01-20 22:22:43 +04:00
|
|
|
<% if @copy_from && @copy_from.attachments.any? %>
|
2012-02-16 05:34:28 +04:00
|
|
|
<p>
|
|
|
|
<label for="copy_attachments"><%= l(:label_copy_attachments) %></label>
|
|
|
|
<%= check_box_tag 'copy_attachments', '1', @copy_attachments %>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2012-01-20 22:22:43 +04:00
|
|
|
|
2012-02-17 01:00:11 +04:00
|
|
|
<p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form', :locals => {:container => @issue} %></p>
|
2011-12-14 00:02:49 +04:00
|
|
|
|
2011-12-14 00:40:03 +04:00
|
|
|
<% if @issue.safe_attribute? 'watcher_user_ids' -%>
|
2011-12-14 00:02:49 +04:00
|
|
|
<p id="watchers_form"><label><%= l(:label_issue_watchers) %></label>
|
|
|
|
<% @issue.project.users.sort.each do |user| -%>
|
2012-01-08 21:20:08 +04:00
|
|
|
<label class="floating"><%= check_box_tag 'issue[watcher_user_ids][]', user.id, @issue.watched_by?(user), :id => nil %> <%=h user %></label>
|
2011-12-14 00:02:49 +04:00
|
|
|
<% end -%>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
|
2007-10-06 12:08:29 +04:00
|
|
|
<%= submit_tag l(:button_create) %>
|
2009-01-16 20:20:41 +03:00
|
|
|
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
2011-09-14 12:42:24 +04:00
|
|
|
<%= link_to_remote l(:label_preview),
|
2012-02-16 02:49:03 +04:00
|
|
|
{ :url => preview_new_issue_path(:project_id => @project),
|
2007-10-06 12:54:05 +04:00
|
|
|
:method => 'post',
|
|
|
|
:update => 'preview',
|
|
|
|
:with => "Form.serialize('issue-form')",
|
2008-02-11 23:45:46 +03:00
|
|
|
:complete => "Element.scrollTo('preview')"
|
2007-10-06 12:54:05 +04:00
|
|
|
}, :accesskey => accesskey(:preview) %>
|
2011-09-14 12:42:24 +04:00
|
|
|
|
2011-09-18 05:57:14 +04:00
|
|
|
<%= javascript_tag "Form.Element.focus('issue_subject');" %>
|
2006-11-12 21:50:30 +03:00
|
|
|
<% end %>
|
2007-10-06 12:54:05 +04:00
|
|
|
|
|
|
|
<div id="preview" class="wiki"></div>
|
2009-01-03 16:14:28 +03:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag 'scm' %>
|
2011-04-12 23:22:44 +04:00
|
|
|
<%= robot_exclusion_tag %>
|
2009-01-03 16:14:28 +03:00
|
|
|
<% end %>
|