From 4f42ab8bdb6186d1018045bc4a5889abdaf7332c Mon Sep 17 00:00:00 2001 From: Toks Date: Sat, 30 Mar 2013 10:31:20 -0400 Subject: [PATCH] adds support for user level-dependent classes all links to users should have their class attribute set to that user's level_class --- app/presenters/user_presenter.rb | 2 +- app/views/artist_versions/index.html.erb | 2 +- app/views/comments/partials/show/_comment.html.erb | 4 ++-- app/views/dmails/index.html.erb | 4 ++-- app/views/dmails/show.html.erb | 4 ++-- app/views/forum_posts/_forum_post.html.erb | 4 ++-- app/views/forum_topics/index.html.erb | 4 ++-- app/views/mod_actions/index.html.erb | 2 +- app/views/note_versions/index.html.erb | 2 +- app/views/notes/index_by_note.html.erb | 2 +- app/views/pool_versions/index.html.erb | 2 +- app/views/pools/index.html.erb | 2 +- app/views/posts/partials/show/_information.html.erb | 4 ++-- app/views/user_feedbacks/index.html.erb | 4 ++-- app/views/users/index.html.erb | 4 ++-- app/views/wiki_page_versions/index.html.erb | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/app/presenters/user_presenter.rb b/app/presenters/user_presenter.rb index b626914e5..788fd982a 100644 --- a/app/presenters/user_presenter.rb +++ b/app/presenters/user_presenter.rb @@ -105,7 +105,7 @@ class UserPresenter def inviter(template) if user.inviter_id - template.link_to(user.inviter.name, template.user_path(user.inviter_id)) + template.link_to(user.inviter.name, template.user_path(user.inviter_id), { :class => user.inviter.level_class }) else "None" end diff --git a/app/views/artist_versions/index.html.erb b/app/views/artist_versions/index.html.erb index 762b5fb52..ec2b72bf2 100644 --- a/app/views/artist_versions/index.html.erb +++ b/app/views/artist_versions/index.html.erb @@ -27,7 +27,7 @@ <%= artist_version_other_names_diff(artist_version) %> <%= artist_version.group_name %> <%= compact_time artist_version.created_at %> - <%= link_to artist_version.updater_name, user_path(artist_version.updater_id) %> + <%= link_to artist_version.updater_name, user_path(artist_version.updater_id), { :class => artist_version.updater.level_class } %> <%= artist_version.is_active? %>