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

55 lines
2.6 KiB
Plaintext

<%= content_for(:title) do %>CARTO · Datasets by <%= @name %><% end %>
<%= content_for(:description) do %><%= @page_description %><% end %>
<div class="CDB-Text PublicBody-content">
<% if @datasets.size == 0 %>
<%= render 'admin/shared/no_results', is_maps: false, alt_url: CartoDB.url(self, 'public_maps_home') %>
<% else %>
<ul class="MapsList">
<% @datasets.each do |vis| %>
<li class="MapsList-item">
<div class="MapCard MapCard--squared MapCard--borderless" data-vis-id="<%= vis[:id] %>" data-vis-owner-name="<%= vis[:owner].username %>">
<a href="<%= CartoDB.url(self, 'public_table', params: { id: vis[:title] }, user: vis[:owner]) %>" class="MapCard-header js-header">
<div class="MapCard-loader"></div>
</a>
<div class="MapCard-content">
<div class="MapCard-contentFooter MapCard-contentFooter--with-icon">
<div class="MapCard-contentFooterIcon">
<div class="DatasetsList-itemCategory is--<%= vis[:geometry_type] %>Dataset"></div>
</div>
<div class="MapCard-contentFooterDetails u-ellipsLongText">
<div class="MapCard-contentFooterTitle">
<h3 class="MapCard-title DefaultTitle CDB-Text is-semibold CDB-Size-large">
<a href="<%= CartoDB.url(self, 'public_table', params: { id: vis[:title] }, user: vis[:owner]) %>" class="DefaultTitle-link u-ellipsLongText" title="<%= vis[:title] %>"><%= vis[:title] %></a>
</h3>
</div>
<div class="MapCard-contentFooterIcons 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>
</div>
</div>
</li>
<% end %>
<% ((3 - @datasets.size + 3) % 3).times.each do %>
<li class="MapsList-item MapsList-item--fake">
<div class="MapCard MapCard--squared MapCard--borderless">
<div class="MapCard-header MapCard-header--fake"></div>
<div class="MapCard-content"></div>
</div>
</li>
<% end %>
</ul>
<% end %>
</div>
<%= render 'admin/pages/shared/pagination' %>