2016-02-03 21:38:41 +08: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-24 21:26:07 -07:00
|
|
|
<%= render :partial => 'layouts/head' %>
|
2016-10-28 10:55:04 +08:00
|
|
|
<body class="<%= authenticated? ? "authenticated" : "unauthenticated" %> controller-<%= controller_name %> action-<%= action_name %>">
|
2017-03-11 01:49:27 -05:00
|
|
|
<%= content_tag :div, class: "main", id: "react-app" do %>
|
|
|
|
<%= yield %>
|
|
|
|
<%= render :partial => 'layouts/mobilemenu' %>
|
2016-02-03 21:38:41 +08:00
|
|
|
<% end %>
|
2017-03-11 01:49:27 -05:00
|
|
|
<% if devise_error_messages? %>
|
|
|
|
<%= devise_error_messages! %>
|
|
|
|
<% end %>
|
|
|
|
<% if notice %>
|
|
|
|
<%= notice %>
|
|
|
|
<% end %>
|
|
|
|
<% if alert %>
|
|
|
|
<%= alert %>
|
|
|
|
<% end %>
|
|
|
|
<% if authenticated? %>
|
|
|
|
<% # for creating and pulling in topics and synapses %>
|
|
|
|
<% if controller_name == 'maps' && action_name == "conversation" %>
|
|
|
|
<%= render :partial => 'maps/newtopicsecret' %>
|
|
|
|
<% else %>
|
|
|
|
<%= render :partial => 'maps/newtopic' %>
|
|
|
|
<% end %>
|
|
|
|
<%= render :partial => 'maps/newsynapse' %>
|
|
|
|
<% # for populating the change metacode list on the topic card %>
|
|
|
|
<%= render :partial => 'shared/metacodeoptions' %>
|
2017-03-11 21:13:58 -05:00
|
|
|
<script type="text/javascript">
|
|
|
|
Metamaps.ServerData.unreadNotificationsCount = <%= user_unread_notification_count %>
|
|
|
|
Metamaps.ServerData.mapIsStarred = <%= @map && current_user.starred_map?(@map) ? true : false %>
|
|
|
|
</script>
|
2017-03-11 01:49:27 -05:00
|
|
|
<% end %>
|
|
|
|
<div id="loading"></div>
|
2016-03-24 21:26:07 -07:00
|
|
|
<%= render :partial => 'layouts/foot' %>
|