metamaps--metamaps/app/views/maps/show.html.erb

82 lines
2.4 KiB
Text
Raw Normal View History

<%#
2014-07-31 01:10:10 +00:00
# @file
# Code to display a map
# /maps/:id
#%>
<% content_for :title, @map.name + " | Metamaps" %>
2013-01-06 23:40:48 +00:00
2014-06-11 20:47:46 +00:00
<div id="preloaded-images">
2014-07-31 01:10:10 +00:00
<img src="/assets/MMCCicon_realtime_blue.png" />
2014-06-11 20:47:46 +00:00
</div>
2014-07-31 01:10:10 +00:00
<% if authenticated? %>
2014-07-31 01:10:10 +00:00
<div class="sidebarFork">
<div class="sidebarForkIcon">
</div>
<div class="sidebarForkBox"></div>
2014-07-31 01:10:10 +00:00
</div>
<% if @map.permission == "commons" || @map.user == user %>
<div class="sidebarCollaborate">
<div class="sidebarCollaborateIcon blue"></div>
<div class="sidebarCollaborateBox">
2014-06-11 20:47:46 +00:00
<h3 class="realtimeBoxTitle">Realtime: </h3>
2014-07-29 17:34:10 +00:00
<span class="realtimeOnOff rtOn">ON</span>
2014-06-11 20:47:46 +00:00
<div class="clearfloat"></div>
<div class="realtimeMapperList">
<ul>
2014-07-29 17:34:10 +00:00
<li class="rtMapper littleRtOn rtMapperSelf">
2014-06-11 20:47:46 +00:00
<%= user.name %> (me)
</li>
</ul>
</div>
</div>
2014-07-31 01:10:10 +00:00
</div>
<% end %>
<% end %>
<div class="sidebarFilter <%= authenticated? ? 'loggedin' : 'loggedout' %>">
2014-07-31 01:10:10 +00:00
<div class="sidebarFilterIcon"></div>
<div class="sidebarFilterBox">
<h3 class="filterByMetacode">Filter By Metacode</h3><span class="showAll">all</span><span class="hideAll">none</span>
<div class="clearfloat"></div>
<%= render :partial => 'shared/filterbymetacode' %>
</div>
</div>
2013-01-06 23:40:48 +00:00
<div class="index">
2014-07-31 01:10:10 +00:00
<div class="openCheatsheet openLightbox" data-open="cheatsheet"></div>
<span class="mapInfo"></span>
<div class="clearfloat"></div>
<%= render :partial => 'maps/mapinfobox' %>
</div>
<div class="maps onMap" id="container">
2014-07-31 01:10:10 +00:00
<div id="center-container">
<div id="infovis"></div>
</div>
<div class="showcard" id="showcard"></div>
</div>
<div class="clearfloat"></div>
<% if authenticated? %>
2014-07-31 01:10:10 +00:00
<% # add these if you have edit permissions on the map %>
<% if @map.permission == "commons" || @map.user == user %>
<% # for creating and pulling in topics and synapses %>
<%= render :partial => 'newtopic' %>
<%= render :partial => 'newsynapse' %>
<% end %>
2014-07-31 01:10:10 +00:00
<% # for populating the change metacode list on the topic card %>
<%= render :partial => 'shared/metacodeoptions' %>
<% end %>
<script>
2014-07-31 01:10:10 +00:00
Metamaps.Active.Map = <%= @map.to_json.html_safe %>;
Metamaps.Metacodes = <%= @allmetacodes.to_json.html_safe %>;
Metamaps.Topics = <%= @alltopics.to_json.html_safe %>;
Metamaps.Synapses = <%= @allsynapses.to_json.html_safe %>;
Metamaps.Mappings = <%= @allmappings.to_json.html_safe %>;
</script>