Server_AccessControl/views/department/index.tpl

78 lines
3.5 KiB
Smarty

{extends file=$smarty.current_dir|cat:'/../extends.tpl'}
{use class="yii\helpers\Url"}
{use class="yii\grid\GridView"}
{use class="yii\widgets\Pjax" type="block"}
{use class="app\assets\DepartmentAsset"}
{DepartmentAsset::register($this)|void}
{block name='content'}
<div class="department-index">
<div class="">
<label class="action-button">
<i class="fa fa-sitemap"></i> Cây thư mục
</label>
<label class="action-button" onclick="common.form(this, 'department');" data-href="{Url::to(['create'])}">
<i class="fa fa-plus-square"></i> Thêm
</label>
<label class="action-button" onclick="_form(this);" data-href="{Url::to(['update'])}">
<i class="fa fa-edit"></i> Tùy chỉnh
</label>
<label class="action-button" onclick="_delete(this);" data-href="{Url::to(['delete'])}">
<i class="fa fa-trash"></i> Xóa
</label>
<label class="action-button" onclick="$('#file').trigger('click');">
<i class="fa fa-upload"></i> Nhập
</label>
<label class="action-button" onclick="_export(this);" data-href="{Url::to(['export'])}">
<i class="fa fa-download"></i> Xuất
</label>
<label class="action-button" onclick="_logs(this);" data-href="{Url::to(['logs'])}">
<i class="fa fa-file"></i> Ghi nhận hệ thống
</label>
</div>
<div class="hidden">
<input type="file" name="file" id="file">
<input type="hidden" value="{Url::to(['upload'])}" name="upload_file_url">
</div>
{Pjax id="department-list"}
{GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'layout'=> \app\helpers\DepartmentGrid::getLayout(),
'tableOptions' => [
'class' => 'table table-striped table-bordered table-hover',
'style' => 'background:#fff;min-width:700px;'
],
'rowOptions' => \app\helpers\DepartmentGrid::rows(),
'columns' => [
[
'class' => 'yii\grid\SerialColumn',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%']
],
[
'header' => "<input type='checkbox' value='0' class='checkbox-department' id='checkall-department'>",
'format' => 'raw',
'contentOptions' => ['class' => 'text-center'],
'headerOptions' => ['class' => 'text-center', 'style' => 'width:3%'],
'value' => \app\helpers\DepartmentGrid::checkbox()
],
'code',
'name',
[
'attribute' => 'pid',
'filter' => $departmentArray,
'value' => \app\helpers\DepartmentGrid::pid($departmentArray)
],
[
'attribute' => 'created_at',
'value' => \app\helpers\DepartmentGrid::createdAt()
],
[
'attribute' => 'modified_at',
'value' => \app\helpers\DepartmentGrid::modifiedAt()
]
]
])}
{/Pjax}
</div>
{/block}