<h2><%= @datatemplate.name%></h2>
<div id="template">
  <div id="template-settings">
    <%= link_to l('label_easy_data_template_import.settings.new'), {}, :onclick => 'toggle_settings();return false;' %>
  </div>
  <div id="show_settings" style="display:<%= @show_settings == '0' ? 'none' : 'block'-%>">
    <%= render :partial => 'easy_data_templates/settings', :locals => {:datatemplate => @datatemplate, :show_settings => @show_settings} %>
  </div>
  <br />
  <div id="template-assignments">
    <%= link_to l('label_easy_data_template_import.assignments.new'), {}, :onclick => 'toggle_assignment();return false;' %>
  </div>
  <div id="show_assignment" style="display:<%= @show_assignment == '0' ? 'none' : 'block'-%>">
    <%= render :partial => 'easy_data_template_assignments/assignments', :locals => {:datatemplate => @datatemplate, :datatemplatesassignment => @datatemplatesassignment, :show_assignment => @show_assignment} %>
  </div>
  <br />
  <% unless @csv_data.blank? %>
    <div id="preview">
      <%= render(:partial => 'easy_data_templates/preview', :locals => {:datatemplate => @datatemplate, :csv_data => @csv_data, :my_errors=>@my_errors}) %>
    </div>
    <div id="export_file" align="center">
      <%= form_tag({:controller => 'easy_data_templates', :action => 'export_data', :format => :csv}, {:multipart => true}) do %>
        <%= hidden_field_tag 'id', @datatemplate.id %>
        <%= submit_tag l(:button_easy_data_template_export_data) %>
      <% end %>
    </div>
  <% end %>
</div>

<% ### PAGE CUSTOMS ########################################################## %>
<% content_for :easy_page_layout_service_box_primary_actions do %>
  <%= link_to(l(:button_back), { :controller => 'easy_data_templates', :action => 'index'}, :class => 'icon icon-back') -%>
<% end %>

<% content_for :header_tags do %>
  <%= stylesheet_link_tag '/plugin_assets/easy_data_templates/stylesheets/easy_data_templates' %>
  <%= javascript_include_tag '/plugin_assets/easy_data_templates/javascripts/easy_data_templates' %>
<% end %>
