|
- <?php
-
-
-
- use common\helpers\Image;
- use yii\helpers\Html;
-
- $producerModule = $this->getProducerModule();
- $userModule = $this->getUserModule();
- $this->setTitle('En ligne');
- $this->addBreadcrumb($this->getTitle());
- $this->setMetaRefresh(true);
-
- ?>
- <div class="online-index">
-
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">
- <div class="glyphicon glyphicon-grain"></div>
- Producteurs (<?= count($usersWithStatusProducerOnlineArray); ?>)
- </h3>
- </div>
- <div class="panel-body">
- <?php if($usersWithStatusProducerOnlineArray && count($usersWithStatusProducerOnlineArray) > 0): ?>
- <?php foreach ($usersWithStatusProducerOnlineArray as $userWithStatusProducerOnline): ?>
- <?php $producer = $userWithStatusProducerOnline->producer; ?>
- <?php if($producer): ?>
- <div class="col-md-3">
- <div class="box box-primary box-producer">
- <div class="box-body box-profile">
- <?php if ($producer->logo && Image::isPhotoExist($producer->logo)): ?>
- <img class="profile-user-img img-responsive img-circle"
- src="<?= Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl; ?>/uploads/<?= $producer->logo; ?>"
- alt="Logo <?= Html::encode($producer->name) ?>">
- <?php endif; ?>
- <h3 class="profile-username text-center">
- <a title="Aller sur le compte de ce producteur" href="<?= $this->getUrlManagerBackend()->createUrl(['site/switch-producer', 'id' => $producer->id]); ?>">
- <?= $producer->name; ?>
- </a>
- </h3>
- <p class="text-muted text-center">
- <?= $userModule->getSolver()->getUsername($userWithStatusProducerOnline); ?><br/>
- </p>
- </div>
- </div>
- </div>
- <?php endif; ?>
- <?php endforeach; ?>
- <div class="clr"></div>
- <?php else: ?>
- <div class="alert alert-info">Aucun producteur en ligne actuellement.</div>
- <?php endif; ?>
- </div>
- </div>
-
- <div class="panel panel-default">
- <div class="panel-heading">
- <h3 class="panel-title">
- <span class="glyphicon glyphicon-user"></span>
- Utilisateurs (<?= count($usersWithStatusUserOnlineArray); ?>)
- </h3>
- </div>
- <div class="panel-body">
- <?php if($usersWithStatusUserOnlineArray && count($usersWithStatusUserOnlineArray) > 0): ?>
- <?php foreach ($usersWithStatusUserOnlineArray as $userWithStatusUserOnline): ?>
- <div class="col-md-3">
- <div class="box box-primary box-user">
- <div class="box-body box-profile">
- <h3 class="profile-username text-center">
- <?= $userModule->getSolver()->getUsername($userWithStatusUserOnline); ?>
- </h3>
- <p class="text-muted text-center">
- <?php $userProducerArray = $userWithStatusUserOnline->userProducer; ?>
- <?php foreach($userProducerArray as $userProducer): ?>
- <?php if($userProducer->active && $userProducer->bookmark): ?>
- <span class="label label-default"><?= $userProducer->producer->name; ?></span>
- <?php endif; ?>
- <?php endforeach; ?>
- </p>
- </div>
- </div>
- </div>
- <?php endforeach; ?>
- <div class="clr"></div>
- <?php else: ?>
- <div class="alert alert-info">Aucun utilisateur en ligne actuellement.</div>
- <?php endif; ?>
- </div>
- </div>
- </div>
|