diff --git a/sections/bonus/history.php b/sections/bonus/history.php index bb0a430c2..309da658a 100644 --- a/sections/bonus/history.php +++ b/sections/bonus/history.php @@ -24,7 +24,8 @@ $poolSummary = $bonus->poolHistory(); $paginator = new Util\Paginator(TORRENTS_PER_PAGE, (int)($_GET['page'] ?? 1)); $paginator->setTotal($summary['nr']); -echo $Twig->render('user/bonus-history.twig', [ +echo $Twig->render('bonus/history.twig', [ + 'exchange' => $bonus->tokenExchange(), 'history' => $bonus->history($paginator->limit(), $paginator->offset()), 'item' => $bonus->purchaseHistory(), 'summary' => $summary, diff --git a/templates/user/bonus-history.twig b/templates/bonus/history.twig similarity index 87% rename from templates/user/bonus-history.twig rename to templates/bonus/history.twig index 8662c9b65..b873e6e1f 100644 --- a/templates/user/bonus-history.twig +++ b/templates/bonus/history.twig @@ -37,6 +37,19 @@ {% elseif total > 5000000 %} extremely {% elseif total > 10000000 %} exceptionally {% endif %} well done!

+{% endif %} +{% if exchange.received > 0 or exchange.sent > 0 %} +

+{%- if exchange.received > 0 %} + You have received {{ exchange.received|number_format }} token{{ exchange.received|plural }} +{%- if exchange.sent > 0 %} and sent {{ + exchange.sent|number_format }} token{{ exchange.sent|plural }}. +{%- else -%}. +{%- endif -%} +{%- else -%} + You have sent {{ exchange.sent|number_format }} token{{ exchange.sent|plural }}. +{%- endif -%} +

{% endif %} {% endif %}