diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6a0330f64..8a78fdd44 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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})) + "]" diff --git a/app/helpers/post_appeals_helper.rb b/app/helpers/post_appeals_helper.rb index be3e8058f..af39daa6a 100644 --- a/app/helpers/post_appeals_helper.rb +++ b/app/helpers/post_appeals_helper.rb @@ -4,7 +4,7 @@ module PostAppealsHelper html << '' diff --git a/app/helpers/post_flags_helper.rb b/app/helpers/post_flags_helper.rb index 5ae5ff1ee..3becc3c80 100644 --- a/app/helpers/post_flags_helper.rb +++ b/app/helpers/post_flags_helper.rb @@ -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) diff --git a/app/views/moderator/dashboards/_activity_mod_action.html.erb b/app/views/moderator/dashboards/_activity_mod_action.html.erb index da3024b95..749ec4c71 100644 --- a/app/views/moderator/dashboards/_activity_mod_action.html.erb +++ b/app/views/moderator/dashboards/_activity_mod_action.html.erb @@ -9,7 +9,7 @@ <% @dashboard.mod_actions.each do |mod_action| %> - <%= link_to mod_action.creator.name, user_path(mod_action.creator) %> + <%= link_to mod_action.creator.name, user_path(mod_action.creator), { :class => mod_action.creator.level_class } %> <%= format_text(mod_action.description) %> <% end %> diff --git a/app/views/moderator/dashboards/_activity_user_feedback.html.erb b/app/views/moderator/dashboards/_activity_user_feedback.html.erb index 0d6a74b5d..940757c30 100644 --- a/app/views/moderator/dashboards/_activity_user_feedback.html.erb +++ b/app/views/moderator/dashboards/_activity_user_feedback.html.erb @@ -10,7 +10,7 @@ <% @dashboard.user_feedbacks.each do |record| %> - <%= link_to(record.user.name, user_path(record.user)) %> + <%= link_to(record.user.name, user_path(record.user), { :class => record.user.level_class }) %> <%= format_text(record.body) %> <%= time_ago_in_words_tagged(record.created_at) %> diff --git a/app/views/moderator/invitations/index.html.erb b/app/views/moderator/invitations/index.html.erb index 824485a62..7e7556a6e 100644 --- a/app/views/moderator/invitations/index.html.erb +++ b/app/views/moderator/invitations/index.html.erb @@ -4,7 +4,7 @@ diff --git a/app/views/post_appeals/index.html.erb b/app/views/post_appeals/index.html.erb index 92c0b7c34..e55f3c7f9 100644 --- a/app/views/post_appeals/index.html.erb +++ b/app/views/post_appeals/index.html.erb @@ -13,7 +13,7 @@ <% @post_appeals.each do |post_appeal| %> <%= PostPresenter.preview(post_appeal.post, :tags => "status:any") %> - <%= link_to post_appeal.creator.name, user_path(post_appeal.creator) %> + <%= link_to post_appeal.creator.name, user_path(post_appeal.creator), { :class => post_appeal.creator.level_class } %> <%= format_text post_appeal.reason %> <% end %> diff --git a/app/views/post_flags/index.html.erb b/app/views/post_flags/index.html.erb index 39926514e..ca53ef758 100644 --- a/app/views/post_flags/index.html.erb +++ b/app/views/post_flags/index.html.erb @@ -17,7 +17,7 @@ <%= PostPresenter.preview(post_flag.post, :tags => "status:any") %> <% if CurrentUser.user.is_janitor? %> - <%= 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 } %> <% end %> <%= format_text post_flag.reason %> diff --git a/app/views/post_versions/_listing.html.erb b/app/views/post_versions/_listing.html.erb index aa522ed4a..6c634124e 100644 --- a/app/views/post_versions/_listing.html.erb +++ b/app/views/post_versions/_listing.html.erb @@ -21,7 +21,7 @@ <%= compact_time(post_version.updated_at) %> <% 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 %> <%= post_version.rating %> diff --git a/app/views/report_mailer/moderator_report.html.erb b/app/views/report_mailer/moderator_report.html.erb index ad92347d5..7d91e3aa8 100644 --- a/app/views/report_mailer/moderator_report.html.erb +++ b/app/views/report_mailer/moderator_report.html.erb @@ -19,7 +19,7 @@ <% User.find(:all, :conditions => ["level >= ?", CONFIG["user_levels"]["Test Janitor"]], :order => "level, name").each do |user| %> - <%= link_to user.name, user_path(user, :host => Danbooru.config.hostname, :only_path => false) %> + <%= link_to user.name, user_path(user, :host => Danbooru.config.hostname, :only_path => false), { :class => user.level_class } %> <%= user.pretty_level %> <%= 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]) %> <%= 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]) %>