2016-02-03 13:38:41 +00:00
|
|
|
<%#
|
|
|
|
# @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
|
|
|
|
#%>
|
|
|
|
|
2016-03-25 04:26:07 +00:00
|
|
|
<%= render :partial => 'layouts/head' %>
|
2016-02-03 13:38:41 +00:00
|
|
|
|
2016-10-28 02:55:04 +00:00
|
|
|
<body class="<%= authenticated? ? "authenticated" : "unauthenticated" %> controller-<%= controller_name %> action-<%= action_name %>">
|
2016-02-03 13:38:41 +00:00
|
|
|
|
2016-10-19 17:39:57 +00:00
|
|
|
<a class='feedback-icon' target='_blank' href='https://hylo.com/c/metamaps'></a>
|
2016-02-03 13:38:41 +00:00
|
|
|
|
|
|
|
<%= 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" : ""
|
2016-03-25 04:26:07 +00:00
|
|
|
if controller_name == "maps" && action_name == "show"
|
2016-02-03 13:38:41 +00:00
|
|
|
classes += " mapPage"
|
2016-03-11 22:54:23 +00:00
|
|
|
if policy(@map).update?
|
2016-02-03 13:38:41 +00:00
|
|
|
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">
|
2016-03-25 04:26:07 +00:00
|
|
|
|
2016-03-25 00:16:27 +00:00
|
|
|
<%= render :partial => 'layouts/upperelements', :locals => { :appsPage => false } %>
|
2016-02-03 13:38:41 +00:00
|
|
|
|
|
|
|
<%= 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' %>
|
|
|
|
|
2016-08-22 01:02:49 +00:00
|
|
|
<div id="explore"></div>
|
2016-08-14 16:50:44 +00:00
|
|
|
|
2016-08-01 17:38:57 +00:00
|
|
|
<div id="instructions">
|
|
|
|
<div class="addTopic">
|
|
|
|
Double-click to<br>add a topic!
|
|
|
|
</div>
|
|
|
|
<div class="tabKey">
|
|
|
|
Use Tab & Shift+Tab to select a metacode
|
|
|
|
</div>
|
|
|
|
<div class="enterKey">
|
|
|
|
Press Enter to add the topic
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-08-10 18:06:28 +00:00
|
|
|
|
2016-08-14 16:50:44 +00:00
|
|
|
<div id="infovis"></div>
|
|
|
|
<%= render :partial => 'layouts/mobilemenu' %>
|
|
|
|
|
2016-08-10 18:06:28 +00:00
|
|
|
<p id="toast" class="toast">
|
|
|
|
<% if devise_error_messages? %>
|
|
|
|
<%= devise_error_messages! %>
|
2016-11-25 19:34:09 +00:00
|
|
|
<% end %>
|
|
|
|
<% if notice %>
|
2016-08-10 18:06:28 +00:00
|
|
|
<%= notice %>
|
|
|
|
<% end %>
|
2016-11-25 19:34:09 +00:00
|
|
|
<% if alert %>
|
|
|
|
<%= alert %>
|
|
|
|
<% end %>
|
2016-08-10 18:06:28 +00:00
|
|
|
</p>
|
2016-02-03 13:38:41 +00:00
|
|
|
<div id="loading"></div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
2016-03-25 04:26:07 +00:00
|
|
|
<%= render :partial => 'layouts/foot' %>
|