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']) : \Yii::$app->urlManagerFrontend->createUrl(['site/signup-producer']); ?>">
  11. <span class="glyphicon glyphicon-user"></span> 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. <?php endif; ?>
  18. <?php else: ?>
  19. <div class="label label-warning label-producer-signup-closed">
  20. La plateforme n'accueille pas de nouveaux producteurs pour le moment
  21. </div>
  22. <?php endif; ?>
  23. <br />
  24. <br />