Merge pull request #2762 from techAPJ/patch-1

Show category badge on 404 page topics
This commit is contained in:
Jeff Atwood 2014-09-06 12:21:34 -07:00
commit f2c3a824e7
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
<div class="span8 popular-topics"> <div class="span8 popular-topics">
<h2 class="popular-topics-title"><%= t 'page_not_found.popular_topics' %></h2> <h2 class="popular-topics-title"><%= t 'page_not_found.popular_topics' %></h2>
<% @top_viewed.each do |t| %> <% @top_viewed.each do |t| %>
<%= link_to t.title, t.relative_url %><br/> <span style="line-height:2;"><%= link_to t.title, t.relative_url %><% if !t.category.uncategorized? %>&nbsp;&nbsp;<a href="<%= t.category.url %>" class="badge badge-category" style="background-color: #<%= t.category.color %>; color: #<%= t.category.text_color %>"><%= t.category.name %></a><% end %></span><br/>
<% end %> <% end %>
<br/> <br/>
<a href="/latest" class="btn"><%= t 'page_not_found.see_more' %>&hellip;</a> <a href="/latest" class="btn"><%= t 'page_not_found.see_more' %>&hellip;</a>
@ -14,7 +14,7 @@
<div class="span8 recent-topics"> <div class="span8 recent-topics">
<h2 class="recent-topics-title"><%= t 'page_not_found.recent_topics' %></h2> <h2 class="recent-topics-title"><%= t 'page_not_found.recent_topics' %></h2>
<% @recent.each do |t| %> <% @recent.each do |t| %>
<%= link_to t.title, t.relative_url %><br/> <span style="line-height:2;"><%= link_to t.title, t.relative_url %><% if !t.category.uncategorized? %>&nbsp;&nbsp;<a href="<%= t.category.url %>" class="badge badge-category" style="background-color: #<%= t.category.color %>; color: #<%= t.category.text_color %>"><%= t.category.name %></a><% end %></span><br/>
<% end %> <% end %>
<br/> <br/>
<a href="/latest" class="btn"><%= t 'page_not_found.see_more' %>&hellip;</a> <a href="/latest" class="btn"><%= t 'page_not_found.see_more' %>&hellip;</a>