创建版本
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<table id="widget-article-index">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-field="title" data-formatter="titleFormatter" data-align="left">标题</th>
|
||||
<th data-field="created_at" data-width="200" data-formatter="datetimeFormatter" data-sortable="true" data-align="center">发布时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<script>
|
||||
|
||||
function datetimeFormatter(value, row) {
|
||||
return format_datetime(value);
|
||||
}
|
||||
|
||||
function titleFormatter(value, row) {
|
||||
return '<a href="'+app.url('article/article/view', {id: row.id})+'">' + value + '</a>';
|
||||
}
|
||||
|
||||
(function($) {
|
||||
var $table = $('#widget-article-index');
|
||||
$table.bootstrapTable({
|
||||
sidePagination: 'server',
|
||||
showColumns: false,
|
||||
showHeader: false,
|
||||
height: 200,
|
||||
pagination: false,
|
||||
url: '{{url("article/widget/index")}}',
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
</script>
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="panel panel-shadow info-skin1">
|
||||
<div class="info-l hidden-xs" style="background-color:{{$info['color']}}">
|
||||
<i class="fa fa-2x {{$info['icon']}}"></i>
|
||||
</div>
|
||||
<div class="info-c">
|
||||
<div class="info-name">{{$info['name']}}</div>
|
||||
<a href="javascript:;" data-toggle="addtab" data-url="{{$info['more_url']}}" data-id="{{str_replace(['/', '?', '='], ['_', '_', '_'], $info['more_url'])}}" data-name="{{$info['name']}}">
|
||||
<div class="text-info info-item" data-id="{{$info['id']}}" data-more_url="{{$info['more_url']}}">{{$res['count']}}</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="info-r">
|
||||
<div>较{{$dates[$info['params']['date']]}}</div>
|
||||
<div class="rate @if($res['rate'] > 100) red @endif">{{$res['rate']}}%</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user