<% tabs = project_settings_tabs %>
<div id="project-settings-edit-container">
  <% if in_mobile_view? %>
    <%= title l(:label_settings) %>
    <%= render_tabs tabs %>
  <% else %>
    <% tab = (params[:tab] && tabs.detect { |t| t[:name] == params[:tab] }) || {} %>
    <%= title "#{l(:label_settings)} - #{l(tab[:label], default: '')}" %>
    <%= render_tabs(tabs, params[:tab], { hide_tabs: true }) %>
  <% end %>
</div>

<script type="text/javascript">
  $(window).load(function() {
    if (typeof project_settings_tabs_after_render == 'function') {
      project_settings_tabs_after_render();
    }
  });
</script>
<% content_for :header_tags do %>
  <%= javascript_include_tag 'cocoon' %>
<% end %>
