D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
epaji.com
/
public_html
/
hindiusa
/
views
/
news
/
Filename :
view.php
back
Copy
<?php use yii\helpers\Html; use yii\widgets\DetailView; /* @var $this yii\web\View */ /* @var $model app\models\News */ $this->title = $model->title; $this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'News'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; \yii\web\YiiAsset::register($this); ?> <?= $this->render('@app/views/common/_dashboard-sidebar') ?> <div class="news-view product-content"> <h1><?= Html::encode($this->title) ?></h1> <p> <?= Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-success']) ?> <?= Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'), 'method' => 'post', ], ]) ?> <?= Html::a(Yii::t('app', 'Cancel'), ['news/index'], ['class' => 'btn btn-danger']); ?> </p> <?= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', [ 'attribute' => 'school.name', 'label' => 'School Name', ], [ 'attribute' => 'newsCategory.name', 'label' => 'Category Name', ], 'title', 'description:html', [ 'attribute' => 'News Image', 'format' => 'html', 'value'=>function($data) { return Html::img(Yii::$app->request->baseUrl.'/'.$data->thumb_image, ['width'=>'100px']); }, ], 'reference_url:url', 'meta_title', 'meta_description', [ 'attribute' => 'Status', 'value'=>function($model){ return Yii::$app->params['status'][$model->status]; }, ], [ 'attribute' => 'Display for Main Website', 'value'=>function($model){ return Yii::$app->params['display-status'][$model->display_status]; }, ], 'created', ], ]) ?> </div>