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

37 lines
2.2 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>
2014-08-02 02:50:23 +00:00
<a href="/maps/<%= map.id %>" class="linkItem topicPopout"></a>
2014-02-10 04:36:23 +00:00
<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 %>