add basic event objects

This commit is contained in:
Roland Schneider
2018-12-12 20:42:17 +01:00
parent 5599d2ef4b
commit b6e590f196
54 changed files with 2811 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Room */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="room-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
<?= $form->field($model, 'seat_count')->textInput(['type' => 'number']) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('room', 'Create') : Yii::t('room', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,48 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model backend\models\RoomSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="room-search">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?php
// ///////////////////////////////////////
// Search Pane
// ///////////////////////////////////////
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Keresés</h3>
</div>
<div class="panel-body">
<?php
// ///////////////////////////////////////
// Search fields
// ///////////////////////////////////////
?>
<div class="row">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
<?= $form->field($model, 'name') ?>
</div>
</div>
</div>
<div class="panel-footer">
<?php
// ///////////////////////////////////////
// Search button
// ///////////////////////////////////////
?>
<?= Html::submitButton(Yii::t('room', 'Search'), ['class' => 'btn btn-primary']) ?>
</div>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Room */
$this->title = Yii::t('room', 'Create Room');
$this->params['breadcrumbs'][] = ['label' => Yii::t('room', 'Rooms'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="room-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,37 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel backend\models\RoomSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('room', 'Rooms');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="room-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a(Yii::t('room', 'Create Room'), ['create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
'id',
'name',
'seat_count',
'created_at:datetime',
'updated_at:datetime',
['class' => 'yii\grid\ActionColumn',
'template' => '{view} {update}'
],
],
]); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Room */
$this->title = Yii::t('room', 'Update Room: ') . $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('room', 'Rooms'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Yii::t('room', 'Update');
?>
<div class="room-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,39 @@
<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Room */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => Yii::t('room', 'Rooms'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="room-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('room', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('room', 'Delete'), ['delete', 'id' => $model->id], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('room', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'name',
'seat_count',
'created_at',
'updated_at',
],
]) ?>
</div>