示例#1
0
文件: view.php 项目: s-nice/snece
$this->params['breadcrumbs'][] = $this->title;
?>

<div class="page-title">
	<div class="pull-left">
		<h1 class="title">查看广告位 <?php 
echo $model->name;
?>
</h1>
	</div>
	<div class="pull-right hidden-xs">
		<?php 
echo Html::a('创建', ['create', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
		<?php 
echo Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
		<?php 
echo Html::a('删除', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => '确定删除?', 'method' => 'post']]);
?>
	</div>
</div>

<div class="adver-view content-body">

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', 'remark', ['label' => '创建者', 'value' => User::getName($model->create_uid)], 'create_at:datetime', 'update_at:datetime']]);
?>

</div>
示例#2
0
文件: view.php 项目: s-nice/snece
use yii\helpers\Html;
use yii\widgets\DetailView;
use backend\models\User;
/* @var $this yii\web\View */
/* @var $model backend\models\Ad */
$this->title = $model->title;
$this->params['breadcrumbs'][] = ['label' => '广告列表', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="ad-view">

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

    <p>
        <?php 
echo Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('删除', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => '确定删除吗?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'pid', 'title', ['attribute' => 'img', 'format' => 'raw', 'value' => html::img('/' . $model->img, array('width' => 200))], 'link', 'orderid', ['attribute' => 'is_show', 'format' => 'raw', 'value' => $model->is_show == 1 ? '显示' : '不显示'], ['label' => '创建者', 'value' => User::getName($model->create_uid)], 'create_at:datetime', 'update_at:datetime']]);
?>

</div>
示例#3
0
文件: view.php 项目: s-nice/snece
/* @var $this yii\web\View */
/* @var $model backend\models\Activity */
$this->title = $model->name;
$this->params['breadcrumbs'][] = ['label' => '活动列表', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="activity-view">

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

    <p>
		<?php 
echo Html::a('创建', ['create', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('更新', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::a('删除', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]);
?>
    </p>

    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'name', 'template', ['attribute' => 'link', 'format' => 'raw', 'value' => Html::a($model->link, $model->link, array('target' => '_blank'))], 'remark', 'orderid', ['label' => '创建者', 'value' => User::getName($model->create_uid)], 'create_at:datetime', 'update_at:datetime']]);
?>

</div>
示例#4
0
文件: index.php 项目: s-nice/snece
		<h1 class="title"><?php 
echo Html::encode($this->title);
?>
</h1>
	</div>

	<div class="pull-right hidden-xs">
		<?php 
echo Html::a('创建', ['create'], ['class' => 'btn btn-primary pull-right']);
?>
	</div>

</div>

<div class="adver-index content-body">

    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
	<?php 
Pjax::begin(['formSelector' => 'form', 'enablePushState' => false]);
?>
    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', ['label' => '创建者', 'format' => 'raw', 'value' => function ($model) {
    return User::getName($model->create_uid);
}], 'create_at:datetime', ['class' => 'yii\\grid\\ActionColumn']]]);
Pjax::end();
?>

</div>