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

48 lines
No EOL
1.4 KiB
Text

<div class="focus">
<div class="focusleft">
<p># of Topics: <%= @map.items.count %></p>
<p># of Synapses: <%= @map.synapses.count %></p>
<% if (@map.permission == "commons" && authenticated?) || @map.user == user %>
<%= form_for @map, :url => savelayout_path(@user,@map), :html => { :class => "saveMapLayout", :id => "saveMapLayout"}, remote: true do |form| %>
<%= form.hidden_field "coordinates", :value => "" %>
<%= form.submit "Save Layout", class: "saveLayout", id: "saveLayout" %>
<% end %>
<% end %>
</div>
<div class="focusmiddle">
<h1 class="title"><%= @map.name %> <% if (@map.permission == "commons" && authenticated?) || @map.user == user %><%= link_to "[edit]", edit_user_map_path(@user, @map) %><% end %></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>
viewMode = "graph";
json = <%= @mapjson %>;
if (json.length > 0) {
$(document).ready(function() {
<% if (@map.arranged) %>
initialize("arranged");
<% else %>
initialize("chaotic");
<% end %>
});
}
</script>
<%= render :partial => 'newtopic' %>
<%= render :partial => 'newsynapse' %>