Files
danbooru/app/views/wiki_pages/show.html.erb
evazion 7e67d3dd9c views: replace .category-N css classes with .tag-type-N
* Replace the .category-N CSS classes on tags with .tag-type-N. Before
  we were inconsistent about whether tag colors were indicated with
  .category-N or .tag-type-N. Now it's always .tag-type-N.

* Fix various places to not use Tag.category_for. Tag.category_for does
  one Redis call per tag lookup, which leads to N Redis calls on many
  pages. This was inefficient because usually we either already had the
  tags from the database, or we could fetch them easily.
2020-02-16 04:35:37 -06:00

40 lines
1.1 KiB
Plaintext

<% page_title "#{@wiki_page.pretty_title.titleize} Wiki" %>
<% meta_description DText.excerpt(@wiki_page.body) %>
<%= render "secondary_links" %>
<%= render "sidebar" %>
<% content_for(:content) do %>
<h1 id="wiki-page-title">
<%= link_to @wiki_page.pretty_title, posts_path(tags: @wiki_page.title), class: tag_class(@wiki_page.tag) %>
<% if @wiki_page.is_locked? %>
(locked)
<% end %>
<% if @wiki_page.is_deleted? %>
(deleted)
<% end %>
</h1>
<div id="wiki-page-body" class="prose">
<% if @wiki_page.other_names.present? %>
<p><%= wiki_page_other_names_list(@wiki_page) %></p>
<% end %>
<% if @wiki_page.new_record? %>
<p>This wiki page does not exist. <%= link_to "Create new wiki page", new_wiki_page_path(wiki_page: { title: @wiki_page.title }) %>.</p>
<% else %>
<%= format_text(@wiki_page.body) %>
<% end %>
<% if @wiki_page.artist %>
<p><%= link_to "View artist", @wiki_page.artist %></p>
<% end %>
<%= render "tag_relationships/alias_and_implication_list", tag: @wiki_page.tag %>
</div>
<%= render "wiki_pages/posts", wiki_page: @wiki_page %>
<% end %>