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