<%= labelled_form_for @issue, :url => @project && !EasySetting.value('display_project_field_on_issue_detail', @project) ? project_issues_path(@project) :issues_path,
                      :html => {:id => 'issue-form', :multipart => true, :class => 'new-issue-form form-box', :autocomplete => 'off'} do |f| %>
  <%= call_hook(:easy_view_issues_new_form, {:form => f, :issue => @issue}) %>
  <%= hidden_field_tag('issue_first_controller', controller_name) %>
  <%= hidden_field_tag('copy_from', params[:copy_from]) if params[:copy_from] %>
  <%= hidden_field_tag('back_url', params[:back_url]) unless params[:back_url].blank? %>
  <%= error_messages_for 'issue' %>
  <%= error_messages_for 'new_issues' %>
  <div class="issue_fields">
    <div id="all_fields" class="splitcontent">
      <div id="issue_static_fields" class="issue_common_static_fields <%= 'no-watchers' unless render_watchers_column %> splitcontentleft">
        <%= render :partial => 'issues/new_form_static_attributes', :locals => {:issue => @issue} -%>
        <% if @copy_from %>
          <% if Setting.link_copied_issue == 'ask' %>
            <% box = check_box_tag 'link_copy', '1', (@link_copy && !params[:subtask_for_id]) %>
            <%= label_tag 'link_copy', box + l(:label_link_copied_issue), :class => 'checkbox inline' %>
          <% end %>
          <% if @copy_from.attachments.any? %>
            <% box = check_box_tag 'copy_attachments', '1', @copy_attachments %>
            <%= label_tag 'copy_attachments', box + l(:label_copy_attachments), :class => 'checkbox inline' %>
          <% end %>
          <% if !@copy_from.leaf? %>
            <% box = check_box_tag 'copy_subtasks', '1', @copy_subtasks %>
            <%= label_tag 'copy_subtasks', box + l(:label_copy_subtasks), :class => 'checkbox inline' %>
          <% end %>
          <% if @copy_from.has_relations_to_copy?(true) %>
            <% box = check_box_tag 'copy_relations', '1', @copy_relations %>
            <%= label_tag 'copy_relations', box + l(:label_copy_relations), :class => 'checkbox inline' %>
          <% end %>
        <% end %>
      </div>
      <div id="issue-dependent-fields" class="issue-dependent-fields splitcontentright">
        <%= render :partial => 'issues/new_form_dependent_fields' %>
      </div>
    </div>
  </div>
  <div class="issue_submit_buttons form-actions">
    <%= submit_tag l(:button_create), :class => 'button-positive', :tabindex => 900 %>
    <%= submit_tag l(:button_create_and_continue), :name => 'continue', :class => 'link_new icon-save-issue button', :tabindex => 910 %>
    <%= preview_link({:controller => 'previews', :action => 'issue'}, 'issue-form') %>
  </div>
<% end %>
