proper color support for labels

This commit is contained in:
jomo
2015-01-17 16:04:07 +01:00
parent 39fceedf56
commit 5f00fc87a3
6 changed files with 41 additions and 7 deletions

View File

@@ -22,7 +22,7 @@
</div>
<div class="items bold">
<div class="item <%= "#{"locked" if thread.locked}#{"sticky" if thread.sticky}" %>">
<%= link_to truncate(thread.title, length: 60, omission: " …"), forumthread_path(thread), title: thread.title %>
<%= render partial: "labels/label", locals: {label: thread.label} %><%= link_to truncate(thread.title, length: 60, omission: " …"), forumthread_path(thread), title: thread.title %>
<div class="item-info">
<% if rpl = thread.replies.last %>
<%= rpl.author.name %>

View File

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