hall_translate.blade.php 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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="ibox ">
  7. <div class="ibox-title">
  8. <form class="form-horizontal">
  9. <div class="form-group">
  10. <label class="col-sm-2 control-label">公司中文名:</label>
  11. <label class="col-sm-4 control-label" style="text-align: left">{{$site->cn_title??''}}</label>
  12. <label class="col-sm-2 control-label">公司英文名:</label>
  13. <label class="col-sm-4 control-label" style="text-align: left">{{$site->en_title??''}}</label>
  14. </div>
  15. <div class="form-group">
  16. <label class="col-sm-2 control-label">公司品牌:</label>
  17. <label class="col-sm-4 control-label" style="text-align: left">{{$siteEnterprise->brand??''}}</label>
  18. <label class="col-sm-2 control-label">公司网址:</label>
  19. <label class="col-sm-4 control-label" style="text-align: left">{{$site->domain??''}}</label>
  20. </div>
  21. </form>
  22. </div>
  23. <div class="ibox-content">
  24. @foreach($data->group as $item)
  25. <form class="form-horizontal">
  26. <div class="form-group">
  27. <label class="col-sm-1 control-label">中文关键词:</label>
  28. <label class="col-sm-3 control-label" style="text-align: left">{{$item['cn_keyword']??''}}</label>
  29. <label class="col-sm-1 control-label">英文关键词:</label>
  30. <label class="col-sm-3 control-label" style="text-align: left">{{$item['en_keyword']??''}}</label>
  31. <label class="col-sm-1 control-label">锚点链接:</label>
  32. <label class="col-sm-3 control-label" style="text-align: left">{{$item['anchor']??''}}</label>
  33. </div>
  34. </form>
  35. @endforeach
  36. </div>
  37. </div>
  38. </div>
  39. <div class="row">
  40. <div class="col-sm-6">
  41. <div class="ibox ">
  42. <div class="ibox-title">
  43. <h5>{{$data->title??''}}</h5>
  44. </div>
  45. <div class="ibox-content">
  46. <p class="m-b-lg">
  47. {!! $data->content??'' !!}
  48. </p>
  49. </div>
  50. </div>
  51. </div>
  52. <div class="col-sm-6">
  53. <div class="ibox ">
  54. {{--<div class="ibox-title">--}}
  55. {{--<h5>编辑器</h5>--}}
  56. {{--</div>--}}
  57. <div class="ibox-content">
  58. <form class="form-horizontal" id="form">
  59. <div class="form-group">
  60. <label class="col-sm-2 control-label" for="translate_title">标题:</label>
  61. <div class="col-sm-8">
  62. <input type="text" class="form-control" id="translate_title" name="translate_title"
  63. value="{{$data->translate_title??''}}">
  64. </div>
  65. </div>
  66. <div class="form-group">
  67. <label class="col-sm-2 control-label">正文:</label>
  68. <div class="col-sm-8">
  69. <!-- 编辑器容器 -->
  70. <script id="container" name="translate_content"
  71. type="text/plain">{!! $data->translate_content??'' !!}</script>
  72. </div>
  73. </div>
  74. <div class="hr-line-dashed"></div>
  75. <div class="form-group">
  76. <div class="col-sm-6 col-sm-offset-2">
  77. <button class="btn btn-primary" type="button"
  78. onclick="units.translate(2)">
  79. 保存
  80. </button>
  81. <button class="btn btn-info" type="button" onclick="units.translate(3)">提交审核
  82. </button>
  83. <button class="btn btn-warning" type="button" onclick="units.release()">释放任务</button>
  84. <button class="btn btn-default closeLayer" type="button">取消</button>
  85. </div>
  86. </div>
  87. </form>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. {{--<div class="row">--}}
  93. {{--<div class="col-sm-12">--}}
  94. {{--<button class="btn btn-primary closeLayer">取消</button>--}}
  95. {{--</div>--}}
  96. {{--</div>--}}
  97. </div>
  98. </body>
  99. @endsection
  100. @section('footer')
  101. @include('vendor.ueditor.assets')
  102. <script>
  103. var ue = UE.getEditor('container');
  104. ue.ready(function () {
  105. ue.setHeight(300);
  106. ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
  107. });
  108. var units = {
  109. translate: function (status) {
  110. var url = '/admin/articles/' + "{{$data->id??''}}" + '/translate';
  111. var data = tips.getFormValues('#form');
  112. data.status = status;
  113. var ajaxConfig = {
  114. url: url,
  115. type: 'put',
  116. data: data,
  117. success: function (result) {
  118. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  119. tips.closeParentLayer();
  120. window.parent.tips.tableRefresh('#table');
  121. });
  122. }
  123. };
  124. tips.ajax(ajaxConfig);
  125. },
  126. release: function () {
  127. layer.confirm('您确定要释放该任务吗?', {icon: 3, title: '释放任务'}, function () {
  128. var url = '/admin/articles/' + "{{$data->id??''}}" + '/release';
  129. var ajaxConfig = {
  130. url: url,
  131. type: 'put',
  132. success: function (result) {
  133. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  134. tips.closeParentLayer();
  135. window.parent.tips.tableRefresh('#table');
  136. });
  137. }
  138. };
  139. tips.ajax(ajaxConfig);
  140. });
  141. }
  142. };
  143. </script>
  144. @endsection