use yii\grid\GridView; use yii\adminUi\widget\Box; use yii\adminUi\widget\Row; use yii\adminUi\widget\Column; use yii\helpers\Url; use yii\adminUi\widget\WorkflowButtonsView; use yii\adminUi\widget\Alert; /* @var $this yii\web\View */ /* @var $model common\models\Theatre */ $this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => 'Theaters', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; Row::begin(); Column::begin(); if ($flash = Yii::$app->session->getFlash("theater_notification")) { Alert::begin(['options' => ['class' => 'alert-info alert-dismissable'], 'icon' => 'fa fa-info', 'closeButton' => []]); ?> <p><?php echo $flash; ?> </p> <?php Alert::end(); } Box::begin(['type' => Box::TYPE_INFO, 'header' => $this->title, 'headerIcon' => 'fa fa-gear']); echo DetailView::widget(['model' => $model, 'attributes' => ['Id', 'name', 'cityname', 'zonename', 'localityname', 'address', 'landmark', 'pincode', 'gpsLat', 'gpsLong', 'email:email', ['label' => 'phone', 'value' => is_array($model->getPhone()) ? implode(', ', $model->getPhone()) : ''], ['label' => 'mobile', 'value' => is_array($model->getMobile()) ? implode(', ', $model->getMobile()) : ''], 'tollfree', 'website', 'facebookUrl:url', ['label' => 'In Mall', 'value' => $model->hotelId == 1 ? "Yes" : "No"], 'noofscreens', 'bookingNumber', 'updatedOn:datetime']]); echo WorkflowButtonsView::widget(['view' => $this, 'model' => $model, 'closebtntxt' => 'Close']); Box::end(); Column::end(); Row::end(); echo $this->render('schedule', ['model' => $model]);
*/ $this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => 'Events', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="event-view"> <h1><?php echo Html::encode($this->title); ?> </h1> <?php $dataArray = $model->getAttributes(); $dataArray['phone'] = implode(', ', $model->getPhone()); $dataArray['mobile'] = implode(', ', $model->getMobile()); $dataArray['cityname'] = common\models\City::findOne($model->cityId)->name; $dataArray['createdBy'] = common\models\User::findOne($model->createdBy)->firstname; $dataArray['updatedBy'] = common\models\User::findOne($model->updatedBy)->firstname; $dataArray['sourcename'] = $model->sourcename; $dataArray['description'] = strip_tags(HTMLPurifier::process($model->description)); $dataArray['guid'] = 'http://timescity.com' . $model->guid; ?> <?php echo DetailView::widget(['model' => $dataArray, 'attributes' => ['name', ['attribute' => 'cityname', 'label' => 'City'], ['attribute' => 'sourcename', 'label' => 'Source'], ['attribute' => 'startDate', 'label' => 'Start Date', 'format' => 'date'], ['attribute' => 'endDate', 'label' => 'End Date', 'format' => 'date'], ['attribute' => 'startTime', 'label' => 'Start Time'], ['attribute' => 'endTime', 'label' => 'End Time'], 'description:ntext', 'phone', 'mobile', 'contactName', 'email:email', ['attribute' => 'url', 'label' => 'Event URL/Website', 'format' => 'url'], ['attribute' => 'shopurl', 'label' => 'FB URL', 'format' => 'url'], 'price', 'guid:url', 'createdOn', 'createdBy', 'updatedOn', 'updatedBy']]); ?> <?php echo WorkflowButtonsView::widget(['view' => $this, 'model' => $model]); ?> </div>
use yii\adminUi\widget\WorkflowButtonsView; use yii\adminUi\widget\Alert; /* @var $this yii\web\View */ /* @var $model common\models\Movie */ $this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => 'Movies', 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; $dataArray = $model->getAttributes(); //$dataArray['cityname'] = common\models\City::findOne($model->cityId)->name; $dataArray['createdBy'] = common\models\User::findOne($model->createdBy)->firstname; $dataArray['updatedBy'] = common\models\User::findOne($model->updatedBy)->firstname; $dataArray['languagename'] = $model->languagename; $dataArray['parentalGuidance'] = $model->parentalGuidance; $dataArray['releaseDate'] = $model->releaseDate; $dataArray['cast'] = strip_tags($model->cast); $dataArray['synopsis'] = strip_tags($model->synopsis); $dataArray['review'] = strip_tags($model->review); $dataArray['guid'] = 'http://timescity.com' . $model->guid; if ($flash = Yii::$app->session->getFlash("movie_notification")) { Alert::begin(['options' => ['class' => 'alert-info alert-dismissable'], 'icon' => 'fa fa-info', 'closeButton' => []]); ?> <p><?php echo $flash; ?> </p> <?php Alert::end(); } echo DetailView::widget(['model' => $dataArray, 'attributes' => ['Id', 'name', 'cast:ntext', 'synopsis:ntext', 'languagename', 'parentalGuidance', 'starRating', ['attribute' => 'releaseDate', 'label' => 'Release Date', 'format' => 'date'], ['attribute' => 'createdOn', 'label' => 'Created Date', 'format' => 'date'], 'tagline', 'review:ntext', 'length', 'movieDirector', 'musicDirector', 'guid', 'toiMovieId', 'shortCode', 'canonicalUrl:url', ['attribute' => 'updatedOn', 'label' => 'Updated Date', 'format' => 'date'], 'createdBy', 'updatedBy', 'ip']]); echo WorkflowButtonsView::widget(['view' => $this, 'model' => $model, 'closebtn' => false, 'deletebtn' => true, 'unpublishbtn' => true]);