adds support for user level-dependent classes

all links to users should have their class attribute set to that user's
level_class
This commit is contained in:
Toks
2013-03-30 10:31:20 -04:00
parent eed6ece3ec
commit 4f42ab8bdb
16 changed files with 24 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
<article data-forum-post-id="<%= forum_post.id %>">
<div class="author">
<h4>
<%= link_to forum_post.creator.name, user_path(forum_post.creator_id) %>
<%= link_to forum_post.creator.name, user_path(forum_post.creator_id), { :class => forum_post.creator.level_class } %>
<% if forum_post.is_deleted? %>
(deleted)
<% end %>
@@ -16,7 +16,7 @@
<%= format_text(forum_post.body) %>
</div>
<% if forum_post.updater_id != forum_post.creator_id %>
<p class="info">Updated by <%= link_to forum_post.updater_name, user_path(forum_post.updater_id) %> <%= time_ago_in_words_tagged(forum_post.updated_at) %></p>
<p class="info">Updated by <%= link_to forum_post.updater_name, user_path(forum_post.updater_id), { :class => forum_post.updater.level_class } %> <%= time_ago_in_words_tagged(forum_post.updated_at) %></p>
<% end %>
<menu>
<li>ID: <%= forum_post.id %></li>