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.

index.php 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 id="producers-online" class="box box-solid">
  10. <div class="box-header with-border">
  11. <i class="fa fa-bookmark"></i>
  12. <h3 class="box-title">Producteurs en ligne</h3>
  13. </div>
  14. <div class="box-body">
  15. <?php if($usersWithStatusProducerOnlineArray && count($usersWithStatusProducerOnlineArray) > 0): ?>
  16. <?php foreach ($usersWithStatusProducerOnlineArray as $userWithStatusProducerOnline): ?>
  17. <?php $producer = $userWithStatusProducerOnline->producer; ?>
  18. <?php if($producer): ?>
  19. <a class="btn btn-default" title="Aller sur le compte de ce producteur" href="<?= $this->getUrlManagerBackend()->createUrl(['site/switch-producer', 'id' => $producer->id]); ?>">
  20. <?= $producer->name; ?>
  21. </a>
  22. <?php endif; ?>
  23. <?php endforeach; ?>
  24. <div class="clr"></div>
  25. <?php else: ?>
  26. <p><em>Aucun producteur en ligne actuellement.</em></p>
  27. <?php endif; ?>
  28. </div>
  29. </div>
  30. <div class="row">
  31. <div class="col-lg-6 col-xs-6">
  32. <?= AdminLTE::smallBox(
  33. $countUsersOnline,
  34. 'Utilisateurs en ligne',
  35. $countUsersOnline ? 'green' : 'blue',
  36. 'wifi',
  37. Yii::$app->urlManager->createUrl('online-admin/index')
  38. ) ?>
  39. </div>
  40. <div class="col-lg-6 col-xs-6">
  41. <?php $countUsersWithProblemReceivingEmails = $this->getUserModule()->getRepository()->countUsersWithProblemReceivingEmails(); ?>
  42. <?= AdminLTE::smallBox(
  43. $countUsersWithProblemReceivingEmails,
  44. 'Problèmes réception emails',
  45. $countUsersWithProblemReceivingEmails ? 'red' : 'green',
  46. 'send',
  47. Yii::$app->urlManager->createUrl('user-admin/email-deliverability')
  48. ) ?>
  49. </div>
  50. </div>
  51. <div class="row">
  52. <div class="col-lg-6 col-xs-6">
  53. <?= AdminLTE::smallBox(
  54. $supportOnline ? 'Oui' : 'Non',
  55. 'Support activé',
  56. $supportOnline ? 'green' : 'blue',
  57. 'phone',
  58. Yii::$app->urlManager->createUrl(['dashboard-admin/support-online-toggle', 'active' => $supportOnline ? 0 : 1]),
  59. $supportOnline ? 'Désactiver' : 'Activer'
  60. ) ?>
  61. </div>
  62. <div class="col-lg-6 col-xs-6">
  63. <?= AdminLTE::smallBox(
  64. $countTicketsAdminOpen,
  65. 'Tickets',
  66. $countTicketsAdminUnread ? 'green' : 'blue',
  67. 'comments',
  68. Yii::$app->urlManager->createUrl('support-admin/index')
  69. ) ?>
  70. </div>
  71. </div>
  72. <div id="dashboard-admin-statistics-html">
  73. <a class="btn btn-default btn-load" href="javascript:void(0);">Charger les statistiques</a>
  74. </div>
  75. </div>