<%# # 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 #%> <% if @map %>
<%= @map.authorize_to_edit(user) ? " canEdit" : "" %>">
<%= best_in_place @map, :name, :type => :input, :classes => 'best_in_place_name' %>
<%= @map.contributors.count %> <% contributorList = '' @map.contributors.each_with_index do |c, index| comma = (index+1) == @map.contributors.count ? '' : ', ' contributorList += c.name + comma end if @map.contributors.count == 0 contributorList = 'No one has added anything yet.' end %>
<%= contributorList %>
<%= @map.topics.count %>
<%= @map.synapses.count %>
<% if @map.user == user %>
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.
<% end %>
<% if (authenticated? && @map.authorize_to_edit(user)) || (!authenticated? && @map.desc != "" && @map.desc != nil )%>
<%= best_in_place @map, :desc, :type => :textarea, :nil => "Click to add description.", :classes => '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") %>

<% if @map.user == user %> <%= link_to 'Delete', map_path(@map), :class => 'delete', :confirm => 'Delete this map (nodes and synapses will remain)?', :method => :delete, :data => { :bypass => 'true'} %> <% end %>
<% else %>
{{name}}
{{contributor_count}}
{{contributor_list}}
{{topic_count}}
{{synapse_count}}
{{map_creator_tip}}
{{desc}}

Created by {{user_name}} on {{created_at}}

Last edited {{updated_at}}

{{delete}}
<% end %>