123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181 |
- @extends('admin/site/side_layout')
- @section('header_extend')
- <link rel="stylesheet" href="{{asset('js/plugins/zTree_v3-master/css/zTreeStyle/zTreeStyle.css')}}">
- <style type="text/css">
- .ztree li span.button.add {
- margin-left: 2px;
- margin-right: -1px;
- background-position: -144px 0;
- vertical-align: top;
- *vertical-align: middle
- }
- .ztree li span.button.reset {
- margin-right: 2px;
- background-position: -110px -48px;
- vertical-align: top;
- *vertical-align: middle
- }
- .btn-primary {
- background: #2a94e0 !important;
- }
- </style>
- @endsection
- @section('right')
- <form class="row" id="searchForm">
- {{--<div class="col-md-6">--}}
- {{--<select name="socialIds" id="socialIds" class="form-control" multiple>--}}
- {{--@foreach($socialList as $item)--}}
- {{--<option value="{{$item["id"]}}">[{{$item["type"]}}]{{$item["socialNetworkUsername"]}}</option>--}}
- {{--@endforeach--}}
- {{--</select>--}}
- {{--<button type="button" class="btn btn-md btn-primary"--}}
- {{--onclick="units.saveSocialIds(0)" style="margin-left: 10px">保存--}}
- {{--</button>--}}
- {{--</div>--}}
- <div class="col-md-4">
- <div class="input-group">
- <span class="input-group-btn">
- <button type="button" class="btn btn-md btn-primary"
- onclick="units.save(0)" style="margin-left: 10px">
- <span class="glyphicon glyphicon-plus"></span> 添加
- </button>
- <button type="button" class="btn btn-md btn-primary"
- onclick="units.metastasis({{$siteId}})" style="margin-left: 10px">
- <span class="glyphicon glyphicon-plus"></span> 批量转移到hootsuite记录
- </button>
- {{--<button type="button" class="btn btn-md btn-danger"--}}
- {{--onclick="units.delete()" style="margin-left: 10px">--}}
- {{--<span class="glyphicon glyphicon-remove"></span> 删除--}}
- {{--</button>--}}
- </span>
- </div>
- </div>
- </form>
- <hr>
- <div class="table-responsive">
- <table id="table" class="table table-condensed"
- data-mobile-responsive="true"></table>
- </div>
- @endsection
- @section('footer_extend')
- <script src="{{asset('js/plugins/zTree_v3-master/js/jquery.ztree.core.min.js')}}"></script>
- {{--<script src="{{asset('js/plugins/zTree_v3-master/js/jquery.ztree.exedit.min.js')}}"></script>--}}
- <script src="{{asset('js/plugins/zTree_v3-master/js/jquery.ztree.excheck.min.js')}}"></script>
- <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
- <script>
- var units = {
- saveSocialIds: function () {
- var ajaxConfig = {
- url: '/admin/hootsuite/bind-socialIds',
- type: 'post',
- data: {
- socialIds: $("#socialIds").val(),
- siteId: "{{$siteId}}"
- }
- };
- tips.ajax(ajaxConfig);
- },
- save: function (id) {
- var url = '/admin/sites/social-queue/' + id + '?siteId={{$siteId}}';
- layer.open({
- type: 2,
- content: url,
- area: ['70%', '90%'],
- title: '保存'
- });
- },
- remove: function (id) {
- layer.confirm('您确定要删除吗?', {icon: 3, title: '删除信息'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/sites/social-queue/' + id,
- type: 'delete',
- tableRefresh: '#table'
- });
- });
- },
- detail: function (id) {
- var url = '/admin/sites/social-queue/' + id + '?siteId={{$siteId}}';
- layer.open({
- type: 2,
- content: url,
- area: ['70%', '90%'],
- title: '详情'
- });
- },
- metastasis: function (id) {
- layer.confirm('您确定要全部转移吗?', {icon: 3, title: '转移'}, function (index, layero) {
- layer.close(index);
- tips.ajax({
- url: '/admin/sites/' + id + '/social-metastasis',
- type: 'get',
- tableRefresh: '#table'
- });
- });
- },
- };
- var config = {};
- config.url = '/admin/sites/' + "{{$siteId}}" + '/social-queue';
- config.columns = [ //字段
- // {checkbox: true},
- {title: '编号', field: 'id', align: 'center'},
- /*{title: '地址', field: 'url', align: 'center', width: '200px'},*/
- {
- title: '图片', field: 'media', align: 'center',
- formatter: function (value, rows) {
- if (value) {
- return (
- '<img src="' + value + '" height="40px"/>'
- );
- }
- }
- },
- {title: '内容概要', field: 'content', align: 'center'},
- {title: '发布时间', field: 'publish_at', align: 'center', width: '140px'},
- {title: '是否发布社交', field: 'is_published', align: 'center', width: '80px'},
- {title: '发布结果', field: 'published_result', align: 'center'},
- {title: '创建时间', field: 'created_at', align: 'center', width: '140px'},
- {
- title: '操作', field: 'id', align: 'center',
- formatter: function (value, rows) {
- if (!rows.social_sync_at) {
- return (
- '<button onclick="units.save(' + value + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>编辑</button> ' +
- '<button onclick="units.remove(' + value + ')" class="btn btn-xs"><span class="glyphicon glyphicon-remove"></span>删除</button> '
- );
- }
- return (
- '<button onclick="units.detail(' + value + ')" class="btn btn-xs"><span class="glyphicon glyphicon-edit"></span>详情</button> '
- );
- }
- }
- ];
- tips.bootstrapTable(config);
- </script>
- @endsection
|