123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- @extends('admin/layout')
- @section('content')
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="row">
- <div class="ibox ">
- <div class="ibox-title">
- <form class="form-horizontal">
- <div class="form-group">
- <label class="col-sm-2 control-label">公司中文名:</label>
- <label class="col-sm-4 control-label" style="text-align: left">{{$site->cn_title??''}}</label>
- <label class="col-sm-2 control-label">公司英文名:</label>
- <label class="col-sm-4 control-label" style="text-align: left">{{$site->en_title??''}}</label>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">公司品牌:</label>
- <label class="col-sm-4 control-label" style="text-align: left">{{$siteEnterprise->brand??''}}</label>
- <label class="col-sm-2 control-label">公司网址:</label>
- <label class="col-sm-4 control-label" style="text-align: left">{{$site->domain??''}}</label>
- </div>
- </form>
- </div>
- <div class="ibox-content">
- @foreach($data->group as $item)
- <form class="form-horizontal">
- <div class="form-group">
- <label class="col-sm-1 control-label">中文关键词:</label>
- <label class="col-sm-3 control-label" style="text-align: left">{{$item['cn_keyword']??''}}</label>
- <label class="col-sm-1 control-label">英文关键词:</label>
- <label class="col-sm-3 control-label" style="text-align: left">{{$item['en_keyword']??''}}</label>
- <label class="col-sm-1 control-label">锚点链接:</label>
- <label class="col-sm-3 control-label" style="text-align: left">{{$item['anchor']??''}}</label>
- </div>
- </form>
- @endforeach
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-6">
- <div class="ibox ">
- <div class="ibox-title">
- <h5>{{$data->title??''}}</h5>
- </div>
- <div class="ibox-content">
- <p class="m-b-lg">
- {!! $data->content??'' !!}
- </p>
- </div>
- </div>
- </div>
- <div class="col-sm-6">
- <div class="ibox ">
- {{--<div class="ibox-title">--}}
- {{--<h5>编辑器</h5>--}}
- {{--</div>--}}
- <div class="ibox-content">
- <form class="form-horizontal" id="form">
- <div class="form-group">
- <label class="col-sm-2 control-label" for="translate_title">标题:</label>
- <div class="col-sm-8">
- <input type="text" class="form-control" id="translate_title" name="translate_title"
- value="{{$data->translate_title??''}}">
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">正文:</label>
- <div class="col-sm-8">
- <!-- 编辑器容器 -->
- <script id="container" name="translate_content"
- type="text/plain">{!! $data->translate_content??'' !!}</script>
- </div>
- </div>
- <div class="hr-line-dashed"></div>
- <div class="form-group">
- <div class="col-sm-6 col-sm-offset-2">
- <button class="btn btn-primary" type="button"
- onclick="units.translate(2)">
- 保存
- </button>
- <button class="btn btn-info" type="button" onclick="units.translate(3)">提交审核
- </button>
- <button class="btn btn-warning" type="button" onclick="units.release()">释放任务</button>
- <button class="btn btn-default closeLayer" type="button">取消</button>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- {{--<div class="row">--}}
- {{--<div class="col-sm-12">--}}
- {{--<button class="btn btn-primary closeLayer">取消</button>--}}
- {{--</div>--}}
- {{--</div>--}}
- </div>
- </body>
- @endsection
- @section('footer')
- @include('vendor.ueditor.assets')
- <script>
- var ue = UE.getEditor('container');
- ue.ready(function () {
- ue.setHeight(300);
- ue.execCommand('serverparam', '_token', '{{ csrf_token() }}'); // 设置 CSRF token.
- });
- var units = {
- translate: function (status) {
- var url = '/admin/articles/' + "{{$data->id??''}}" + '/translate';
- var data = tips.getFormValues('#form');
- data.status = status;
- var ajaxConfig = {
- url: url,
- type: 'put',
- data: data,
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(ajaxConfig);
- },
- release: function () {
- layer.confirm('您确定要释放该任务吗?', {icon: 3, title: '释放任务'}, function () {
- var url = '/admin/articles/' + "{{$data->id??''}}" + '/release';
- var ajaxConfig = {
- url: url,
- type: 'put',
- success: function (result) {
- layer.msg(result.message, {icon: 6, time: 1000}, function () {
- tips.closeParentLayer();
- window.parent.tips.tableRefresh('#table');
- });
- }
- };
- tips.ajax(ajaxConfig);
- });
- }
- };
- </script>
- @endsection
|