Browse Source

Ajout de la photo du produit dans la liste des produits du backend

prodstable
keun 8 years ago
parent
commit
8ddf2b748d
4 changed files with 36 additions and 0 deletions
  1. +16
    -0
      backend/views/produit/index.php
  2. BIN
      backend/web/.sass-cache/c8fef7d48da4dc7f024edc2b0fada9d8d6de5dac/screen.scssc
  3. +10
    -0
      backend/web/css/screen.css
  4. +10
    -0
      backend/web/sass/screen.scss

+ 16
- 0
backend/views/produit/index.php View File

return '<a class="btn-order btn btn-default" href="javascript:void(0);"><span class="glyphicon glyphicon-resize-vertical"></span></a>' ; return '<a class="btn-order btn btn-default" href="javascript:void(0);"><span class="glyphicon glyphicon-resize-vertical"></span></a>' ;
} }
], ],
[
'attribute' => 'photo',
'format' => 'raw',
'headerOptions' => ['class' => 'td-photo'],
'value' => function($model) {
if(strlen($model->photo)) {
if(Yii::$app->getRequest()->serverName == 'localhost')
$url = '../../frontend/web/' ;
else
$url = 'http://www.laboiteapain.net/' ;

return '<img class="photo-produit" src="'.$url.'uploads/'.$model->photo.'" />' ;
}
return '' ;
}
],
'nom', 'nom',
'description', 'description',
[ [

BIN
backend/web/.sass-cache/c8fef7d48da4dc7f024edc2b0fada9d8d6de5dac/screen.scssc View File


+ 10
- 0
backend/web/css/screen.css View File

.produit-create .field-produit-id_etablissement { .produit-create .field-produit-id_etablissement {
display: none; display: none;
} }

/* line 417, ../sass/screen.scss */
.produit-index .td-photo {
max-width: 100px;
width: 100px;
}
/* line 421, ../sass/screen.scss */
.produit-index .photo-produit {
max-width: 100px;
}

+ 10
- 0
backend/web/sass/screen.scss View File

.field-produit-id_etablissement { .field-produit-id_etablissement {
display: none; display: none;
} }
}

.produit-index {
.td-photo {
max-width: 100px ;
width: 100px ;
}
.photo-produit {
max-width: 100px ;
}
} }

Loading…
Cancel
Save