fixes #1433
This commit is contained in:
@@ -32,4 +32,8 @@ class WikiPageVersion < ActiveRecord::Base
|
||||
def pretty_title
|
||||
title.tr("_", " ")
|
||||
end
|
||||
|
||||
def category_name
|
||||
Tag.category_for(title)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<% end %>
|
||||
</td>
|
||||
<% end %>
|
||||
<td><%= link_to wiki_page_version.title, wiki_page_version_path(wiki_page_version) %></td>
|
||||
<td class="category-<%= wiki_page_version.category_name %>"><%= link_to wiki_page_version.title, wiki_page_version_path(wiki_page_version) %></td>
|
||||
<td><%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %></td>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<td>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<tbody>
|
||||
<% @wiki_pages.each do |wiki_page| %>
|
||||
<tr>
|
||||
<td class="tag-category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
||||
<td class="category-<%= wiki_page.category_name %>"><%= link_to wiki_page.pretty_title, wiki_page_path(wiki_page, :noredirect => 1) %></td>
|
||||
<td><%= wiki_page.updated_at.strftime("%Y-%m-%d %I:%M") %> by <%= h link_to_user wiki_page.updater %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user