2013-01-11 23:49:59 +00:00
|
|
|
<%#
|
|
|
|
# @file
|
|
|
|
# Code to display a map
|
2013-01-23 18:55:50 +00:00
|
|
|
# /maps/:id
|
2013-01-11 23:49:59 +00:00
|
|
|
#%>
|
2013-07-09 16:32:13 +00:00
|
|
|
|
|
|
|
<% 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">
|
|
|
|
<img src="/assets/MMCCicon_realtime_blue.png" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2014-01-31 00:32:15 +00:00
|
|
|
<% if authenticated? %>
|
2014-02-09 15:05:32 +00:00
|
|
|
<% if @map.permission == "commons" || @map.user == user %>
|
|
|
|
<div class="sidebarSave">
|
2014-02-21 01:22:13 +00:00
|
|
|
<div class="sidebarSaveIcon hoverForTip">
|
|
|
|
<div class="tip">Save Layout</div>
|
|
|
|
</div>
|
2014-02-09 15:05:32 +00:00
|
|
|
<div class="sidebarSaveBox"></div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-03-03 11:05:59 +00:00
|
|
|
<div class="sidebarFork">
|
|
|
|
<div class="sidebarForkIcon hoverForTip">
|
|
|
|
<div class="tip">Save To New Map</div>
|
|
|
|
</div>
|
|
|
|
<div class="sidebarForkBox"></div>
|
2014-02-21 01:22:13 +00:00
|
|
|
</div>
|
2014-03-03 11:05:59 +00:00
|
|
|
<% if @map.permission == "commons" || @map.user == user %>
|
|
|
|
<div class="sidebarCollaborate">
|
2014-06-11 20:47:46 +00:00
|
|
|
<div class="sidebarCollaborateIcon"></div>
|
2014-03-03 11:05:59 +00:00
|
|
|
<div class="sidebarCollaborateBox">
|
2014-06-11 20:47:46 +00:00
|
|
|
<h3 class="realtimeBoxTitle">Realtime: </h3>
|
|
|
|
<span class="realtimeOnOff rtOff">OFF</span>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
<div class="realtimeMapperList">
|
|
|
|
<ul>
|
|
|
|
<li class="rtMapper littleRtOff rtMapperSelf">
|
|
|
|
<%= user.name %> (me)
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2014-03-03 11:05:59 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2014-01-31 00:32:15 +00:00
|
|
|
<% end %>
|
2014-02-03 05:35:21 +00:00
|
|
|
<div class="sidebarFilter <%= authenticated? ? 'loggedin' : 'loggedout' %>">
|
2014-02-01 08:57:19 +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 => 'main/filterbymetacode' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-01-06 23:40:48 +00:00
|
|
|
|
2014-01-29 03:46:58 +00:00
|
|
|
<div class="index">
|
2014-02-05 05:03:44 +00:00
|
|
|
<div class="openCheatsheet openLightbox" data-open="cheatsheet"></div>
|
2014-01-29 03:46:58 +00:00
|
|
|
<span><img width="35" height="35" src="/assets/map.png"></span>
|
|
|
|
<span class="mapName"><%= @map.name %></span>
|
|
|
|
<span class="mapInfo"></span>
|
|
|
|
<div class="clearfloat"></div>
|
2014-02-04 01:43:31 +00:00
|
|
|
<%= render :partial => 'maps/mapinfobox' %>
|
2014-01-29 03:46:58 +00:00
|
|
|
</div>
|
2012-10-26 10:04:52 +00:00
|
|
|
|
2013-01-05 02:39:16 +00:00
|
|
|
<div class="maps onMap" id="container">
|
2012-10-26 10:04:52 +00:00
|
|
|
<div id="center-container">
|
|
|
|
<div id="infovis"></div>
|
|
|
|
</div>
|
2013-03-17 09:18:30 +00:00
|
|
|
<div class="showcard" id="showcard"></div>
|
2012-10-26 10:04:52 +00:00
|
|
|
</div>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
|
2013-01-05 02:39:16 +00:00
|
|
|
<% if authenticated? %>
|
2014-06-04 19:24:16 +00:00
|
|
|
|
|
|
|
<% # add these if you have edit permissions on the map %>
|
2014-03-03 11:05:59 +00:00
|
|
|
<% if @map.permission == "commons" || @map.user == user %>
|
2014-06-04 19:24:16 +00:00
|
|
|
|
|
|
|
<% # for creating and pulling in topics and synapses %>
|
2014-03-03 11:05:59 +00:00
|
|
|
<%= render :partial => 'newtopic' %>
|
|
|
|
<%= render :partial => 'newsynapse' %>
|
2014-06-04 19:24:16 +00:00
|
|
|
|
|
|
|
<% # for saving the layout of the map %>
|
|
|
|
<%= form_for @map, :url => savelayout_path(@map), :html => { :class => "saveMapLayout", :id => "saveMapLayout"}, remote: true do |form| %>
|
2014-01-31 00:32:15 +00:00
|
|
|
<%= form.hidden_field "coordinates", :value => "" %>
|
2014-06-04 19:24:16 +00:00
|
|
|
<% end %>
|
|
|
|
|
2014-01-31 00:32:15 +00:00
|
|
|
<% end %>
|
2014-06-04 19:24:16 +00:00
|
|
|
|
|
|
|
<% # for populating the change metacode list on the topic card %>
|
|
|
|
<%= render :partial => 'main/metacodeoptions' %>
|
2013-01-05 02:39:16 +00:00
|
|
|
<% end %>
|
2014-06-04 19:24:16 +00:00
|
|
|
|
|
|
|
|
2013-01-05 02:39:16 +00:00
|
|
|
<script>
|
2014-07-27 19:57:35 +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 %>;
|
2014-01-29 03:46:58 +00:00
|
|
|
</script>
|