소스 검색

[Backend] Documents : faire en sorte de pouvoir avoir plus de lignes produits par page #340

refactoring
Guillaume Bourgeois 2 년 전
부모
커밋
ce98ff4a37
7개의 변경된 파일49개의 추가작업 그리고 19개의 파일을 삭제
  1. +1
    -1
      backend/views/document/_download_product_line.php
  2. +5
    -2
      backend/views/document/download.php
  3. +4
    -0
      backend/views/producer/update.php
  4. +13
    -12
      backend/web/css/document/download.css
  5. +3
    -3
      backend/web/sass/document/download.scss
  6. +3
    -1
      common/models/Producer.php
  7. +20
    -0
      console/migrations/m220823_083001_add_option_document_display_product_description.php

+ 1
- 1
backend/views/document/_download_product_line.php 파일 보기

@@ -4,7 +4,7 @@
<?php if($productOrder->unit == 'piece' && isset($productOrder->product->weight) && $productOrder->product->weight): ?>
<span class="weight"> / <?= $productOrder->product->weight ?> g</span>
<?php endif; ?>
<?php if(strlen($productOrder->product->description)): ?>
<?php if(strlen($productOrder->product->description) && $displayProductDescription): ?>
<br /><small><?= Html::encode($productOrder->product->description) ?></small>
<?php endif; ?>
</td>

+ 5
- 2
backend/views/document/download.php 파일 보기

@@ -1,6 +1,7 @@
<?php

$displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$app->controller->getClass() == 'DeliveryNote' && Producer::getConfig('document_display_prices_delivery_note')) ;
$displayProductDescription = Producer::getConfig('document_display_product_description');

?>

@@ -99,7 +100,8 @@ $displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$a
'document' => $document,
'productOrder' => $productOrder,
'displayOrders' => true,
'displayPrices' => $displayPrices
'displayPrices' => $displayPrices,
'displayProductDescription' => $displayProductDescription
]) ?>
<?php endforeach; ?>
<?php endforeach; ?>
@@ -109,7 +111,8 @@ $displayPrices = Yii::$app->controller->getClass() != 'DeliveryNote' || (Yii::$a
<?= $this->render('_download_product_line', [
'document' => $document,
'productOrder' => $productOrder,
'displayPrices' => $displayPrices
'displayPrices' => $displayPrices,
'displayProductDescription' => $displayProductDescription
]) ?>
<?php endforeach; ?>
<?php endforeach; ?>

+ 4
- 0
backend/views/producer/update.php 파일 보기

@@ -445,6 +445,10 @@ $this->addBreadcrumb($this->getTitle()) ;
0 => 'Non',
1 => 'Oui'
]) ; ?>
<?= $form->field($model, 'document_display_product_description')->dropDownList([
0 => 'Non',
1 => 'Oui'
]) ; ?>
<?= $form->field($model, 'document_infos_bottom')
->textarea(['rows' => 15]) ?>
<?= $form->field($model, 'document_infos_quotation')

+ 13
- 12
backend/web/css/document/download.css 파일 보기

@@ -10,48 +10,48 @@ body {
/* line 14, ../../sass/document/download.scss */
.document-download #block-addresses .producer {
text-align: left;
margin-bottom: 20px;
margin-bottom: 5px;
}
/* line 19, ../../sass/document/download.scss */
/* line 18, ../../sass/document/download.scss */
.document-download #block-addresses .producer .logo {
margin-bottom: 20px;
}
/* line 27, ../../sass/document/download.scss */
/* line 26, ../../sass/document/download.scss */
.document-download #block-addresses .user {
text-align: right;
}
/* line 32, ../../sass/document/download.scss */
/* line 31, ../../sass/document/download.scss */
.document-download #block-infos-document {
padding-top: 30px;
padding-top: 15px;
}
/* line 35, ../../sass/document/download.scss */
/* line 34, ../../sass/document/download.scss */
.document-download #block-infos-document .date {
padding-bottom: 10px;
}
/* line 38, ../../sass/document/download.scss */
/* line 37, ../../sass/document/download.scss */
.document-download #block-infos-document .reference {
padding-bottom: 10px;
font-size: 15px;
font-weight: bold;
}
/* line 43, ../../sass/document/download.scss */
/* line 42, ../../sass/document/download.scss */
.document-download #block-infos-document .reference .block-is-draft {
border: solid 2px black;
padding: 10px;
text-transform: uppercase;
}
/* line 54, ../../sass/document/download.scss */
/* line 53, ../../sass/document/download.scss */
.document-download #block-no-product {
font-weight: bold;
border: solid 2px black;
text-transform: uppercase;
padding: 10px;
}
/* line 61, ../../sass/document/download.scss */
/* line 60, ../../sass/document/download.scss */
.document-download #block-products {
padding-top: 20px;
}
/* line 64, ../../sass/document/download.scss */
/* line 63, ../../sass/document/download.scss */
.document-download #block-products table {
width: 100%;
padding: 0px;
@@ -60,12 +60,13 @@ body {
border-right: solid 1px #c0c0c0;
border-collapse: collapse;
}
/* line 72, ../../sass/document/download.scss */
/* line 71, ../../sass/document/download.scss */
.document-download #block-products table td, .document-download #block-products table th {
padding: 5px;
border-top: solid 1px #c0c0c0;
border-left: solid 1px #c0c0c0;
font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
}
/* line 78, ../../sass/document/download.scss */
.document-download #block-products table td.align-left, .document-download #block-products table th.align-left {

+ 3
- 3
backend/web/sass/document/download.scss 파일 보기

@@ -12,9 +12,8 @@ body {
#block-addresses {

.producer {

text-align: left ;
margin-bottom: 20px ;
margin-bottom: 5px ;

.logo {
margin-bottom: 20px ;
@@ -30,7 +29,7 @@ body {
}

#block-infos-document {
padding-top: 30px ;
padding-top: 15px ;

.date {
padding-bottom: 10px ;
@@ -74,6 +73,7 @@ body {
border-top: solid 1px $border-color ;
border-left: solid 1px $border-color ;
font-family: $font-family ;
font-size: 13px;

&.align-left {
text-align: left ;

+ 3
- 1
common/models/Producer.php 파일 보기

@@ -222,6 +222,7 @@ class Producer extends ActiveRecordCommon
'document_display_orders_invoice',
'document_display_orders_delivery_note',
'document_display_prices_delivery_note',
'document_display_product_description',
'option_email_confirm',
'option_email_confirm_producer',
'option_csv_export_all_products',
@@ -359,7 +360,8 @@ class Producer extends ActiveRecordCommon
'option_allow_order_guest' => 'Autoriser les visiteurs à passer commande (création de compte à la fin du tunnel)',
'option_order_entry_point' => 'Point d\'entrée par point de vente ou par date',
'option_delivery' => 'Proposer la livraison à domicile',
'option_display_export_grid' => 'Afficher l\'export grille dans les distributions'
'option_display_export_grid' => 'Afficher l\'export grille dans les distributions',
'document_display_product_description' => 'Documents : afficher la description des produits'
];
}


+ 20
- 0
console/migrations/m220823_083001_add_option_document_display_product_description.php 파일 보기

@@ -0,0 +1,20 @@
<?php

use yii\db\Migration;
use yii\db\Schema ;

/**
* Class m220823_083001_add_option_document_display_product_description
*/
class m220823_083001_add_option_document_display_product_description extends Migration
{
public function safeUp()
{
$this->addColumn('producer', 'document_display_product_description', Schema::TYPE_BOOLEAN.' DEFAULT 1');
}

public function safeDown()
{
$this->dropColumn('producer', 'document_display_product_description');
}
}

Loading…
취소
저장