- <?php
-
-
-
- use domain\User\User\UserModule;
- use yii\helpers\Html;
-
- $userModule = UserModule::getInstance();
-
- $this->setTitle("Bulletin d'information");
-
- ?>
- <div class="newsletter-index">
- <?php if($userModule->isUserSubscribedNewsletter($user)): ?>
- <div class="panel panel-default">
- <div class="panel-body">
- Vous êtes inscrit au bulletin d'information <strong><?= Html::encode($producer->name) ?></strong>.
- </div>
- </div>
- <p>
- <a class="btn btn-danger" href="<?= $this->getUrlManagerProducer()->createUrl(['newsletter/unsubscribe']) ?>">
- Me désinscrire
- </a>
- </p>
- <?php else: ?>
- <div class="panel panel-default">
- <div class="panel-body">
- Vous n'êtes pas inscrit au bulletin d'information <strong><?= Html::encode($producer->name) ?></strong>.
- </div>
- </div>
- <p>
- <a class="btn btn-success" href="<?= $this->getUrlManagerProducer()->createUrl(['newsletter/subscribe']) ?>">
- M'inscrire
- </a>
- </p>
- <?php endif; ?>
- </div>
|