59 lines
2.6 KiB
Plaintext
59 lines
2.6 KiB
Plaintext
<div id="related-topics" class="more-topics__list " role="complementary" aria-labelledby="related-topics-title">
|
|
<h3 id="related-topics-title" class="more-topics__list-title">
|
|
<%= t 'js.discourse_ai.related_topics.title' %>
|
|
</h3>
|
|
<div class="topic-list-container" itemscope itemtype='http://schema.org/ItemList'>
|
|
<meta itemprop='itemListOrder' content='http://schema.org/ItemListOrderDescending'>
|
|
<table class='topic-list'>
|
|
<thead>
|
|
<tr>
|
|
<th><%= t 'js.topic.title' %></th>
|
|
<th></th>
|
|
<th class="replies"><%= t 'js.replies' %></th>
|
|
<th class="views"><%= t 'js.views' %></th>
|
|
<th><%= t 'js.activity' %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @list.each_with_index do |t,i| %>
|
|
<tr class="topic-list-item">
|
|
<td class="main-link" itemprop='itemListElement' itemscope itemtype='http://schema.org/ListItem'>
|
|
<meta itemprop='position' content='<%= i + 1 %>'>
|
|
<span class="link-top-line">
|
|
<a itemprop='url' href='<%= t.url %>' class='title raw-link raw-topic-link'><%= t.title %></a>
|
|
</span>
|
|
<div class="link-bottom-line">
|
|
<% if (!@category || @category.has_children?) && t.category && !t.category.uncategorized? %>
|
|
<a href='<%= t.category.url %>' class='badge-wrapper bullet'>
|
|
<span class='badge-category-bg' style='background-color: #<%= t.category.color %>'></span>
|
|
<span class='badge-category clear-badge'>
|
|
<span class='category-name'><%= t.category.name %></span>
|
|
</span>
|
|
</a>
|
|
<% end %>
|
|
<% if tags = t.visible_tags(guardian) %>
|
|
<div class="discourse-tags">
|
|
<% tags.each_with_index do |tag, index| %>
|
|
<a href='<%= tag.full_url %>' class='discourse-tag'><%= tag.name %></a>
|
|
<% if index < tags.size - 1 %>, <% end %>
|
|
<% end %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</td>
|
|
<td class="replies">
|
|
<span class='posts' title='<%= t 'posts' %>'><%= t.posts_count - 1 %></span>
|
|
</td>
|
|
<td class="views">
|
|
<span class='views' title='<%= t 'views' %>'><%= t.views %></span>
|
|
</td>
|
|
<td>
|
|
<%= I18n.l(t.last_posted_at || t.created_at, format: :date_only) %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|