add user classes on more pages

This commit is contained in:
Toks
2013-03-31 10:31:28 -04:00
parent faffb3f896
commit b025256480
10 changed files with 10 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ module ApplicationHelper
def mod_link_to_user(user, positive_or_negative)
html = ""
html << link_to(user.name, user_path(user))
html << link_to(user.name, user_path(user), { :class => user.level_class })
if positive_or_negative == :positive
html << " [" + link_to("+", new_user_feedback_path(:user_feedback => {:category => "positive", :user_id => user.id})) + "]"

View File

@@ -4,7 +4,7 @@ module PostAppealsHelper
html << '<ul>'
post.appeals.each do |appeal|
html << '<li>' + DText.parse_inline(appeal.reason).html_safe + ' - ' + link_to(appeal.creator.name, user_path(appeal.creator)) + ' ' + time_ago_in_words_tagged(appeal.created_at) + '</li>'
html << '<li>' + DText.parse_inline(appeal.reason).html_safe + ' - ' + link_to(appeal.creator.name, user_path(appeal.creator), { :class => appeal.creator.level_class }) + ' ' + time_ago_in_words_tagged(appeal.created_at) + '</li>'
end
html << '</ul>'

View File

@@ -8,7 +8,7 @@ module PostFlagsHelper
html << DText.parse_inline(flag.reason).html_safe
if CurrentUser.is_janitor?
html << ' - ' + link_to(flag.creator.name, user_path(flag.creator))
html << ' - ' + link_to(flag.creator.name, user_path(flag.creator), { :class => flag.creator.level_class })
end
html << ' - ' + time_ago_in_words_tagged(flag.created_at)

View File

@@ -9,7 +9,7 @@
<tbody>
<% @dashboard.mod_actions.each do |mod_action| %>
<tr>
<td><%= link_to mod_action.creator.name, user_path(mod_action.creator) %></td>
<td><%= link_to mod_action.creator.name, user_path(mod_action.creator), { :class => mod_action.creator.level_class } %></td>
<td><%= format_text(mod_action.description) %></td>
</tr>
<% end %>

View File

@@ -10,7 +10,7 @@
<tbody>
<% @dashboard.user_feedbacks.each do |record| %>
<tr class="feedback-category-<%= record.category %>">
<td><%= link_to(record.user.name, user_path(record.user)) %></td>
<td><%= link_to(record.user.name, user_path(record.user), { :class => record.user.level_class }) %></td>
<td><%= format_text(record.body) %></td>
<td><%= time_ago_in_words_tagged(record.created_at) %></td>
</tr>

View File

@@ -4,7 +4,7 @@
<ul>
<% @users.each do |user| %>
<li><%= link_to user.name, user_path(user) %></li>
<li><%= link_to user.name, user_path(user), { :class => user.level_class } %></li>
<% end %>
</ul>

View File

@@ -13,7 +13,7 @@
<% @post_appeals.each do |post_appeal| %>
<tr>
<td><%= PostPresenter.preview(post_appeal.post, :tags => "status:any") %></td>
<td><%= link_to post_appeal.creator.name, user_path(post_appeal.creator) %></td>
<td><%= link_to post_appeal.creator.name, user_path(post_appeal.creator), { :class => post_appeal.creator.level_class } %></td>
<td><%= format_text post_appeal.reason %></td>
</tr>
<% end %>

View File

@@ -17,7 +17,7 @@
<td><%= PostPresenter.preview(post_flag.post, :tags => "status:any") %></td>
<% if CurrentUser.user.is_janitor? %>
<td>
<%= link_to post_flag.creator.name, user_path(post_flag.creator) %>
<%= link_to post_flag.creator.name, user_path(post_flag.creator), { :class => post_flag.creator.level_class } %>
</td>
<% end %>
<td><%= format_text post_flag.reason %></td>

View File

@@ -21,7 +21,7 @@
<td><%= compact_time(post_version.updated_at) %></td>
<td>
<% if post_version.updater %>
<%= link_to(post_version.updater.name, user_path(post_version.updater_id)) %>
<%= link_to(post_version.updater.name, user_path(post_version.updater_id), { :class => post_version.updater.level_class } ) %>
<% end %>
</td>
<td><%= post_version.rating %></td>

View File

@@ -19,7 +19,7 @@
<tbody>
<% User.find(:all, :conditions => ["level >= ?", CONFIG["user_levels"]["Test Janitor"]], :order => "level, name").each do |user| %>
<tr>
<td><%= link_to user.name, user_path(user, :host => Danbooru.config.hostname, :only_path => false) %></td>
<td><%= link_to user.name, user_path(user, :host => Danbooru.config.hostname, :only_path => false), { :class => user.level_class } %></td>
<td><%= user.pretty_level %></td>
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 1.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 1.days.ago]) %></td>
<td style="text-align: right;"><%= Post.count(:conditions => ["created_at >= ? AND approver_id = ?", 7.days.ago, user.id]) %>/<%= Post.count(:conditions => ["created_at >= ? AND (approver_id IS NOT NULL OR status = 'pending')", 7.days.ago]) %></td>