Browse Source

Adaptations backend/product

refactoring
Guillaume Bourgeois 6 years ago
parent
commit
0898a6a98a
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      backend/views/product/_form.php
  2. +1
    -1
      backend/views/product/index.php

+ 2
- 2
backend/views/product/_form.php View File

@@ -61,8 +61,8 @@ use yii\widgets\ActiveForm;
<?= $form->field($model, 'photo')->fileInput() ?>
<?php
if(strlen($model->photo)) {
echo '<img src="../../frontend/web/uploads/'.$model->photo.'" width="200px" /><br />' ;
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />' ;
echo '<img src="'.Yii::$app->urlManagerProducer->getBaseUrl().'/uploads/'.$model->photo.'" width="200px" /><br />' ;
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />' ;
}
?>

+ 1
- 1
backend/views/product/index.php View File

@@ -68,7 +68,7 @@ $this->params['breadcrumbs'][] = $this->title;
'value' => function($model) {
if(strlen($model->photo)) {
$url = Yii::$app->urlManagerProducer->getBaseUrl() ;
return '<img class="photo-produit" src="'.$url.'uploads/'.$model->photo.'" />' ;
return '<img class="photo-product" src="'.$url.'/uploads/'.$model->photo.'" />' ;
}
return '' ;
}

Loading…
Cancel
Save