瀏覽代碼

Merge branch 'dev'

prodstable
Guillaume 3 年之前
父節點
當前提交
c93f65b17b
共有 1 個檔案被更改,包括 10 行新增6 行删除
  1. +10
    -6
      producer/views/site/index.php

+ 10
- 6
producer/views/site/index.php 查看文件

@@ -194,18 +194,22 @@ $this->setPageTitle(Html::encode($producer->type.' à '.$producer->city)) ;
] ;
?>

<?= GridView::widget([
'dataProvider' => $dataProviderProducts,
'summary' => '',
'columns' => $columnsProducts
]); ?>
<?php if($dataProviderProducts->query->count()) : ?>
<?= GridView::widget([
'dataProvider' => $dataProviderProducts,
'summary' => '',
'columns' => $columnsProducts
]); ?>
<?php endif; ?>

<?php foreach($categories as $category): ?>
<h4><?= Html::encode($category->name) ?></h4>
<?php if($dataProviderProductsByCategories[$category->id]->query->count()): ?>
<h4><?= Html::encode($category->name) ?></h4>
<?= GridView::widget([
'dataProvider' => $dataProviderProductsByCategories[$category->id],
'summary' => '',
'columns' => $columnsProducts
]); ?>
<?php endif; ?>
<?php endforeach; ?>
</section>

Loading…
取消
儲存