31 lines
1.5 KiB
Text
31 lines
1.5 KiB
Text
<%#
|
|
# @file
|
|
# Shows a map as a card.
|
|
# Any list of maps uses this rendering.
|
|
#%>
|
|
<figure class="map <%= first ? "current" : "" %>">
|
|
<a href="/maps/<%= map.id %>">
|
|
<div class="permission <%= map.authorize_to_edit(user) ? "canEdit" : "cannotEdit" %>">
|
|
|
|
<div class="mapCard">
|
|
<div class="mapPerm <%= map.mk_permission %>"></div>
|
|
<span class="title">
|
|
<%= best_in_place map, :name, :type => :input, :classes => 'best_in_place_name' %>
|
|
</span>
|
|
<div class="mapContains">
|
|
<span class="topicCount"><%= pluralize(map.topics.count, 'topic') %></span>
|
|
<span class="synapseCount"><%= pluralize(map.synapses.count, 'synapse') %></span>
|
|
</div>
|
|
<div class="littleOverlay">
|
|
<div class="scroll">
|
|
<div class="desc">
|
|
<%= best_in_place map, :desc, :type => :textarea, :nil => "<span class='gray'>Click to add description.</span>", :classes => 'best_in_place_desc' %>
|
|
</div>
|
|
</div>
|
|
<span><%= pluralize(map.contributors.count, 'contributor') %></span><span>Last edit <%= time_ago_in_words( map.updated_at ) %> ago</span>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</a>
|
|
</figure>
|