瀏覽代碼

Adaptations backend/product

dev
Guillaume Bourgeois 5 年之前
父節點
當前提交
0898a6a98a
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. +2
    -2
      backend/views/product/_form.php
  2. +1
    -1
      backend/views/product/index.php

+ 2
- 2
backend/views/product/_form.php 查看文件

@@ -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 查看文件

@@ -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…
取消
儲存