add color to roles, improvement in label color detection

This commit is contained in:
jomo
2015-03-10 00:51:39 +01:00
parent d6221ca8d1
commit b601d49fe6
9 changed files with 30 additions and 37 deletions

View File

@@ -1,3 +1,3 @@
<% if label %>
<span class="label label-<%= label.name.downcase %>" style="color: #<%= label.fcolor %>;background-color: #<%= label.color %>"><%= label %></span>
<span class="label label-<%= label.name.downcase %>" style="color: <%= fcolor(label.color) %>;background-color: #<%= label.color %>"><%= label %></span>
<% end %>

View File

@@ -1,4 +1,4 @@
<div class="user">
<%= link_to user.name, user, class: "role #{user.role.name} #{"banned" if user.banned?} #{"disabled" if user.disabled?} #{"unconfirmed" unless user.confirmed?}", title: user.ign %>
<%= link_to user.name, user, class: "role #{user.role.name} #{"banned" if user.banned?} #{"disabled" if user.disabled?} #{"unconfirmed" unless user.confirmed?}", title: user.ign, style: "color: #{fcolor(user.role.color)}; background-color: #{user.role.color}" %>
<%= link_to "$", donate_statics_path, class: "role donor", title: "Donator" if user.donor? %>
</div>