示例#1
0
文件: view.php 项目: abutouq/video
use app\helpers\TagHelpers;
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model app\models\Video */
$this->title = $model->title_en;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Videos'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="video-view">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>

    <p>
        <?php 
echo Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo 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']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'video_code', 'video_url:url', 'title_ar', 'title_en', 'description_' . Yii::$app->language, 'create_date', ['label' => 'Created By', 'value' => $model->createdBy->full_name], ['attribute' => 'tags', 'value' => TagHelpers::getUserTags($model), 'format' => 'html']]]);
?>

</div>
示例#2
0
文件: view.php 项目: abutouq/video
                <p class="text-muted"><?php 
echo $model->country->name;
?>
</p>

                <hr>

                <strong><i class="fa fa-pencil margin-r-5"></i> <?php 
echo Yii::t('app', 'Tags');
?>
</strong>

                <div style="display: inline-block">
                    <?php 
echo TagHelpers::getUserTags($model);
?>
                </div>

                <hr>


                <strong><i class="fa fa-file-text-o margin-r-5"></i> <?php 
echo Yii::t('app', 'Coming Events');
?>
</strong>

                <p><?php 
echo date('d-m-Y', strtotime("+10 days"));
?>
 Teeth Whiting with Dr. Khaled</p>