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

@@ -21,8 +21,8 @@
<% @dmails.each do |dmail| %>
<tr class="read-<%= dmail.is_read? %>">
<td><%= compact_time(dmail.created_at) %></td>
<td><%= link_to dmail.from_name, user_path(dmail.from) %></td>
<td><%= link_to dmail.to_name, user_path(dmail.to) %></td>
<td><%= link_to dmail.from_name, user_path(dmail.from), { :class => dmail.from.level_class } %></td>
<td><%= link_to dmail.to_name, user_path(dmail.to), { :class => dmail.to.level_class } %></td>
<td><%= link_to dmail.title, dmail_path(dmail) %></td>
</tr>
<% end %>

View File

@@ -5,8 +5,8 @@
<h2><%= @dmail.title %></h2>
<ul style="margin-bottom: 1em;">
<li><strong>Sender</strong>: <%= link_to @dmail.from_name, user_path(@dmail.from_id) %></li>
<li><strong>Recipient</strong>: <%= link_to @dmail.to_name, user_path(@dmail.to_id) %></li>
<li><strong>Sender</strong>: <%= link_to @dmail.from_name, user_path(@dmail.from_id), { :class => @dmail.from.level_class } %></li>
<li><strong>Recipient</strong>: <%= link_to @dmail.to_name, user_path(@dmail.to_id), { :class => @dmail.to.level_class } %></li>
<li><strong>Date</strong>: <%= compact_time(@dmail.created_at) %></li>
</ul>