cartodb/app/views/shared/_mapcard.html.erb
2020-06-15 10:58:47 +08:00

29 lines
1.3 KiB
Plaintext

<li class="MapsList-item">
<div class="MapCard MapCard--squared MapCard-borderless" data-zoom="<%= vis[:map_zoom] %>" data-vis-id="<%= vis[:id] %>" data-vis-owner-name="<%= vis[:owner].username %>">
<a href="<%= CartoDB.url(self, 'public_visualizations_public_map', params: { id: vis[:id] }, user: vis[:owner]) %>" class="MapCard-header js-header">
<div class="MapCard-loader"></div>
</a>
<div class="MapCard-content">
<div class="MapCard-contentBody">
<div class="MapCard-contentBodyRow MapCard-contentBodyRow--flex">
<h3 class="MapCard-title DefaultTitle CDB-Text is-semibold CDB-Size-large">
<a href="<%= CartoDB.url(self, 'public_visualizations_public_map', params: { id: vis[:id] }, user: vis[:owner]) %>" class="DefaultTitle-link u-ellipsLongText" title="<%= vis[:title] %>"><%= vis[:title] %></a>
</h3>
</div>
</div>
<div class="MapCard-contentFooter CDB-Size-medium u-altTextColor">
<div class="MapCard-contentFooterDetails--left">
<div class="MapCard-contentFooterTimeDiff DefaultTimeDiff CDB-Text CDB-Size-medium u-altTextColor">
<i class="CDB-IconFont CDB-IconFont-clock DefaultTimeDiff-icon"></i>
<%= time_ago_in_words(vis[:updated_at]) %> ago
</div>
</div>
</div>
</div>
</div>
</li>