<% content_for :head do %>
  <%= stylesheet_link_tag "application", :media => "all" %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
<% end %>

<% content_for :page_title, "Specialist Publisher" %>
<% content_for :app_title, "GOV.UK Specialist Publisher" %>

<% content_for :navbar_items do %>

<% end %>

<% content_for :content do %>

  <%= yield %>
  <script>
    $(document).ready(function() {
      <%= yield :document_ready %>
    });
  </script>
<% end %>

<%# use the govuk_admin_foundation layout %>
<%= render :template => 'layouts/govuk_admin_template' %>

<% content_for :head do %>
  <%= stylesheet_link_tag "application", :media => "all" %>
  <%= javascript_include_tag 'application' %>
  <%= csrf_meta_tags %>
<% end %>

<% content_for :page_title, "Specialist Publisher" %>
<% content_for :app_title, "GOV.UK Specialist Publisher" %>

<% content_for :navbar_items do %>
  <% if current_user.gds_editor? %>
    <li class="dropdown">
      <a href="#" class="dropdown-toggle" data-toggle="dropdown">
          <%= current_format.title.pluralize %>
        <span class="caret"></span>
      </a>
      <ul class="dropdown-menu" role="menu">
  <% end %>

  <% formats_user_can_access.each do |key, value| %>
    <li><%= link_to value.title.pluralize, documents_path(key) %></li>
  <% end %>

  <% if current_user.gds_editor? %>
      </ul>
    </li>
  <% end %>
<% end %>

<% content_for :content do %>

  <%= yield %>
  <script>
    $(document).ready(function() {
      <%= yield :document_ready %>
    });
  </script>
<% end %>

<%# use the govuk_admin_foundation layout %>
<%= render :template => 'layouts/govuk_admin_template' %>

Add a Finder navigation to the Header
Add a Finder navigation to the Header

If the User has the `gds_editor` permission it will render in a
dropdown, otherwise it will be rendered as a list of nav items.
