metamaps--metamaps/app/views/maps/_map.html.erb
2014-06-04 15:24:16 -04:00

36 lines
2.3 KiB
Text

<%#
# @file
# Shows a map as a card.
# Any list of maps uses this rendering.
#%>
<%= div_for map do %>
<div class="permission <%= map.authorize_to_edit(user) ? "canEdit" : "cannotEdit" %>">
<div class="mapCard">
<span class="title">
<%= best_in_place map, :name, :type => :textarea, :classes => 'best_in_place_name' %>
</span>
<div class="links">
<div class="linkItem icon">
<div class="metacodeImage" style="background-image:url(/assets/map.png);"></div>
</div>
<div class="linkItem contributor hoverForTip">
<div class="tip">Created by <%= map.user.name %> on <%= map.created_at.strftime("%m/%d/%Y") %></div>
</div>
<div class="linkItem topicCount"><%= map.topics.count %></div>
<div class="linkItem synapseCount"><%= map.synapses.count %></div>
<div class="linkItem mapPerm <%= map.mk_permission %>"></div>
<a href="/maps/<%= map.id %>" class="linkItem topicPopout" title="Open Map in New Tab" target="_blank"></a>
<div class="clearfloat"></div>
</div>
<div class="scroll">
<div class="desc">
<%= best_in_place map, :desc, :type => :textarea, :nil => "Click to add description.", :classes => 'best_in_place_desc' %>
<div class="clearfloat"></div>
</div>
</div>
<div class="clearfloat"></div>
</div>
</div>
<% end %>