|
|
@@ -1,5 +1,6 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
use common\helpers\GlobalParam; |
|
|
|
use domain\Order\Order\OrderModule; |
|
|
|
use domain\User\User\User; |
|
|
|
use domain\User\User\UserModule; |
|
|
@@ -8,6 +9,7 @@ use common\helpers\Price; |
|
|
|
$userModule = UserModule::getInstance(); |
|
|
|
$orderModule = OrderModule::getInstance(); |
|
|
|
|
|
|
|
$userCurrent = GlobalParam::getCurrentUser(); |
|
|
|
$credit = $userModule->getRepository()->getCredit($user); |
|
|
|
$countOrders = $orderModule->getRepository()->countOrdersByUser($user); |
|
|
|
$countUserMessages = $this->getUserMessageModule()->getRepository()->countUserMessagesByUser($user); |
|
|
@@ -19,7 +21,9 @@ $countUserMessages = $this->getUserMessageModule()->getRepository()->countUserMe |
|
|
|
<?= menu_navigation_item('update', 'Profil', $action, $user) ?> |
|
|
|
<?= menu_navigation_item('credit', 'Cagnotte <span class="label label-default badge">'.Price::format($credit).'</span>', $action, $user) ?> |
|
|
|
<?= menu_navigation_item('orders', 'Commandes <span class="label label-default badge">'.$countOrders.'</span>', $action, $user) ?> |
|
|
|
<?= menu_navigation_item('messages', 'Messages <span class="label label-default badge">'.$countUserMessages.'</span>', $action, $user) ?> |
|
|
|
<?php if($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userCurrent)): ?> |
|
|
|
<?= menu_navigation_item('messages', 'Messages <span class="label label-default badge">'.$countUserMessages.'</span>', $action, $user) ?> |
|
|
|
<?php endif; ?> |
|
|
|
</ul> |
|
|
|
|
|
|
|
|