<div class="tabs tab-container entity-tabs">
  <ul>
    <% tabs.each do |tab| %>
      <li>
        <%= link_to tab[:label], 'javascript:void(0)', :onclick => tab[:trigger], :data => {'tab-id' => "tab-#{tab[:name]}"} %>
      </li>
    <% end %>
  </ul>
</div>

<div class="entity-tabs-content">
  <% tabs.each do |tab| %>
    <div class="tab-<%= tab[:name] %>-content hidden">
      <% if tab[:partial] %>
        <%= render tab[:partial], tab[:partial_locals] %>
      <% end %>
    </div>
  <% end %>
</div>

<script type="text/javascript">
  $(document).ready(function(){
    EntityTabs.init("<%= tabs_container.to_s %>");
  });
</script>