<%= form_tag({:action => 'edit', :tab => 'issues'}, :class => 'form-box') do %>
  <div class="box tabular settings">
    <div class="splitcontent">
      <div class="splitcontentleft">
        <fieldset>
          <legend><%= l(:heading_issues_settings_display) -%></legend>
          <p>
            <%= hidden_field_tag('easy_setting[show_issue_id]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[show_issue_id]', '1', EasySetting.value('show_issue_id')) -%>
            <%= label_tag('easy_setting_show_issue_id', box + l(:setting_show_issue_id), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= setting_check_box :display_subprojects_issues %>
          </p>
          <% if false %>
          <p>
            <%= hidden_field_tag('easy_setting[display_journal_details]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[display_journal_details]', '1', EasySetting.value('display_journal_details') == true) -%>
            <%= label_tag('easy_setting_display_journal_details', box + l(:setting_display_journal_details), :class => 'checkbox inline') %>
          </p>
          <% end %>
          <p>
            <%= hidden_field_tag('easy_setting[display_issue_relations_on_new_form]', '0', :id => nil) -%>
            <% box= check_box_tag('easy_setting[display_issue_relations_on_new_form]', '1', EasySetting.value('display_issue_relations_on_new_form') == true) -%>
            <%= label_tag('easy_setting_display_issue_relations_on_new_form', box + l(:setting_display_issue_relations_on_new_form), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[display_project_field_on_issue_detail]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[display_project_field_on_issue_detail]', '1', EasySetting.value('display_project_field_on_issue_detail')) -%>
            <%= label_tag('easy_setting_display_project_field_on_issue_detail', box + l(:setting_display_project_field_on_issue_detail), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[show_easy_entity_activity_on_issue]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[show_easy_entity_activity_on_issue]', '1', EasySetting.value('show_easy_entity_activity_on_issue')) -%>
            <%= label_tag('easy_setting_show_easy_entity_activity_on_issue', box + l(:setting_show_easy_entity_activity_on_issue), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= content_tag(:label, l(:setting_issue_created_on_date_format_label)) + select_tag('easy_setting[issue_created_on_date_format]', options_for_select([[l(:setting_issue_created_on_date_format_datetime),'datetime'],[l(:setting_issue_created_on_date_format_date),'date']], :selected => EasySetting.value('issue_created_on_date_format').to_s)) %>
          </p>
          <p>
            <%= label_tag :easy_setting_issue_color_scheme_for, l(:label_issue_color_scheme_for) -%><%= select_tag('easy_setting[issue_color_scheme_for]', options_for_select([[l(:label_issue_priority), 'issue_priority'],[l(:label_issue_status),'issue_status'],[l(:label_tracker),'tracker']], EasySetting.value('issue_color_scheme_for'))) %>
          </p>
        </fieldset>
      </div>
      <div class="splitcontentright">
        <fieldset>
          <legend><%= l(:heading_issues_settings_behaviour) -%></legend>
          <p>
            <%= hidden_field_tag 'easy_setting[milestone_effective_date_from_issue_due_date]', false, :id => false %>
            <% box = check_box_tag 'easy_setting[milestone_effective_date_from_issue_due_date]', true, EasySetting.value('milestone_effective_date_from_issue_due_date') %>
            <%= label_tag( 'easy_setting[milestone_effective_date_from_issue_due_date]', box + l(:setting_milestone_effective_date_from_issue_due_date), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[enable_private_issues]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[enable_private_issues]', '1', EasySetting.value('enable_private_issues')) -%>
            <%= label_tag('easy_setting_enable_private_issues', box + l(:setting_enable_private_issues), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[allow_repeating_issues]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[allow_repeating_issues]', '1', EasySetting.value('allow_repeating_issues')) -%>
            <%= label_tag('easy_setting_allow_repeating_issues', box + l(:setting_allow_repeating_issues), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= setting_select :link_copied_issue, link_copied_issue_options %>
          </p>
          <p>
            <%= setting_select :cross_project_subtasks, cross_project_subtasks_options %>
          </p>
          <p>
            <%= setting_check_box :cross_project_issue_relations %>
          </p>
          <p>
            <%= setting_check_box :issue_group_assignment %>
          </p>
          <p>
            <%= setting_check_box :default_issue_start_date_to_creation_date %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[close_subtask_after_parent]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[close_subtask_after_parent]', '1', EasySetting.value('close_subtask_after_parent')) -%>
            <%= label_tag('easy_setting_close_subtask_after_parent', box + l(:setting_close_subtask_after_parent), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= setting_select :issue_done_ratio, Issue::DONE_RATIO_OPTIONS.collect {|i| [l("setting_issue_done_ratio_#{i}"), i]} %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[issue_set_done_after_close]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[issue_set_done_after_close]', '1', EasySetting.value('issue_set_done_after_close')) -%>
            <%= label_tag('easy_setting_issue_set_done_after_close', box + l(:setting_issue_set_done_after_close), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[issue_private_note_as_default]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[issue_private_note_as_default]', '1', EasySetting.value('issue_private_note_as_default')) -%>
            <%= label_tag('easy_setting_issue_private_note_as_default', box + l(:setting_issue_private_note_as_default), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= hidden_field_tag('easy_setting[skip_workflow_for_admin]', '0', :id => nil) -%>
            <% box = check_box_tag('easy_setting[skip_workflow_for_admin]', '1', EasySetting.value('skip_workflow_for_admin')) -%>
            <%= label_tag('easy_setting_skip_workflow_for_admin', box + l(:setting_skip_workflow_for_admin), :class => 'checkbox inline') %>
          </p>
          <p>
            <%= setting_text_field :issues_export_limit, :size => 6 %>
          </p>
          <p>
            <%= setting_text_field :gantt_items_limit, :size => 6 %>
          </p>
        </fieldset>
      </div>
    </div>
  </div>
  <fieldset class="box">
    <legend><%= l(:label_parent_task_attributes) %></legend>
    <div class="tabular settings">
      <p><%= setting_select :parent_issue_dates, parent_issue_dates_options, :label => "#{l(:field_start_date)} / #{l(:field_due_date)}" %></p>

      <p><%= setting_select :parent_issue_priority, parent_issue_priority_options, :label => :field_priority %></p>

      <p><%= setting_select :parent_issue_done_ratio, parent_issue_done_ratio_options, :label => :field_done_ratio %></p>
    </div>
  </fieldset>
  <%= call_hook(:view_settings_issues_form) %>
  <div class="form-actions">
    <%= submit_tag l(:button_save),:class => 'button-positive' %>
  </div>
<% end %>
