Initial commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<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>
|
||||
@@ -0,0 +1,18 @@
|
||||
<div class="ContentFooter">
|
||||
<div class="u-inner ContentFooter-inner ContentFooter-inner--paginationOnly">
|
||||
<div class="js-content-footer"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for(:js) do %>
|
||||
<script type="text/javascript">
|
||||
var paginationModelAttrs = {
|
||||
current_page: <%= @current_page %>,
|
||||
total_count: <%= @total_count %>,
|
||||
per_page: <%= @per_page %>,
|
||||
url_to: function(page) {
|
||||
return '<%= @numbered_page_url %>'.replace('<%= @page_number_placeholder %>', page);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<% end %>
|
||||
@@ -0,0 +1,28 @@
|
||||
<% if @tags.size > 0 %>
|
||||
<ul class="tags">
|
||||
<li><strong>Browse by tag</strong></li>
|
||||
|
||||
<% @tags.last(10).reverse.each_with_index do |tag, i| %>
|
||||
<li<%= " class='#{i == 0 ? "first" : "last" }'" if i == 0 || i == @tags.size - 1 %>>
|
||||
<% if params[:tag] && params[:tag] == tag %>
|
||||
|
||||
<% if action_name == 'datasets' %>
|
||||
<%= tag.capitalize.truncate(40) %> <%= link_to "x", "/datasets", { :class => "close" } %>
|
||||
<% else %>
|
||||
<%= link_to "x", "/", { :class => "close" } %>
|
||||
<h3><%= tag.capitalize.truncate(40) %></h3>
|
||||
<% end %>
|
||||
|
||||
<% else %>
|
||||
|
||||
<% if action_name == 'datasets' %>
|
||||
<h3><%= link_to tag.capitalize.truncate(40), CartoDB.url(self, 'public_datasets_tag', params: { tag: tag }), :rel => "tag" %></h3>
|
||||
<% else %>
|
||||
<h3><%= link_to tag.capitalize.truncate(40), CartoDB.url(self, 'public_tag', params: { tag: tag }), :rel => "tag" %></h3>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user