Esempio n. 1
0
$this->beginBlock('main');
?>

        <p>
            
			<?php 
echo $form->field($model, 'id')->textInput();
?>
			<?php 
echo $form->field($model, 'user_id')->dropDownList(\yii\helpers\ArrayHelper::map(common\models\User::find()->all(), 'id', 'id'), ['prompt' => 'Select']);
?>
			<?php 
echo $form->field($model, 'event_id')->dropDownList(\yii\helpers\ArrayHelper::map(common\models\event\Event::find()->all(), 'id', 'id'), ['prompt' => 'Select']);
?>
			<?php 
echo $form->field($model, 'provider_id')->dropDownList(\yii\helpers\ArrayHelper::map(common\models\location\LocationProvider::find()->all(), 'id', 'id'), ['prompt' => 'Select']);
?>
			<?php 
echo $form->field($model, 'title_from_provider')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'title_from_API')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'latitude')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'longitude')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'is_reliable')->textInput();
Esempio n. 2
0
            <?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">&nbsp;' . '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();
?>



Esempio n. 3
0
        <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 
Esempio n. 4
0
    <?php 
$form = ActiveForm::begin(['id' => 'LocationProvider', 'layout' => 'horizontal', 'enableClientValidation' => true, 'errorSummaryCssClass' => 'error-summary alert alert-error']);
?>

    <div class="">
        <?php 
$this->beginBlock('main');
?>

        <p>
            
			<?php 
echo $form->field($model, 'id')->textInput();
?>
			<?php 
echo $form->field($model, 'identity_kind')->dropDownList(common\models\location\LocationProvider::optsidentitykind());
?>
			<?php 
echo $form->field($model, 'identity_info')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'latitude')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'longitude')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'provided_at')->textInput();
?>
			<?php 
echo $form->field($model, 'created_at')->textInput();