<section class="viewblock">
  <header class="viewblock-header" id="template-header">
    <h1 class="default-padding"><%= t '.template_type' , type: @type.capitalize %></h1>
  </header>
  <div class="viewblock-cont">
    <div class="subnav clearfix">
      <ul class="nav nav-tabs">
        <li<% if @type == "import" %> class="active"<% end %>><%= link_to t('templates.import_existing'), new_template_path(type: "import") %></li>
        <li<% if @type == "create" %> class="active"<% end %>><%= link_to t('templates.from_scratch'), new_template_path(type: "create") %></li>
      </ul>
    </div>

    <% if @type == "create" %>
      <%= render partial: 'templates/create_form', locals: { button_text: t(:create_model, model: ::Template.model_name.human), template: @template } %>
    <% else %>
      <%= render partial: 'templates/import_form', locals: { button_text: t(:import_model, model: ::Template.model_name.human), template: @template } %>
    <% end %>
  </div>
</section>
