Example #1
0
$page->beginContent('table');
?>
        <?php 
$page->beginBulkForm();
?>
            <?php 
echo PartGridView::widget(['boxed' => false, 'dataProvider' => $dataProvider, 'tableOptions' => ['class' => 'table table-striped table-bordered table-condensed'], 'filterModel' => $model, 'locations' => $locations, 'summaryRenderer' => function ($grid) use($local_sums, $total_sums) {
    $locals = '';
    $totals = '';
    if (is_array($total_sums)) {
        foreach ($total_sums as $cur => $sum) {
            if ($cur && $sum > 0) {
                $totals .= ' &nbsp; <b>' . Yii::$app->formatter->asCurrency($sum, $cur) . '</b>';
            }
        }
    }
    if (is_array($local_sums)) {
        foreach ($local_sums as $cur => $sum) {
            if ($cur && $sum > 0) {
                $locals .= ' &nbsp; <b>' . Yii::$app->formatter->asCurrency($sum, $cur) . '</b>';
            }
        }
    }
    return $grid->parentSummary() . '<div class="summary">' . ($totals ? Yii::t('hipanel:stock', 'TOTAL') . ':' . $totals : null) . ($locals ? '<br><span class="text-muted">' . Yii::t('hipanel', 'on screen') . ':' . $locals . '</span>' : null) . '</div>';
}, 'representation' => $representation]);
?>
        <?php 
$page->endBulkForm();
?>
    <?php 
$page->endContent();
Example #2
0
$box = Box::begin(['renderBody' => false]);
?>
                <?php 
$box->beginHeader();
?>
                <?php 
echo $box->renderTitle(Yii::t('hipanel', 'Detailed information'));
?>
                <?php 
$box->endHeader();
?>
                <?php 
$box->beginBody();
?>
                <?php 
echo PartGridView::detailView(['boxed' => false, 'model' => $model, 'columns' => ['model_type_label', 'model_brand_label', 'partno', 'model', ['attribute' => 'serial'], 'last_move', 'move_type_label', 'move_time', 'order_data', 'dc_ticket', 'price', 'place']]);
?>
                <?php 
$box->endBody();
?>
                <?php 
$box->end();
?>

            </div>
        </div>
    </div>
    <div class="col-lg-9">
        <?php 
$page = IndexPage::begin(['model' => $model, 'layout' => 'noSearch']);
?>