Framework update, and moved markup() helper to new helpers.php
This commit is contained in:
9
helpers.php
Normal file
9
helpers.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
if (! function_exists('markup')) {
|
||||
function markup($a,$b) {
|
||||
return ($a > $b)
|
||||
? sprintf('<span class="badge bg-danger>">(%3.1f%%)</span>',$a ? ($b-$a)/($b ?: 1)*100 : 100)
|
||||
: sprintf('<span class="badge">%3.1f%%</span>',$a ? ($b-$a)/($b ?: 1)*100 : ($b ? 100: 0));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user