<%#
# @file
# Main application file. Holds scaffolding present on every page.
# Then a certain non-partial view (no _ preceding filename) will be
# displayed within, based on URL
#%>

<%= render :partial => 'layouts/head' %>
<body class="<%= current_user ? 'authenticated' : 'unauthenticated' %>">
  <div class="main" id="react-app"></div>
  <%= yield %>
  <div id="exploreMapsHeader">
      <div class="exploreMapsBar exploreElement">
          <div class="exploreMapsMenu">
              <div class="exploreMapsCenter">
                <% if current_user && current_user.admin %>
                  <a href="<%= oauth_applications_path %>" class="activeMaps exploreMapsButton <%= params[:controller] == 'doorkeeper/applications' ? 'active' : nil %>">
                      <div class="exploreMapsIcon"></div>Registered Apps
                  </a>
                <% end %>
                  <a href="<%= oauth_authorized_applications_path %>" class="authedApps exploreMapsButton <%= params[:controller] == 'doorkeeper/authorized_applications' ? 'active' : nil %>">
                      <div class="exploreMapsIcon"></div>Authorized Apps
                  </a>
                  <a href="/" class="myMaps exploreMapsButton">
                      <div class="exploreMapsIcon"></div>Maps
                  </a>
              </div>
          </div>
      </div>
  </div>
<%= render :partial => 'layouts/foot' %>
