Add data-is-deprecated attribute to tags

Allows using custom CSS to highlight deprecated tags, fixes #5110
This commit is contained in:
NamelessContributor
2022-05-10 17:17:15 +02:00
parent 1720246cb9
commit c762e3ddbc
5 changed files with 5 additions and 5 deletions

View File

@@ -16,7 +16,7 @@
</thead>
<tbody>
<% @missed_searches.each do |search, count| %>
<tr class="tag-type-<%= Tag.find_by_name(search)&.category.to_i %>">
<tr class="tag-type-<%= Tag.find_by_name(search)&.category.to_i %>" data-is-deprecated=<%= Tag.find_by_name(search)&.is_deprecated? %>>
<td><%= link_to search, posts_path(tags: search) %></td>
<td>
<% unless WikiPage.titled(search).exists? %>

View File

@@ -14,7 +14,7 @@
</thead>
<tbody>
<% @searches.each do |search, count| %>
<tr class="tag-type-<%= Tag.find_by_name(search)&.category.to_i %>">
<tr class="tag-type-<%= Tag.find_by_name(search)&.category.to_i %>" data-is-deprecated="<%= Tag.find_by_name(search)&.is_deprecated? %>">
<td><%= link_to search, posts_path(tags: search) %></td>
<td style="text-align: right;"><%= count.to_i %></td>
</tr>