57 lines
2 KiB
Text
57 lines
2 KiB
Text
<%#
|
|
# @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="<%= authenticated? ? "authenticated" : "unauthenticated" %>">
|
|
|
|
<% if devise_error_messages? %>
|
|
<p id="toast"><%= devise_error_messages! %></p>
|
|
<% elsif notice %>
|
|
<p id="toast"><%= notice %></p>
|
|
<% end %>
|
|
|
|
<%= content_tag :div, class: "main" do %>
|
|
|
|
<% classes = action_name == "home" ? "homePage" : ""
|
|
classes += action_name == "home" && authenticated? ? " explorePage" : ""
|
|
classes += controller_name == "maps" && action_name == "index" ? " explorePage" : ""
|
|
if controller_name == "maps" && action_name == "show"
|
|
classes += " mapPage"
|
|
if policy(@map).update?
|
|
classes += " canEditMap"
|
|
end
|
|
if @map.permission == "commons"
|
|
classes += " commonsMap"
|
|
end
|
|
end
|
|
classes += controller_name == "topics" && action_name == "show" ? " topicPage" : ""
|
|
%>
|
|
|
|
<div class="wrapper <%= classes %>" id="wrapper">
|
|
|
|
<%= render :partial => 'layouts/upperelements', :locals => { :appsPage => false } %>
|
|
|
|
<%= yield %>
|
|
|
|
<div class="showcard mapElement mapElementHidden" id="showcard"></div> <!-- the topic card -->
|
|
<% if authenticated? %>
|
|
<% # for creating and pulling in topics and synapses %>
|
|
<%= render :partial => 'maps/newtopic' %>
|
|
<%= render :partial => 'maps/newsynapse' %>
|
|
<% # for populating the change metacode list on the topic card %>
|
|
<%= render :partial => 'shared/metacodeoptions' %>
|
|
<% end %>
|
|
<%= render :partial => 'layouts/lowermapelements' %>
|
|
|
|
<div id="exploreMapsHeader"></div>
|
|
<div id="loading"></div>
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<%= render :partial => 'layouts/foot' %>
|