<%# # Partial rendering form for a new topic on a map # This code is called when viewing a metamap in show.html.erb in the views/maps folder #%>
<%= @map && policy(@map).update? ? " canEdit" : "" %> <%= @map && @map.permission != 'private' ? " shareable" : "" %>"> <% if @map %>
<%= best_in_place @map, :name, :as => :textarea, :activator => "#mapInfoName", :class => 'best_in_place_name' %>
<% if @map.contributors.count == 0 %> <% elsif @map.contributors.count == 1 %> <% elsif @map.contributors.count == 2 %> <% elsif @map.contributors.count > 2 %> <% end %> <%= @map.contributors.count %>
    <% @map.contributors.each_with_index do |c, index| %>
  • <%= c.name %>
  • <% end %>
<%= @map.topics.count %>
<%= @map.synapses.count %>
As the creator, you can change the permission of this map, but the permissions of the topics and synapses on it must be changed independently.
<% if (authenticated? && policy(@map).update?) || (!authenticated? && @map.desc != "" && @map.desc != nil )%> <%= best_in_place @map, :desc, :activator => "#mapInfoDesc", :as => :textarea, :placeholder => "Click to add description...", :class => 'best_in_place_desc' %> <% end %>

Created by: <%= @map.user == user ? "You" : @map.user.name %> on <%= @map.created_at.strftime("%m/%d/%Y") %>

Last edited: <%= @map.updated_at.strftime("%m/%d/%Y") %>

Delete
Share
<% end %>