mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00:00
When javascript disabled, add category links to topic list and topic page
This commit is contained in:
parent
06965a999e
commit
bd92291b26
@ -1,6 +1,10 @@
|
|||||||
<div class="topic-list">
|
<div class="topic-list">
|
||||||
<% @list.topics.each do |t| %>
|
<% @list.topics.each do |t| %>
|
||||||
<a href="<%= t.relative_url %>"><%= t.title %></a> <span title='<%= t 'posts' %>'>(<%= t.posts_count %>)</span><br/>
|
<a href="<%= t.relative_url %>"><%= t.title %></a>
|
||||||
|
<% if !@category && t.category %>
|
||||||
|
[<a href="/category/<%= t.category.slug.blank? ? t.category.id : t.category.slug %>"><%= t.category.name %></a>]
|
||||||
|
<% end %>
|
||||||
|
<span title='<%= t 'posts' %>'>(<%= t.posts_count %>)</span><br/>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<h2>
|
<h2>
|
||||||
<%= render_topic_title(@topic_view.topic) %>
|
<%= render_topic_title(@topic_view.topic) %>
|
||||||
</h2>
|
</h2>
|
||||||
|
<% if c = @topic_view.topic.category %>
|
||||||
|
<a href="/category/<%= c.slug.blank? ? c.id : c.slug %>"><%= c.name %></a>
|
||||||
|
<% end %>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
<% @topic_view.posts.each do |post| %>
|
<% @topic_view.posts.each do |post| %>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user