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

37 lines
2.3 KiB
Text
Raw Normal View History

<%#
# @file
# Shows a map as a card.
# Any list of maps uses this rendering.
#%>
<%= div_for map do %>
2014-02-10 04:36:23 +00:00
<div class="permission <%= map.authorize_to_edit(user) ? "canEdit" : "cannotEdit" %>">
2014-02-10 04:36:23 +00:00
<div class="mapCard">
<span class="title">
<%= best_in_place map, :name, :type => :textarea, :classes => 'best_in_place_name' %>
2014-02-10 04:36:23 +00:00
</span>
<div class="links">
<div class="linkItem icon">
<div class="metacodeImage" style="background-image:url(/assets/map.png);"></div>
</div>
2014-02-10 06:29:02 +00:00
<div class="linkItem contributor hoverForTip">
<div class="tip">Created by <%= map.user.name %> on <%= map.created_at.strftime("%m/%d/%Y") %></div>
2014-02-10 04:36:23 +00:00
</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' %>
2014-02-10 04:36:23 +00:00
<div class="clearfloat"></div>
</div>
</div>
<div class="clearfloat"></div>
2013-01-08 00:57:04 +00:00
</div>
2014-02-10 04:36:23 +00:00
</div>
<% end %>