123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- @extends('admin/layout')
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox float-e-margins">
- <div class="ibox-content">
- <form class="row" id="searchForm" onsubmit="units.search();return false;">
- <div class="input-group" style="display: flex">
- <select name="status" id="status" title="" class="form-control"
- style="width: 150px;float: inherit;margin-left: 10px;position: relative;"
- onchange="tips.selectPage();">
- <option value="">请选择</option>
- <option value="3" selected="selected">待审核</option>
- <option value="5" >已通过</option>
- </select>
- <div class="input-group">
- <input type="text" placeholder="请输入软文标题" class="input-md form-control"
- name="title"
- id="title" style="width: 300px;float: right">
- <span class="input-group-btn">
- <button type="button" class="btn btn-md btn-primary" onclick="units.search()"> 搜索</button>
- <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
- name="btnReset"> 重置</button>
- </span>
- </div>
- </div>
- </form>
- <hr>
- <div class="table-responsive">
- <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- @endsection
- @section('footer')
- <script>
- var units = {
- search: function () {
- tips.selectPage();
- },
- save: function (id) {
- layer.open({
- type: 2,
- content: ['/admin/articles/' + id],
- area: ['100%', '100%'],
- title: '',
- closeBtn: 0
- });
- },
- detail: function (id, status) {
- /* if (status !== 3) {
- layer.alert('只允许修改待翻译状态文章', {icon: 0});
- return;
- }*/
- layer.open({
- type: 2,
- content: ['/admin/articles-detail/' + id + '?referer=sites'],
- area: ['100%', '100%'],
- title: '',
- closeBtn: 0
- });
- }
- };
- var config = {};
- config.url = '/admin/articles?beApplicable=1';
- config.columns = [ //字段
- {
- title: '序号', align: 'center', formatter: function (value, item, index) {
- return index + 1;
- },
- width: '120px'
- },
- {
- title: '标题', field: 'title', align: 'center',
- formatter: function (value, row) {
- return '<a href="javascript:;" onclick="units.detail(' + row.id + ',' + row.status + ')">' + value + '</a>'
- }
- },
- {title: '状态', field: 'status_title', align: 'center'},
- {title: '是否适用', field: 'be_applicable', align: 'center'},
- {title: '发布时间', field: 'publish_at', align: 'center'},
- /*{title: '创建时间', field: 'created_at', align: 'center'},*/
- ];
- tips.bootstrapTable(config);
- </script>
- @endsection
|