Browse Source

Supprimer l'illustration et bien afficher la photo seulement quand elle existe

master
keun 8 years ago
parent
commit
f18e788d15
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      frontend/views/commande/_form.php

+ 1
- 2
frontend/views/commande/_form.php View File

<?php foreach ($produits as $p): ?> <?php foreach ($produits as $p): ?>
<tr class="produit-<?php echo $p->id; ?>" <?php if (count($produits_dispos) && !$produits_dispos[$p->id]['actif']): ?>style="display:none;"<?php endif; ?>> <tr class="produit-<?php echo $p->id; ?>" <?php if (count($produits_dispos) && !$produits_dispos[$p->id]['actif']): ?>style="display:none;"<?php endif; ?>>
<td class="produit"> <td class="produit">
<?php if (strlen($p->photo)): ?><br /><a href="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->photo ?>" data-lightbox="produit-<?php echo $p->id; ?>"><img class="photo img-rounded img-thumbnail" src="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->photo ?>" alt="Photo <?= Html::encode($p->nom); ?>" /></a><?php endif; ?>
<?php if (strlen($p->illustration)): ?><img class="illu" src="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->illustration ?>" alt="illustration <?= Html::encode($p->nom); ?>" /><?php endif; ?>
<?php if (strlen($p->photo) && file_exists(dirname(__FILE__).'/../../web/uploads/' . $p->photo)): ?><br /><a href="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->photo ?>" data-lightbox="produit-<?php echo $p->id; ?>"><img class="photo img-rounded img-thumbnail" src="<?= Yii::$app->urlManager->getBaseUrl() . '/uploads/' . $p->photo ?>" alt="Photo <?= Html::encode($p->nom); ?>" /></a><?php endif; ?>
<span class="nom"><?= Html::encode($p->nom); ?></span> - <span class="description"><?= Html::encode($p->getDescription()); ?></span><br /> <span class="nom"><?= Html::encode($p->nom); ?></span> - <span class="description"><?= Html::encode($p->getDescription()); ?></span><br />
<span class="recette"><?= Html::encode($p->recette); ?></span> <span class="recette"><?= Html::encode($p->recette); ?></span>
</td> </td>

Loading…
Cancel
Save