2012-11-03 17:34:38 +00:00
|
|
|
<% if @map %>
|
2012-10-28 18:37:46 +00:00
|
|
|
<div class="focus">
|
|
|
|
<div class="focusleft">
|
|
|
|
<p># of Topics: <%= @map.items.count %></p>
|
|
|
|
<p># of Synapses: <%= @map.synapses.count %></p>
|
|
|
|
</div>
|
|
|
|
<div class="focusmiddle">
|
|
|
|
<h1 class="title"><%= @map.name %></h1>
|
|
|
|
<div class="desc">
|
|
|
|
<p><%= @map.desc %></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="focusright">
|
|
|
|
<div class="link"><p>Permissions:<%= @map.permission %></p></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfloat nodemargin"></div>
|
|
|
|
|
|
|
|
<div class="maps" id="container">
|
|
|
|
<div id="center-container">
|
|
|
|
<div id="infovis"></div>
|
|
|
|
</div>
|
|
|
|
<div id="showcard">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
json = <%= @mapjson %>;
|
|
|
|
if (json.length > 0) {
|
|
|
|
$(document).ready(function() {
|
2012-12-03 23:50:38 +00:00
|
|
|
<% if (@map.arranged) %>
|
2012-12-14 18:31:39 +00:00
|
|
|
initialize("arranged");
|
2012-12-03 23:50:38 +00:00
|
|
|
<% else %>
|
2012-12-14 18:31:39 +00:00
|
|
|
initialize("chaotic");
|
2012-12-03 23:50:38 +00:00
|
|
|
<% end %>
|
2012-10-28 18:37:46 +00:00
|
|
|
});
|
2012-12-04 00:21:06 +00:00
|
|
|
|
2012-10-28 18:37:46 +00:00
|
|
|
}
|
2012-11-03 17:34:38 +00:00
|
|
|
</script>
|
|
|
|
|
2012-12-14 18:31:39 +00:00
|
|
|
<% elsif @items %>
|
|
|
|
<div class="maps" id="container">
|
|
|
|
<div id="center-container">
|
|
|
|
<div id="infovis"></div>
|
|
|
|
</div>
|
|
|
|
<div id="showcard">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfloat"></div>
|
|
|
|
<script>
|
|
|
|
json = <%= @items %>;
|
|
|
|
if (json.length > 0) {
|
|
|
|
$(document).ready(function() {
|
|
|
|
initialize("chaotic");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
2012-11-03 17:34:38 +00:00
|
|
|
<% else %>
|
|
|
|
<h1><br>Shucks, there are no maps.<h1>
|
|
|
|
<% end %>
|