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

32 lines
1.3 KiB
Text
Raw Normal View History

2014-02-24 07:22:40 +00:00
<%#
# @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>
2014-02-24 07:22:40 +00:00
<span class="title">
2014-06-10 17:34:39 +00:00
<%= map.name %>
2014-02-24 07:22:40 +00:00
</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">
2014-06-10 17:34:39 +00:00
<%= map.desc %>
2014-02-24 07:22:40 +00:00
</div>
</div>
<span><%= pluralize(map.contributors.count, 'contributor') %></span><span>Last edit <%= time_ago_in_words( map.updated_at ) %> ago</span>
2014-02-24 07:22:40 +00:00
</div>
</div>
</div>
</a>
</figure>