<%# # @file # Shows a map as a card. # Any list of maps uses this rendering. #%> <%= div_for map do %> <% if map.authorize_to_edit(user) %>
<% end %> <% if map.user == user %><%= link_to 'Delete', map_path(map), :class => 'delete', :confirm => 'Delete this map (nodes and synapses will remain)?', :method => :delete, :remote => true %><% end %>

Map

<%= image_tag 'map.png', :class => 'icon', :size => '50x50' %>
<%= map.mk_permission %>
<% if map.user == user %>
Permissions:  <%= best_in_place map, :permission, :type => :select, :collection => [['commons', 'commons'], ['public','public'], ['private','private']], :classes => 'best_in_place_permission' %>
<% end %>
<%= best_in_place map, :name, :type => :input, :classes => 'best_in_place_name' %>
Added by: <%=map.user.name %>

<%= map.topics.count %> topics and <%= map.synapses.count %> synapses

<%= best_in_place map, :desc, :type => :textarea, :nil => "Click to add description.", :classes => 'best_in_place_desc' %>

<% if map.authorize_to_edit(user) %>
<% end %> <% end %>