Explorar el Código

Messages utilisateur boutique : correctif

feature/rotating_product
Guillaume Bourgeois hace 5 meses
padre
commit
e4366532a9
Se han modificado 1 ficheros con 21 adiciones y 19 borrados
  1. +21
    -19
      producer/views/layouts/main.php

+ 21
- 19
producer/views/layouts/main.php Ver fichero

@@ -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>
&bull;
<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>
&bull;
<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

Cargando…
Cancelar
Guardar