/
peyli
/
Practice
Обзор
Документация
Войти
/
peyli
/
Practice
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
views/event/join.php
78 строк
3 KB
Катя
Полный код
27 июн 2026, 14:28
27 июн 2026, 14:28
6181a72
Код
Авторство
О чём код?
<?php use app\models\Event; use yii\helpers\Html; use yii\helpers\Url; use yii\grid\ActionColumn; use yii\grid\GridView; use yii\widgets\Pjax; /** @var yii\web\View $this */ $this->title = 'Регистрация на мероприятие'; ?> <style> .join-event { width: 50%; gap: 10px; } button.btn, a.btn{ height: 50px; display: flex; align-items: center; justify-content: center; } </style> <div class="join-index fs-5"> <h1 class="mb-3"><?= Html::encode($this->title) ?></h1> <div class="d-flex justify-content-center align-items-center w-100"> <div class="join-event d-flex flex-column justify-content-center align-items-center"> <table class="table table-borderless table-sm w-100 my-0"> <tbody> <tr> <th>Организатор</th> <td class="text-end"><?= $event->user_username ?></td> </tr> <tr> <th>Тип мероприятия</th> <td class="text-end"><?= $event->event_type ?></td> </tr> <tr> <th>Цена билета</th> <td class="text-end"> <?php if (Html::encode($event->price) == 0): ?> Бесплатно <?php else: ?> <?= Html::encode($event->price) ?> руб. <?php endif; ?> </td> </tr> <tr> <th>Место</th> <td class="text-end"><?= $event->place ?></td> </tr> <tr> <th>Время</th> <td class="text-end"><?= Yii::$app->formatter->asDate($event->start, 'dd.MM.yyyy H:i') ?> <?php if (Html::encode($event->end) == null): ?> <?php else: ?> — <?= Yii::$app->formatter->asDate($event->end, 'dd.MM.yyyy H:i') ?> <?php endif; ?> </td> </tr> </tbody> </table> <?= Html::a(Yii::t('app', 'Принять участие'), ['success', 'id' => $event->id], ['class' => 'btn w-100 btn-primary fs-5']) ?> <p class="text-center">Записавшись на мероприятие его организатор получит ваше ФИО и почту</p> </div> </div> </div>