|
|
@@ -329,25 +329,27 @@ $mainColor = $producer->option_main_color ?: '#ee6f42' ; |
|
|
|
|
|
|
|
<?php |
|
|
|
// Message utilisateur |
|
|
|
$userMessagesArray = $userMessageModule->getRepository()->findUserMessagesUnreadByUser($userCurrent); |
|
|
|
if($userMessagesArray && count($userMessagesArray)): |
|
|
|
foreach($userMessagesArray as $userMessage): ?> |
|
|
|
<div class="alert alert-info"> |
|
|
|
<h4 class="alert-heading"> |
|
|
|
<i class="bi bi-envelope"></i> |
|
|
|
Nouveau message |
|
|
|
</h4> |
|
|
|
<p><?= nl2br(Html::encode($userMessage->getMessage())) ?></p> |
|
|
|
<p> |
|
|
|
<a class="alert-link" href="<?= Yii::$app->urlManager->createUrl(['site/'.($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userMessage->getCreatedBy()) ? 'support' : 'contact')]); ?>"> |
|
|
|
Répondre</a> |
|
|
|
• |
|
|
|
<a class="alert-link" href="<?= Yii::$app->urlManager->createUrl(['site/user-message-read', 'idUserMessage' => $userMessage->getId()]); ?>"> |
|
|
|
Fermer |
|
|
|
</a> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
<?php endforeach; |
|
|
|
if($userCurrent): |
|
|
|
$userMessagesArray = $userMessageModule->getRepository()->findUserMessagesUnreadByUser($userCurrent); |
|
|
|
if($userMessagesArray && count($userMessagesArray)): |
|
|
|
foreach($userMessagesArray as $userMessage): ?> |
|
|
|
<div class="alert alert-info"> |
|
|
|
<h4 class="alert-heading"> |
|
|
|
<i class="bi bi-envelope"></i> |
|
|
|
Nouveau message |
|
|
|
</h4> |
|
|
|
<p><?= nl2br(Html::encode($userMessage->getMessage())) ?></p> |
|
|
|
<p> |
|
|
|
<a class="alert-link" href="<?= Yii::$app->urlManager->createUrl(['site/'.($userModule->getAuthorizationChecker()->isGrantedAsAdministrator($userMessage->getCreatedBy()) ? 'support' : 'contact')]); ?>"> |
|
|
|
Répondre</a> |
|
|
|
• |
|
|
|
<a class="alert-link" href="<?= Yii::$app->urlManager->createUrl(['site/user-message-read', 'idUserMessage' => $userMessage->getId()]); ?>"> |
|
|
|
Fermer |
|
|
|
</a> |
|
|
|
</p> |
|
|
|
</div> |
|
|
|
<?php endforeach; |
|
|
|
endif; |
|
|
|
endif; ?> |
|
|
|
|
|
|
|
<?php |