创建版本
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<div class="form-panel">
|
||||
<div class="form-panel-header">
|
||||
<div class="pull-right">
|
||||
</div>
|
||||
{{$form['btn']}}
|
||||
</div>
|
||||
<div class="form-panel-body">
|
||||
<form class="form-horizontal form-controller" method="post" id="{{$form['table']}}" name="{{$form['table']}}">
|
||||
{{$form['tpl']}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var table = '{{$form["table"]}}';
|
||||
</script>
|
||||
@@ -0,0 +1,59 @@
|
||||
{{$header["js"]}}
|
||||
|
||||
<div class="panel no-border" id="{{$header['master_table']}}-controller">
|
||||
@include('headers')
|
||||
<div class='list-jqgrid'>
|
||||
<div id="{{$header['master_table']}}-grid" style="width:100%;" class="ag-theme-balham"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
(function ($) {
|
||||
var table = '{{$header["master_table"]}}';
|
||||
var config = gdoo.grids[table];
|
||||
var action = config.action;
|
||||
var search = config.search;
|
||||
|
||||
action.dialogType = 'layer';
|
||||
|
||||
// 自定义搜索方法
|
||||
search.searchInit = function (e) {
|
||||
var self = this;
|
||||
}
|
||||
|
||||
var options = new agGridOptions();
|
||||
var gridDiv = document.querySelector("#{{$header['master_table']}}-grid");
|
||||
gridDiv.style.height = getPanelHeight(48);
|
||||
|
||||
options.remoteDataUrl = '{{url()}}';
|
||||
options.remoteParams = search.advanced.query;
|
||||
options.columnDefs = config.cols;
|
||||
options.onRowDoubleClicked = function (params) {
|
||||
if (params.node.rowPinned) {
|
||||
return;
|
||||
}
|
||||
if (params.data == undefined) {
|
||||
return;
|
||||
}
|
||||
if (params.data.master_id > 0) {
|
||||
action.show(params.data);
|
||||
}
|
||||
};
|
||||
|
||||
new agGrid.Grid(gridDiv, options);
|
||||
|
||||
// 读取数据
|
||||
options.remoteData({page: 1});
|
||||
|
||||
// 绑定自定义事件
|
||||
var $gridDiv = $(gridDiv);
|
||||
$gridDiv.on('click', '[data-toggle="event"]', function () {
|
||||
var data = $(this).data();
|
||||
if (data.master_id > 0) {
|
||||
action[data.action](data);
|
||||
}
|
||||
});
|
||||
config.grid = options;
|
||||
})(jQuery);
|
||||
|
||||
</script>
|
||||
@include('footers')
|
||||
@@ -0,0 +1,23 @@
|
||||
<form id="search-form" class="form-inline" name="mysearch" action="{{url()}}" method="get">
|
||||
<div class="pull-right">
|
||||
@if(isset($access['delete']))
|
||||
<a class="btn btn-sm btn-danger" href="javascript:optionDelete('#myform','{{url('delete')}}');"><i class="icon icon-remove"></i> 删除</a>
|
||||
@endif
|
||||
</div>
|
||||
@if(isset($access['create']))
|
||||
<a href="{{url('create')}}" class="btn btn-sm btn-info"><i class="icon icon-plus"></i> 新建</a>
|
||||
@endif
|
||||
@include('searchForm')
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function() {
|
||||
$('#search-form').searchForm({
|
||||
data: {{json_encode($search['forms'])}},
|
||||
init: function(e) {
|
||||
var self = this;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,43 @@
|
||||
<table class="table m-b-none">
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="left" colspan="4">
|
||||
已读 <span class="badge bg-info">{{(int)$rows['total'][1]}}</span>
|
||||
|
||||
未读 <span class="badge">{{(int)$rows['total'][0]}}</span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th align="center">
|
||||
序号
|
||||
</th>
|
||||
<th align="left">
|
||||
阅读人
|
||||
</th>
|
||||
<th align="center">
|
||||
部门
|
||||
</th>
|
||||
<th align="center">
|
||||
阅读时间
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@if($rows['data'])
|
||||
@foreach($rows['data'] as $row)
|
||||
<tr>
|
||||
<td align="center">
|
||||
{{$loop->index + 1}}
|
||||
</td>
|
||||
<td align="left">
|
||||
{{$row['name']}}
|
||||
</td>
|
||||
<td align="center">
|
||||
{{$row['department']}}
|
||||
</td>
|
||||
<td align="center">
|
||||
@datetime($row['created_at'])
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</table>
|
||||
@@ -0,0 +1,38 @@
|
||||
<style>
|
||||
.content-body {
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="form-panel">
|
||||
<div class="form-panel-header">
|
||||
<div class="pull-right"></div>
|
||||
{{$form['btn']}}
|
||||
@if(isset($access['reader']))
|
||||
<button type="button" onclick="viewBox('reader', '阅读记录', '{{url('reader',['id' => $res['id']])}}')" class="btn btn-sm btn-default"><i class="icon icon-eye-open"></i> 阅读记录</button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-panel-body">
|
||||
<div class="wrapper-sm">
|
||||
<div class="panel">
|
||||
<div class="panel-heading b-b b-light text-center">
|
||||
<h3 class="m-xs m-l-none">
|
||||
{{$res['title']}}
|
||||
</h3>
|
||||
<small class="text-muted">
|
||||
发布人: {{get_user($res['created_id'], 'name')}}
|
||||
|
||||
发布时间: @datetime($res['created_at'])
|
||||
</small>
|
||||
</div>
|
||||
|
||||
<div class="panel-body text-base">
|
||||
{{$res['content']}}
|
||||
</div>
|
||||
|
||||
<div class="wrapper-sm">
|
||||
@include('attachment/view')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user