mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 03:10:46 -06:00
FIX: Hide empty popular/recent sections in 404 page (#10811)
This commit is contained in:
parent
e363b113a8
commit
97f34d7b71
@ -1,4 +1,5 @@
|
||||
<div class="row page-not-found-topics">
|
||||
<% if @top_viewed.count > 0 %>
|
||||
<div class="popular-topics">
|
||||
<h2 class="popular-topics-title"><%= t 'page_not_found.popular_topics' %></h2>
|
||||
<% @top_viewed.each do |t| %>
|
||||
@ -8,6 +9,8 @@
|
||||
<% end %>
|
||||
<a href="<%= path "/top" %>" class="btn btn-default"><%= t 'page_not_found.see_more' %>…</a>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if @recent.count > 0 %>
|
||||
<div class="recent-topics">
|
||||
<h2 class="recent-topics-title"><%= t 'page_not_found.recent_topics' %></h2>
|
||||
<% @recent.each do |t| %>
|
||||
@ -17,4 +20,5 @@
|
||||
<% end %>
|
||||
<a href="<%= path "/latest" %>" class="btn btn-default"><%= t 'page_not_found.see_more' %>…</a>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user