/bans: color code expired/unexpired bans.

This commit is contained in:
evazion
2017-04-12 22:38:27 -05:00
parent 113d8824d5
commit 40fe0f595f
3 changed files with 25 additions and 3 deletions

View File

@@ -27,6 +27,9 @@ $preview_flagged_color: #F00;
$preview_sample_warning_color: hsl(0, 100%, 90%); // light red
$preview_quality_warning_color: hsl(50, 100%, 90%); // light yellow
$error_color: hsl(0, 100%, 95%); // light red
$success_color: hsl(120, 100%, 95%); // light green
@mixin border-radius($val) {
-moz-border-radius: $val;
-webkit-border-radius: $val;

View File

@@ -0,0 +1,19 @@
@import "../common/000_vars.scss";
#c-bans #a-index {
tr[data-expired="true"] {
background-color: $success_color !important;
&:hover {
background-color: darken($success_color, 5%) !important;
}
}
tr[data-expired="false"] {
background-color: $error_color !important;
&:hover {
background-color: darken($error_color, 5%) !important;
}
}
}

View File

@@ -1,5 +1,5 @@
<div class="bans">
<div class="index">
<div id="c-bans">
<div id="a-index">
<h1>Bans</h1>
<table class="striped" width="100%">
@@ -13,7 +13,7 @@
</thead>
<tbody>
<% @bans.each do |ban| %>
<tr id="ban-<%= ban.id %>">
<tr id="ban-<%= ban.id %>" data-expired="<%= ban.expired? %>">
<td><%= link_to_user(ban.user) %></td>
<td><%= ban.expires_at %></td>
<td><%= format_text ban.reason, :ragel => true %></td>