예제 #1
0
<div class="row">
	<div class="col-md-4">
		<?php 
echo $this->render("_form", ["model" => $model, "parentId" => null]);
?>
	</div>
	<div class="col-md-8">


<div class="box box-solid">
	<div class="box-body no-padding">
        <?php 
echo GridView::widget(['layout' => "{items}", 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterPosition' => GridView::FILTER_POS_HEADER, "tableOptions" => ['class' => 'table table-hover table-striped no-margin'], "columns" => [['attribute' => 'name', "format" => "html", 'value' => function ($model, $key, $index, $column) {
    $params = is_array($key) ? $key : ['id' => (string) $key];
    $params[0] = "update";
    $value = ArrayHelper::getValue($model, $column->attribute);
    return Html::a($value, $params);
}], 'slug', ['class' => 'hass\\base\\misc\\grid\\SwitcherColumn', 'attribute' => 'status', 'filter' => StatusEnum::listData()], ['class' => 'hass\\base\\misc\\grid\\ActionColumn']]]);
?>
	</div>
	<div class="box-footer">
		<div class="box-tools pull-right">
			<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $dataProvider->pagination, 'options' => ['class' => 'pagination pagination-sm inline']]);
?>
		</div>
	</div>
</div>

	</div>
</div>
예제 #2
0
    <div class="box-header with-border">
        <h3 class="box-title">
                             评论列表
        </h3>
    </div>
	<div class="box-body no-padding">

	 <?php 
echo GridView::widget(['layout' => "{items}", 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterPosition' => GridView::FILTER_POS_HEADER, "tableOptions" => ['class' => 'table table-hover table-striped no-margin'], "columns" => ['comment_id', ['attribute' => 'content', "format" => "html", 'value' => function ($model, $key, $index, $column) {
    $params = is_array($key) ? $key : ['id' => (string) $key];
    $params[0] = "update";
    $value = ArrayHelper::getValue($model, $column->attribute);
    return Html::a($value, $params);
}], 'email', 'username', 'user_ip', ['attribute' => 'created_at', 'value' => 'createdDateTime'], ['label' => "源", 'value' => function ($model, $key, $index, $column) {
    return ArrayHelper::getValue($model, 'entity');
}], ['class' => 'hass\\base\\misc\\grid\\SwitcherColumn', 'attribute' => 'status', 'filter' => StatusEnum::listData()], ['class' => 'hass\\base\\misc\\grid\\ActionColumn', "template" => '{update} {delete}']]]);
?>

	</div>


	<div class="box-footer">
		<div class="box-tools pull-right">
			<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $dataProvider->pagination, 'options' => ['class' => 'pagination pagination-sm inline']]);
?>
		</div>
	</div>
</div>

예제 #3
0
?>
	</a>
</h1>
<?php 
$this->endBlock();
?>

<div class="box box-solid">
	<div class="box-body no-padding">
        <?php 
echo GridView::widget(['layout' => "{items}", 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterPosition' => GridView::FILTER_POS_HEADER, "tableOptions" => ['class' => 'table table-hover table-striped no-margin'], "columns" => ['id', ['attribute' => 'title', "format" => "html", 'value' => function ($model, $key, $index, $column) {
    $params = is_array($key) ? $key : ['id' => (string) $key];
    $params[0] = "update";
    $value = ArrayHelper::getValue($model, $column->attribute);
    return Html::a($value, $params);
}], ['attribute' => 'published_at', 'value' => 'publishedDateTime'], ['class' => 'hass\\base\\misc\\grid\\SwitcherColumn', 'attribute' => 'status', 'filter' => StatusEnum::listData()], ['class' => 'hass\\base\\misc\\grid\\ActionColumn', 'urlCreator' => function ($action, $model, $key, $index, $column) {
    if ($action == "view") {
        $params = is_array($key) ? $key : ['id' => (string) $key];
        $params[0] = "/page/view";
        return \Yii::$app->get("appUrlManager")->createUrl($params);
    }
}, 'template' => '{up} {down} {view} {update} {delete}']]]);
?>
	</div>
	<div class="box-footer">
		<div class="box-tools pull-right">
			<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $dataProvider->pagination, 'options' => ['class' => 'pagination pagination-sm inline']]);
?>
		</div>
	</div>
예제 #4
0
?>
	</div>
	<div class="col-md-8">
<div class="box box-solid">
	<div class="box-body no-padding">
        <?php 
echo GridView::widget(['layout' => "{items}", 'dataProvider' => $dataProvider, 'filterModel' => $searchModel, 'filterPosition' => GridView::FILTER_POS_HEADER, "tableOptions" => ['class' => 'table table-hover table-striped no-margin'], "columns" => ['taxonomy_id', ['attribute' => 'name', "format" => "html", 'value' => function ($model, $key, $index, $column) {
    $params = is_array($key) ? $key : ['id' => (string) $key];
    $params[0] = "update";
    $value = ArrayHelper::getValue($model, $column->attribute);
    $options = [];
    if ($model->depth == 0) {
        $options['style'] = "color:#000;font-weight:bold";
        $value .= "[根]";
    }
    return Html::a($value, $params, $options);
}], 'slug', ['class' => 'hass\\base\\misc\\grid\\SwitcherColumn', 'attribute' => 'status', 'filter' => StatusEnum::listData()], ['class' => 'hass\\base\\misc\\grid\\ActionColumn', "template" => "{add-child} {update} {delete} {up} {down} ", "buttons" => ["add-child" => function ($url) {
    return Html::a('<span class="glyphicon glyphicon-plus"></span>', $url, ['class' => "btn btn-default btn-xs", "title" => \Yii::t("hass", "增加子类")]);
}]]]]);
?>
	</div>
	<div class="box-footer">
		<div class="box-tools pull-right">
			<?php 
echo yii\widgets\LinkPager::widget(['pagination' => $dataProvider->pagination, 'options' => ['class' => 'pagination pagination-sm inline']]);
?>
		</div>
	</div>
</div>
	</div>
</div>