Browse Source

add user balance / boost address info

main
ghost 9 months ago
parent
commit
4c7fc2f910
  1. 12
      src/Controller/UserController.php
  2. 23
      templates/default/user/list.html.twig

12
src/Controller/UserController.php

@ -99,9 +99,15 @@ class UserController extends AbstractController @@ -99,9 +99,15 @@ class UserController extends AbstractController
$list[] =
[
'name' => $user['key'],
'total' => $total,
'rooms' => $rooms,
'name' => $user['key'],
'balance' => $client->getBalance(
$user['key']
),
'address' => $client->getAccountAddress(
$user['key']
),
'total' => $total,
'rooms' => $rooms,
];
}
}

23
templates/default/user/list.html.twig

@ -7,19 +7,18 @@ @@ -7,19 +7,18 @@
<li>
<div>
<strong>
@{{ user.name }}
@{{ user.name }} / {{ 'balance' | trans }}: {{ user.balance }} / {{ 'boost' | trans }}: {{ user.address }}
</strong>
<span style="float:right">{# @TODO #}
{% for namespace, total in user.rooms %}
<a href="{{
path('room_namespace',
{
mode : request.get('mode'),
namespace : namespace, _fragment : 'latest'
}) }}">{{ namespace | keva_namespace_value }}</a>
{{ total }}
{% endfor %}
</span>
<br />
{% for namespace, total in user.rooms %}
<a href="{{
path('room_namespace',
{
mode : request.get('mode'),
namespace : namespace, _fragment : 'latest'
}) }}">{{ namespace | keva_namespace_value }}</a>
{{ total }}
{% endfor %}
</div>
</li>
{% endfor %}

Loading…
Cancel
Save