You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 line
2.5KB

  1. <?php
  2. use common\helpers\AdminLTE;
  3. use common\helpers\Image;
  4. use yii\helpers\Html;
  5. $this->setTitle('Tableau de bord');
  6. $this->setMetaRefresh(true);
  7. ?>
  8. <div class="dashboard-admin-index">
  9. <div class="row">
  10. <div class="col-lg-6 col-xs-6">
  11. <?= AdminLTE::smallBox(
  12. $countUsersOnline,
  13. 'En ligne',
  14. $countUsersOnline ? 'green' : 'blue',
  15. 'wifi',
  16. Yii::$app->urlManager->createUrl('online-admin/index')
  17. ) ?>
  18. </div>
  19. <div class="col-lg-6 col-xs-6" id="producers-online">
  20. <!--<h3>Producteurs en ligne :</h3>-->
  21. <?php if($usersWithStatusProducerOnlineArray && count($usersWithStatusProducerOnlineArray) > 0): ?>
  22. <?php foreach ($usersWithStatusProducerOnlineArray as $userWithStatusProducerOnline): ?>
  23. <?php $producer = $userWithStatusProducerOnline->producer; ?>
  24. <?php if($producer): ?>
  25. <a class="btn btn-default" title="Aller sur le compte de ce producteur" href="<?= $this->getUrlManagerBackend()->createUrl(['site/switch-producer', 'id' => $producer->id]); ?>">
  26. <?= $producer->name; ?>
  27. </a>
  28. <?php endif; ?>
  29. <?php endforeach; ?>
  30. <div class="clr"></div>
  31. <?php else: ?>
  32. <div class="alert alert-info">Aucun producteur en ligne actuellement.</div>
  33. <?php endif; ?>
  34. </div>
  35. </div>
  36. <div class="row">
  37. <div class="col-lg-6 col-xs-6">
  38. <?= AdminLTE::smallBox(
  39. $supportOnline ? 'Oui' : 'Non',
  40. 'Support activé',
  41. $supportOnline ? 'green' : 'blue',
  42. 'phone',
  43. Yii::$app->urlManager->createUrl(['dashboard-admin/support-online-toggle', 'active' => $supportOnline ? 0 : 1]),
  44. $supportOnline ? 'Désactiver' : 'Activer'
  45. ) ?>
  46. </div>
  47. <div class="col-lg-6 col-xs-6">
  48. <?= AdminLTE::smallBox(
  49. $countTicketsAdminOpen,
  50. 'Tickets',
  51. $countTicketsAdminUnread ? 'green' : 'blue',
  52. 'comments',
  53. Yii::$app->urlManager->createUrl('support-admin/index')
  54. ) ?>
  55. </div>
  56. </div>
  57. <div id="dashboard-admin-statistics-html">
  58. <a class="btn btn-default btn-load" href="javascript:void(0);">Charger les statistiques</a>
  59. </div>
  60. </div>