From bd92291b260cb6c33347a3d3d930f093e66ec8a6 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Thu, 5 Jun 2014 11:14:06 -0400 Subject: [PATCH] When javascript disabled, add category links to topic list and topic page --- app/views/list/list.erb | 6 +++++- app/views/topics/show.html.erb | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/views/list/list.erb b/app/views/list/list.erb index 17d9e09615..df9267ab95 100644 --- a/app/views/list/list.erb +++ b/app/views/list/list.erb @@ -1,6 +1,10 @@
<% @list.topics.each do |t| %> - <%= t.title %> '>(<%= t.posts_count %>)
+ <%= t.title %> + <% if !@category && t.category %> + [<%= t.category.name %>] + <% end %> + '>(<%= t.posts_count %>)
<% end %>
diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index d18069c5b4..30020d8037 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -1,6 +1,9 @@

<%= render_topic_title(@topic_view.topic) %>

+<% if c = @topic_view.topic.category %> + <%= c.name %> +<% end %>
<% @topic_view.posts.each do |post| %>