Exemple #1
0
    <div class="">
        <?php 
$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]);
Exemple #2
0
        <div class="pull-right">
            <?php 
echo Html::a('<span class="glyphicon glyphicon-list"></span> ' . 'List Events', ['index'], ['class' => 'btn btn-default']);
?>
        </div>

    </div>


    <?php 
$this->beginBlock('common\\models\\event\\Event');
?>

    
    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', ['format' => 'html', 'attribute' => 'user_id', 'value' => $model->getUser()->one() ? Html::a($model->getUser()->one()->id, ['user/view', 'id' => $model->getUser()->one()->id]) : '<span class="label label-warning">?</span>'], 'theme', 'description:ntext', 'is_finished', ['attribute' => 'urgent', 'value' => common\models\event\Event::getUrgentValueLabel($model->urgent)], 'occur_at', 'created_at', 'updated_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 
Exemple #3
0

    <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']], ['class' => yii\grid\DataColumn::className(), 'attribute' => 'user_id', 'value' => function ($model) {
    if ($rel = $model->getUser()->one()) {
        return Html::a($rel->id, ['user/view', 'id' => $rel->id], ['data-pjax' => 0]);
    } else {
        return '';
    }
}, 'format' => 'raw'], 'theme', 'is_finished', 'description:ntext', ['attribute' => 'urgent', 'value' => function ($model) {
    return common\models\event\Event::getUrgentValueLabel($model->urgent);
}], 'occur_at', 'created_at', 'updated_at']]);
?>
    </div>

</div>


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



Exemple #4
0
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, 'theme')->textInput(['maxlength' => true]);
?>
			<?php 
echo $form->field($model, 'description')->textarea(['rows' => 6]);
?>
			<?php 
echo $form->field($model, 'is_finished')->textInput();
?>
			<?php 
echo $form->field($model, 'urgent')->dropDownList(common\models\event\Event::optsurgent());
?>
			<?php 
echo $form->field($model, 'occur_at')->textInput();
?>
			<?php 
echo $form->field($model, 'created_at')->textInput();
?>
			<?php 
echo $form->field($model, 'updated_at')->textInput();
?>
        </p>
        <?php 
$this->endBlock();
?>