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

32 lines
1.6 KiB
Plaintext

<%#
# @file
# Shows a map as a card.
# I believe this is rendered on the profile pages.
# TODO: Am I correct?
# TODO: Is it rendered on any other pages?
#%>
<%= div_for map do %>
<% 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 %>
<p class="type">Map</p>
<%= image_tag 'map.png', :class => 'icon', :size => '50x50' %>
<span class="title">
<span><%=map.name %></span>
<a href="/maps/<%=map.id %>" class="topic-go-arrow">
<img class="topic-go-arrow"
title="Go to map"
src="/assets/go-arrow.png" />
</a>
<div class="clearfloat"></div>
</span>
<div class="contributor">
Added by: <a href="/users/<%=map.user.id %>" target="_blank"><%=map.user.name %>
</a>
</div>
<div class="scroll">
<div class="desc">
<p class="mapdata"><%= map.topics.count %> topics and <%= map.synapses.count %> synapses</p>
<p><%= map.desc %></p>
</div>
</div>
<% end %>