コード例 #1
0
ファイル: _form.php プロジェクト: harryandriyan/simkos
$this->beginBlock('main');
?>

                <p>
                    
			<?php 
echo $form->field($model, 'id')->textInput();
?>
			<?php 
echo $form->field($model, 'kamar')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'harga')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'status')->dropDownList(app\models\base\Kamarkos::optsstatus());
?>
			<?php 
echo $form->field($model, 'tanggal_add')->textInput();
?>
			<?php 
echo $form->field($model, 'tanggal_update')->textInput();
?>
                </p>
                <?php 
$this->endBlock();
?>
                
                <?php 
echo Tabs::widget(['encodeLabels' => false, 'items' => [['label' => 'Kamarkos', 'content' => $this->blocks['main'], 'active' => true]]]);
?>
コード例 #2
0
ファイル: view.php プロジェクト: harryandriyan/simkos
                <?php 
echo $model->id;
?>
            </h2>
        </div>

        <div class="panel-body">



    <?php 
$this->beginBlock('app\\models\\base\\Kamarkos');
?>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'kamar', 'harga', ['attribute' => 'status', 'value' => app\models\base\Kamarkos::getStatusValueLabel($model->status)], 'tanggal_add', 'tanggal_update']]);
?>

    <hr/>

    <?php 
echo Html::a('<span class="glyphicon glyphicon-trash"></span> ' . 'Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data-confirm' => '' . 'Are you sure to delete this item?' . '', 'data-method' => 'post']);
?>
    <?php 
$this->endBlock();
?>


    
    <?php 
echo Tabs::widget(['id' => 'relation-tabs', 'encodeLabels' => false, 'items' => [['label' => '<b class=""># ' . $model->id . '</b>', 'content' => $this->blocks['app\\models\\base\\Kamarkos'], 'active' => true]]]);
コード例 #3
0
ファイル: index.php プロジェクト: harryandriyan/simkos
?>
</i>
                </h2>
            </div>

            <div class="panel-body">

                <div class="table-responsive">
                <?php 
echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => 'First', 'lastPageLabel' => 'Last'], 'filterModel' => $searchModel, 'tableOptions' => ['class' => 'table table-striped table-bordered table-hover'], 'headerRowOptions' => ['class' => 'x'], 'columns' => [['class' => 'yii\\grid\\ActionColumn', 'urlCreator' => function ($action, $model, $key, $index) {
    // using the column name as key, not mapping to 'id' like the standard generator
    $params = is_array($key) ? $key : [$model->primaryKey()[0] => (string) $key];
    $params[0] = \Yii::$app->controller->id ? \Yii::$app->controller->id . '/' . $action : $action;
    return Url::toRoute($params);
}, 'contentOptions' => ['nowrap' => 'nowrap']], 'harga', ['attribute' => 'status', 'value' => function ($model) {
    return app\models\base\Kamarkos::getStatusValueLabel($model->status);
}], 'tanggal_add', 'tanggal_update', 'kamar']]);
?>
                </div>

            </div>

        </div>

        <?php 
\yii\widgets\Pjax::end();
?>

    
</div>