Sfoglia il codice sorgente

Adaptations backend/product

dev
parent
commit
0898a6a98a
2 ha cambiato i file con 3 aggiunte e 3 eliminazioni
  1. +2
    -2
      backend/views/product/_form.php
  2. +1
    -1
      backend/views/product/index.php

+ 2
- 2
backend/views/product/_form.php Vedi 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 Vedi 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…
Annulla
Salva