31 lines
1.3 KiB
Text
31 lines
1.3 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">
|
|
<%= map.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">
|
|
<%= map.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>
|