<%= form_for @environment, :url => (@environment.new_record? ? environments_path : environment_path(:id => @environment)) do |f| %>
  <%= base_errors_for @environment %>
  <% if show_taxonomy_tabs? %>
    <ul class="nav nav-tabs" data-tabs="tabs">
      <li class="active"><a href="#primary" data-toggle="tab"><%= _('Primary') %></a></li>
      <% if show_location_tab? %>
        <li><a href="#locations" data-toggle="tab"><%= _('Locations') %></a></li>
      <% end %>
      <% if show_organization_tab? %>
        <li><a href="#organizations" data-toggle="tab"><%= _('Organizations') %></a></li>
      <% end %>
    </ul>

    <div class="tab-content">

      <div class="tab-pane active" id="primary">
        <%= text_f f, :name %>
      </div>

      <%= render 'taxonomies/loc_org_tabs', :f => f, :obj => @environment %>
    </div>

  <% else %>
    <%= text_f f, :name %>
  <% end %>

  <%= submit_or_cancel f %>
<% end %>
