fitness-web/backend/views/event/_view.php
2021-09-27 20:43:58 +02:00

75 lines
2.8 KiB
PHP

<?php
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model common\models\Event */
?>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Esemény</h3>
</div>
<div class="panel-body">
<div class="row">
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<?php try {
echo DetailView::widget([
'model' => $model,
'attributes' => [
'id',
'created_at:datetime',
'updated_at:datetime',
'deleted_at:datetime',
],
]);
} catch (Exception $e) {
echo "failed to render event details ";
} ?>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<?php try {
echo DetailView::widget([
'model' => $model,
'attributes' => [
[
'attribute' => 'eventType.name',
'label' => $model->getAttributeLabel('id_event_type')
],
'start:datetime',
'end:datetime',
[
'attribute' => 'room.name',
'label' => $model->getAttributeLabel('id_room')
],
[
'attribute' => 'trainer.name',
'label' => $model->getAttributeLabel('id_trainer')
],
],
]);
} catch (Exception $e) {
echo "Failed to render view";
} ?>
</div>
<div class="col-xs-4 col-sm-4 col-md-4 col-lg-4">
<?php try {
echo DetailView::widget([
'model' => $model,
'attributes' => [
'seat_count',
'eventRegistrationCount',
'openSeatCount',
],
]);
} catch (Exception $e) {
echo "Failed to render view";
} ?>
</div>
</div>
</div>
</div>