<%# # 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' %>
<% relevantPeople = @map.permission == "commons" ? @map.contributors : @map.editors %> <% if relevantPeople.count == 0 %> <% elsif relevantPeople.count == 1 %> <% elsif relevantPeople.count == 2 %> <% elsif relevantPeople.count > 2 %> <% end %> <%= relevantPeople.count %>
<% if @map.user == current_user %>
<% end %>
<%= @map.topics.count %>
<%= @map.synapses.count %>
As the creator, you can change the permission of this map, and the permission of all the topics and synapses you have authority to change will change as well.
<% 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 %>