cartodb-4.42/app/views/admin/pages/shared/_mapcard.html.erb
2024-04-06 05:25:13 +00:00

46 lines
2.2 KiB
Plaintext

<li class="MapsList-item">
<div class="MapCard" 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 class="MapCard-contentBodyRow MapCard-contentBodyRow--flex">
<% if vis[:description].present? %>
<div class="MapCard-desc">
<div class="DefaultDescription" title="<%= markdown_html_clean(vis[:description]) %>"><%= raw markdown_html_safe(vis[:description]) %></div>
</div>
<% else %>
<span class="NoResults"></span>
<% end %>
</div>
<div class="MapCard-tags">
<div class="DefaultTags MapCard-contentBodyRow">
<% if vis[:tags].size > 0 %>
<%# Keep on one line to avoid unwanted spaces %>
<% formatted_tags(vis[:tags]) do |tag| %><a class="CDB-Tag CDB-Text CDB-Size-small u-upperCase DefaultTags-item js-tag-link" href="<%= CartoDB.url(self, 'public_tag', params: { tag: tag }, user: vis[:owner]) %>"><%= tag %></a><% end %>
<% end %>
</div>
</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>