version.blade.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-wrench"></i>
  10. </span>
  11. {{ __('auto.公告管理') }}
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">{{ __('auto.公告管理') }}</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">{{ __('auto.系统公告管理') }}</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. <h4 class="card-title">{{ __('auto.系统公告列表') }}</h4>
  25. <p class="card-description">
  26. <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
  27. <i class="mdi mdi-plus btn-icon-prepend"></i>
  28. {{ __('auto.发布公告') }}
  29. </button>
  30. </p>
  31. <table class="table table-bordered">
  32. <thead>
  33. <tr>
  34. <th>{{ __('auto.序号') }}</th>
  35. <th>{{ __('auto.版本号') }}</th>
  36. <th>{{ __('auto.发布时间') }}</th>
  37. <th>{{ __('auto.版本更新内容') }}</th>
  38. <th>{{ __('auto.操作') }}</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach($list as $k=>$v)
  43. <tr>
  44. <td style="width: 5%">{{ $v->id }}</td>
  45. <td style="width: 5%">{{ $v->version_number }}</td>
  46. <td style="width: 7%">{{ $v->add_time }}</td>
  47. <td style="width: 15%"><textarea class="form-control" name="message" rows="4" disabled="disabled">{{ $v->content }}</textarea></td>
  48. <td style="width: 5%">
  49. <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $v->id }})">
  50. {{ __('auto.修改') }}
  51. <i class="mdi mdi-file-check btn-icon-append"></i>
  52. </button>
  53. </td>
  54. </tr>
  55. @endforeach
  56. </tbody>
  57. </table>
  58. <div class="box-footer clearfix">
  59. {{ __('auto.总共') }} <b>{{ $list->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  60. {!! $list->links() !!}
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <script>
  69. function add(){
  70. var page = layer.open({
  71. type: 2,
  72. title: '{{ __('auto.添加菜单') }}',
  73. shadeClose: true,
  74. shade: 0.8,
  75. area: ['70%', '90%'],
  76. content: '/admin/version/add'
  77. });
  78. }
  79. function update(id){
  80. var page = layer.open({
  81. type: 2,
  82. title: '{{ __('auto.修改配置') }}',
  83. shadeClose: true,
  84. shade: 0.8,
  85. area: ['70%', '90%'],
  86. content: '/admin/version/update/'+id
  87. });
  88. }
  89. $('.menu-switch').click(function(){
  90. id = $(this).attr('id');
  91. state = $(this).attr('state');
  92. console.log(id)
  93. console.log(state)
  94. if(state == "on"){
  95. $('.pid-'+id).hide();
  96. $(this).attr("state","off")
  97. $(this).removeClass('mdi-menu-down').addClass('mdi-menu-right');
  98. }else{
  99. $('.pid-'+id).show();
  100. $(this).attr("state","on")
  101. $(this).removeClass('mdi-menu-right').addClass('mdi-menu-down');
  102. }
  103. })
  104. </script>
  105. @endsection