Exemplo n.º 1
0
                <?php 
echo $model->id;
?>
            </h2>
        </div>

        <div class="panel-body">



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

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'nomor_identitas', 'nama', ['attribute' => 'jenis_kelamin', 'value' => app\models\Pemohon::getJenisKelaminValueLabel($model->jenis_kelamin)], 'tempat_lahir', 'tanggal_lahir', ['attribute' => 'agama', 'value' => app\models\Pemohon::getAgamaValueLabel($model->agama)], 'alamat:ntext', 'pekerjaan', 'tempat', 'nomor_telpon', 'nama_orangtua', ['attribute' => 'agama_orangtua', 'value' => app\models\Pemohon::getAgamaOrangtuaValueLabel($model->agama_orangtua)], 'pekerjaan_orangtua', 'nomor_telpon_orangtua', 'nama_saudara', ['attribute' => 'agama_saudara', 'value' => app\models\Pemohon::getAgamaSaudaraValueLabel($model->agama_saudara)], 'pekerjaan_saudara', 'nomor_telpon_saudara', 'hubungan_saudara', 'keterangan:ntext', '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\\Pemohon'], 'active' => true]]]);
Exemplo n.º 2
0
?>
</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']], 'nomor_identitas', 'nama', 'tempat_lahir', 'tanggal_lahir', ['attribute' => 'agama', 'value' => function ($model) {
    return app\models\Pemohon::getAgamaValueLabel($model->agama);
}], 'nomor_telpon', ['attribute' => 'agama_orangtua', 'value' => function ($model) {
    return app\models\Pemohon::getAgamaOrangtuaValueLabel($model->agama_orangtua);
}]]]);
?>
                </div>

            </div>

        </div>

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