<div class="pull-right"> <?php echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List LocationProviders', ['index'], ['class' => 'btn btn-default']); ?> </div> </div> <?php $this->beginBlock('common\\models\\location\\LocationProvider'); ?> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['attribute' => 'identity_kind', 'value' => common\models\location\LocationProvider::getIdentityKindValueLabel($model->identity_kind)], 'identity_info', 'latitude', 'longitude', 'provided_at', 'created_at']]); ?> <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
<?php echo \yii\bootstrap\ButtonDropdown::widget(['id' => 'giiant-relations', 'encodeLabel' => false, 'label' => '<span class="glyphicon glyphicon-paperclip"></span> ' . 'Relations', 'dropdown' => ['options' => ['class' => 'dropdown-menu-right'], 'encodeLabels' => false, 'items' => [['url' => ['location-new/index'], 'label' => '<i class="glyphicon glyphicon-arrow-right"> ' . 'Location New' . '</i>']]], 'options' => ['class' => 'btn-default']]); ?> </div> </div> <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']], ['attribute' => 'identity_kind', 'value' => function ($model) { return common\models\location\LocationProvider::getIdentityKindValueLabel($model->identity_kind); }], 'identity_info', 'latitude', 'longitude', 'provided_at', 'created_at']]); ?> </div> </div> <?php \yii\widgets\Pjax::end(); ?>