english_article.blade.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. @extends('admin/layout')
  2. @section('content')
  3. <body class="gray-bg">
  4. <div class="wrapper wrapper-content animated fadeInRight">
  5. <div class="row">
  6. <div class="col-sm-12">
  7. <div class="ibox float-e-margins">
  8. <div class="ibox-content">
  9. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  10. <div class="input-group" style="display: flex">
  11. <select name="status" id="status" title="" class="form-control"
  12. style="width: 150px;float: inherit;margin-left: 10px;position: relative;"
  13. onchange="tips.selectPage();">
  14. <option value="">请选择</option>
  15. <option value="3" selected="selected">待审核</option>
  16. <option value="5" >已通过</option>
  17. </select>
  18. <div class="input-group">
  19. <input type="text" placeholder="请输入软文标题" class="input-md form-control"
  20. name="title"
  21. id="title" style="width: 300px;float: right">
  22. <span class="input-group-btn">
  23. <button type="button" class="btn btn-md btn-primary" onclick="units.search()"> 搜索</button>
  24. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  25. name="btnReset"> 重置</button>
  26. </span>
  27. </div>
  28. </div>
  29. </form>
  30. <hr>
  31. <div class="table-responsive">
  32. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  33. </div>
  34. </div>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </body>
  40. @endsection
  41. @section('footer')
  42. <script>
  43. var units = {
  44. search: function () {
  45. tips.selectPage();
  46. },
  47. save: function (id) {
  48. layer.open({
  49. type: 2,
  50. content: ['/admin/articles/' + id],
  51. area: ['100%', '100%'],
  52. title: '',
  53. closeBtn: 0
  54. });
  55. },
  56. detail: function (id, status) {
  57. /* if (status !== 3) {
  58. layer.alert('只允许修改待翻译状态文章', {icon: 0});
  59. return;
  60. }*/
  61. layer.open({
  62. type: 2,
  63. content: ['/admin/articles-detail/' + id + '?referer=sites'],
  64. area: ['100%', '100%'],
  65. title: '',
  66. closeBtn: 0
  67. });
  68. }
  69. };
  70. var config = {};
  71. config.url = '/admin/articles?beApplicable=1';
  72. config.columns = [ //字段
  73. {
  74. title: '序号', align: 'center', formatter: function (value, item, index) {
  75. return index + 1;
  76. },
  77. width: '120px'
  78. },
  79. {
  80. title: '标题', field: 'title', align: 'center',
  81. formatter: function (value, row) {
  82. return '<a href="javascript:;" onclick="units.detail(' + row.id + ',' + row.status + ')">' + value + '</a>'
  83. }
  84. },
  85. {title: '状态', field: 'status_title', align: 'center'},
  86. {title: '是否适用', field: 'be_applicable', align: 'center'},
  87. {title: '发布时间', field: 'publish_at', align: 'center'},
  88. /*{title: '创建时间', field: 'created_at', align: 'center'},*/
  89. ];
  90. tips.bootstrapTable(config);
  91. </script>
  92. @endsection