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.

27 lines
1.2KB

  1. <?php
  2. $userModule = $this->getUserModule();
  3. $producerManager = $this->getProducerModule()->getManager();
  4. $producerSignupRemainingPlaces = $producerManager->getProducerSignupRemainingPlaces();
  5. $userCurrent = $this->getUserCurrent();
  6. ?>
  7. <?php if($producerManager->isProducerSignupOpen()): ?>
  8. <?php if(Yii::$app->user->isGuest || $userModule->getSolver()->isStatusUser($userCurrent)): ?>
  9. <a class="btn btn-primary"
  10. href="<?= Yii::$app->user->isGuest ? \Yii::$app->urlManagerFrontend->createUrl(['site/signup', 'type' => 'producer']) : \Yii::$app->urlManagerFrontend->createUrl(['site/signup-producer']); ?>">
  11. <i class="bi bi-shop"></i> Je crée mon espace producteur
  12. </a><br />
  13. <?php if($producerManager->getMaximumNumberProducers()): ?>
  14. <strong><?= ($producerSignupRemainingPlaces); ?></strong>
  15. place<?php if($producerSignupRemainingPlaces > 1): ?>s<?php endif; ?> restante<?php if($producerSignupRemainingPlaces > 1): ?>s<?php endif; ?>
  16. <?php endif; ?>
  17. <br />
  18. <br />
  19. <?php endif; ?>
  20. <?php else: ?>
  21. <div class="label label-warning label-producer-signup-closed">
  22. La plateforme n'accueille pas de nouveaux producteurs pour le moment
  23. </div>
  24. <?php endif; ?>