column total on its own full-width line; Total: black (v1.0.4)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
<?php
|
||||
// Per-column net total in the column header (credits - debits). Shown in every column of an
|
||||
// enabled board, including "total R$0,00" -- never hidden on zero. Server-side, re-renders on
|
||||
// every board refresh.
|
||||
// enabled board, including "Total: R$0,00" -- never hidden on zero. Server-side, re-renders on
|
||||
// every board refresh. Rendered on its own full-width line under the title; "Total:" stays the
|
||||
// default (black) and only the amount is colored by sign.
|
||||
if (empty($column['project_id']) || ! $this->FinanceHelper->isEnabled($column['project_id'])) {
|
||||
return;
|
||||
}
|
||||
@@ -9,16 +10,16 @@ if (empty($column['project_id']) || ! $this->FinanceHelper->isEnabled($column['p
|
||||
$net = $this->FinanceHelper->columnNet($column);
|
||||
|
||||
if ($net > 0) {
|
||||
$class = 'fb-column-total fb-total-credit';
|
||||
$amount_class = 'fb-total-credit';
|
||||
$sign = '+';
|
||||
} elseif ($net < 0) {
|
||||
$class = 'fb-column-total fb-total-debit';
|
||||
$amount_class = 'fb-total-debit';
|
||||
$sign = '-';
|
||||
} else {
|
||||
$class = 'fb-column-total fb-total-zero';
|
||||
$amount_class = 'fb-total-zero';
|
||||
$sign = '';
|
||||
}
|
||||
?>
|
||||
<div class="<?= $class ?>">
|
||||
<?= t('Total') ?>: <span class="fb-amount"><?= $sign ?>R$<?= \Kanboard\Plugin\FinanceBuddy\Helper\FinanceHelper::money(abs($net)) ?></span>
|
||||
<div class="fb-column-total">
|
||||
<?= t('Total') ?>: <span class="fb-amount <?= $amount_class ?>"><?= $sign ?>R$<?= \Kanboard\Plugin\FinanceBuddy\Helper\FinanceHelper::money(abs($net)) ?></span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user