Files
nairobi/app/components/widgets/feeds/feed_component.html.erb
Javi Martín 83400b9ed4 Display a message when feeds have no items
This is a scenario which will likely take place for at least some of the
goals.
2020-12-27 21:42:42 +01:00

18 lines
553 B
Plaintext

<section id="feed_<%= kind %>" class="widget-feed feed-<%= kind %>">
<header>
<h2 class="title"><%= t("welcome.feed.most_active.#{kind}") %></h2>
</header>
<% if feed.items.any? %>
<div class="feed-content">
<% feed.items.each do |item| %>
<%= render item_component_class.new(item) %>
<% end %>
</div>
<%= link_to t("welcome.feed.see_all.#{kind}"), see_all_path, class: "see-all" %>
<% else %>
<div class="no-items callout primary"><%= t("welcome.feed.no_items.#{kind}") %></div>
<% end %>
</section>