Browse Source

Merge branch 'dev'

master
Guillaume Bourgeois 4 years ago
parent
commit
85f8cfbf5b
5 changed files with 21 additions and 19 deletions
  1. +5
    -5
      backend/views/delivery-note/index.php
  2. +5
    -5
      backend/views/invoice/index.php
  3. +3
    -2
      backend/views/product/_form.php
  4. +3
    -2
      backend/views/product/index.php
  5. +5
    -5
      backend/views/quotation/index.php

+ 5
- 5
backend/views/delivery-note/index.php View File

'buttons' => [ 'buttons' => [
'send' => function($url, $model) { 'send' => function($url, $model) {
return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [
'title' => Yii::t('app', 'Envoyer'), 'class' => 'btn btn-default'
'title' => 'Envoyer', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'download' => function($url, $model) { 'download' => function($url, $model) {
return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [
'title' => Yii::t('app', 'Télécharger'), 'class' => 'btn btn-default'
'title' => 'Télécharger', 'class' => 'btn btn-default'
]); ]);
}, },
'validate' => function ($url, $model) { 'validate' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [
'title' => Yii::t('app', 'Valider'), 'class' => 'btn btn-default'
'title' => 'Valider', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'update' => function ($url, $model) { 'update' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
'title' => 'Modifier', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'delete' => function ($url, $model) { 'delete' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
'title' => 'Supprimer', 'class' => 'btn btn-default'
]) : ''); ]) : '');
} }
], ],

+ 5
- 5
backend/views/invoice/index.php View File

'buttons' => [ 'buttons' => [
'validate' => function ($url, $model) { 'validate' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [
'title' => Yii::t('app', 'Valider'), 'class' => 'btn btn-default'
'title' => 'Valider', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'send' => function($url, $model) { 'send' => function($url, $model) {
return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [
'title' => Yii::t('app', 'Envoyer'), 'class' => 'btn btn-default'
'title' => 'Envoyer', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'download' => function($url, $model) { 'download' => function($url, $model) {
return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [
'title' => Yii::t('app', 'Télécharger'), 'class' => 'btn btn-default'
'title' => 'Télécharger', 'class' => 'btn btn-default'
]); ]);
}, },
'update' => function ($url, $model) { 'update' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
'title' => 'Modifier', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'delete' => function ($url, $model) { 'delete' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
'title' => 'Supprimer', 'class' => 'btn btn-default'
]) : ''); ]) : '');
} }
], ],

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

<?= $form->field($model, 'photo')->fileInput() ?> <?= $form->field($model, 'photo')->fileInput() ?>
<?php <?php
if (strlen($model->photo)) { if (strlen($model->photo)) {
$url = Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl;
echo '<img class="photo-product" src="' . $url . '/uploads/' . $model->photo . '" width="200px" /><br />';
$url = Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl . '/uploads/' . $model->photo;
$url = str_replace('//uploads','/uploads', $url) ;
echo '<img class="photo-product" src="' . $url . '" width="200px" /><br />';
echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />'; echo '<input type="checkbox" name="delete_photo" id="delete_photo" /> <label for="delete_photo">Supprimer la photo</label><br /><br />';
} }
?> ?>

+ 3
- 2
backend/views/product/index.php View File

'filter' => '', 'filter' => '',
'value' => function ($model) { 'value' => function ($model) {
if (strlen($model->photo)) { if (strlen($model->photo)) {
$url = Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl;
return '<img class="photo-product" src="' . $url . '/uploads/' . $model->photo . '" />';
$url = Yii::$app->urlManagerProducer->getHostInfo() . '/' . Yii::$app->urlManagerProducer->baseUrl . '/uploads/'.$model->photo ;
$url = str_replace('//uploads','/uploads', $url) ;
return '<img class="photo-product" src="' . $url . '" />';
} }
return ''; return '';
} }

+ 5
- 5
backend/views/quotation/index.php View File

'buttons' => [ 'buttons' => [
'validate' => function ($url, $model) { 'validate' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-ok"></span>', $url, [
'title' => Yii::t('app', 'Valider'), 'class' => 'btn btn-default'
'title' => 'Valider', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'send' => function($url, $model) { 'send' => function($url, $model) {
return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [ return (!$model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-send"></span>', $url, [
'title' => Yii::t('app', 'Envoyer'), 'class' => 'btn btn-default'
'title' => 'Envoyer', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'download' => function($url, $model) { 'download' => function($url, $model) {
return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [ return Html::a('<span class="glyphicon glyphicon-download-alt"></span>', $url, [
'title' => Yii::t('app', 'Télécharger'), 'class' => 'btn btn-default'
'title' => 'Télécharger', 'class' => 'btn btn-default'
]); ]);
}, },
'update' => function ($url, $model) { 'update' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-pencil"></span>', $url, [
'title' => Yii::t('app', 'Modifier'), 'class' => 'btn btn-default'
'title' => 'Modifier', 'class' => 'btn btn-default'
]) : ''); ]) : '');
}, },
'delete' => function ($url, $model) { 'delete' => function ($url, $model) {
return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [ return ($model->isStatusDraft() ? Html::a('<span class="glyphicon glyphicon-trash"></span>', $url, [
'title' => Yii::t('app', 'Supprimer'), 'class' => 'btn btn-default'
'title' => 'Supprimer', 'class' => 'btn btn-default'
]) : ''); ]) : '');
} }
], ],

Loading…
Cancel
Save