new palette for quota

This commit is contained in:
Benjamin Sonntag 2013-02-08 14:35:56 +00:00
parent 216b1b2289
commit eb543a236b
3 changed files with 8 additions and 8 deletions

View File

@ -61,19 +61,19 @@
} }
$usage_percent = (int) ($q[$key]["u"] / $q[$key]["t"] * 100); $usage_percent = (int) ($q[$key]["u"] / $q[$key]["t"] * 100);
$usage_color = ($q[$key]["u"] > $q[$key]["t"] ? '#f00' : '#0f0'); $usage_color = ($q[$key]["u"] > $q[$key]["t"] ? '#800' : '#080');
$usage_color = ((85 < $usage_percent && $usage_percent < 100) ? '#ff0' : $usage_color); // yellow $usage_color = ((85 < $usage_percent && $usage_percent <= 100) ? '#ff8800' : $usage_color); // yellow
$url = ($key == 'bw_web' ? 'stats_show_per_month.php' : 'quota_show.php'); $url = ($key == 'bw_web' ? 'stats_show_per_month.php' : 'quota_show.php');
echo "<dd>"; echo '<ul><li>';
echo '<div><a href="' . $url . '">' . /* _($val) */ _("quota_".$key) . ' ' . $usage_percent . '%' . ' <small>(' . format_size($q[$key]["u"],true) . '&nbsp;/&nbsp;' . format_size($q[$key]["t"],true) . ')</small></a></div>'; echo '<div><a href="' . $url . '">' . /* _($val) */ _("quota_".$key) . " " . sprintf(_("%s%% of %s"),$usage_percent,format_size($q[$key]["t"])) . '</a></div>';
echo "</dd>"; echo "</li>\n";
echo "<dd>"; echo '<li>';
echo '<div class="progress-bar">'; echo '<div class="progress-bar">';
echo '<div style="width: ' . ($usage_percent > 100 ? 100 : $usage_percent) . '%; background: ' . $usage_color . ';">&nbsp;</div>'; echo '<div style="width: ' . ($usage_percent > 100 ? 100 : $usage_percent) . '%; background: ' . $usage_color . ';">&nbsp;</div>';
echo '</div>'; echo '</div>';
echo "</dd>"; echo '</li></ul>';
} }
} }
?> ?>

View File

@ -589,7 +589,7 @@ input#dir, input#sub_local {
width: 180px; width: 180px;
background: #fff; background: #fff;
border: solid 1px #AAA; border: solid 1px #AAA;
padding-bottom margin-left: 10px;
} }
.ombrage { .ombrage {