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.

52 lines
1.6KB

  1. <?php
  2. $producer = $this->context->getProducer() ;
  3. $this->setPageTitle(Html::encode($producer->type.' à '.$producer->ville)) ;
  4. ?>
  5. <?php if(strlen($producer->description) || strlen($producer->photo)): ?>
  6. <?php
  7. if(strlen($producer->description) && strlen($producer->photo))
  8. $col_size = 'col-md-6' ;
  9. else
  10. $col_size = 'col-md-12' ;
  11. ?>
  12. <section id="presentation">
  13. <?php if(strlen($producer->photo)): ?>
  14. <div class="photo <?= $col_size ?>">
  15. <img class="img-photo" src="<?= Yii::$app->urlManager->baseUrl; ?>/uploads/<?= $producer->photo; ?>" alt="Photo <?= Html::encode($producer->nom) ?>" />
  16. </div>
  17. <?php endif; ?>
  18. <?php if(strlen($producer->description)): ?>
  19. <div class="description <?= $col_size ?>">
  20. <?= nl2br(Html::encode($producer->description)); ?>
  21. </div>
  22. <?php endif; ?>
  23. <div class="clr"></div>
  24. </section>
  25. <?php endif; ?>
  26. <?php if(is_array($points_vente) && count($points_vente)): ?>
  27. <section id="points-vente">
  28. <h3><span>Points de vente</span></h3>
  29. <table class="table table-bordered">
  30. <thead>
  31. <tr>
  32. <th>Nom</th>
  33. <th>Localisation</th>
  34. <th>Jours de livraison</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <?php foreach($points_vente as $pv): ?>
  39. <tr>
  40. <td><?= Html::encode($pv->nom); ?></td>
  41. <td><?= Html::encode($pv->localite); ?></td>
  42. <td><?= Html::encode($pv->strJoursLivraison()); ?></td>
  43. </tr>
  44. <?php endforeach; ?>
  45. </tbody>
  46. </table>
  47. </section>
  48. <?php endif; ?>