| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 | 
							- @extends('admin.layout')
 
- <style type="text/css">
 
- </style>
 
- @section('header')
 
- @endsection
 
- @section('content')
 
- <div id="sg-main-container-sg">
 
-     <div class="wrapper wrapper-content animated fadeInRight">
 
-         <div class="row">
 
-             <div class="col-sm-12">
 
-                 <div class="ibox float-e-margins">
 
-                     <div class="ibox-title">
 
-                         <h5>{{ '添加' . $model_name }}</h5>
 
-                         <div class="ibox-tools">
 
-                             <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
 
-                             </a>
 
-                         </div>
 
-                     </div>
 
-                     <div class="ibox-content">
 
-                         <div class="row">
 
-                             <div class="col-sm-12 pull-right">
 
-                                 <a href="{{ $pre_uri . 'index?type' . $type }}" class="btn btn-sm btn-primary pull-right">返回列表</a>
 
-                             </div>
 
-                         </div>
 
-                         <form class="form-horizontal" method="POST" action="{{ $pre_uri . 'store' }}" enctype="multipart/form-data">
 
-                             {{ csrf_field() }}
 
-                             <input type="hidden" name="data[type]" value="{{ $type }}">
 
-                             <div class="form-group row">
 
-                                 <label class="col-sm-2 col-sm-offset-1 control-label">标题</label>
 
-                                 <div class="col-sm-8">
 
-                                     <input type="text" name="data[title]" class="form-control" placeholder="请输入标题" value="{{ isset(old('data')['title']) ? old('data')['title'] : '' }}" required>
 
-                                 </div>
 
-                                 @if($errors->has('title'))
 
-                                     <span class="help-block">{{ $errors->first('title') }}</span>
 
-                                 @endif
 
-                             </div>
 
-                             @if($type != 3)
 
-                                 <div class="form-group row">
 
-                                     <label class="col-sm-2 col-sm-offset-1 control-label">内容</label>
 
-                                     <div class="col-sm-8">
 
-                                         <script id="content-editor" name="data[content]" type="text/plain"></script>
 
-                                     </div>
 
-                                     @if($errors->has('title'))
 
-                                         <span class="help-block">{{ $errors->first('title') }}</span>
 
-                                     @endif
 
-                                 </div>
 
-                             @else
 
-                                 <div class="form-group row">
 
-                                     <label class="col-sm-2 col-sm-offset-1 control-label">视频</label>
 
-                                     <div class="col-sm-8">
 
-                                         <div class="input-group">
 
-                                             <input type="text" class="form-control" placeholder="上传视频文件" value="{{ isset(old('data')['title']) ? old('data')['title'] : '' }}" readonly id="upload-video-path">
 
-                                             <input type="file" name="video" accept="video/*" style="display: none" id="upload-video-input" required>
 
-                                             <span class="input-group-btn" id="upload-video-btn">
 
-                                                 <button class="btn btn-success" type="button">选择文件</button>
 
-                                             </span>
 
-                                         </div>
 
-                                     </div>
 
-                                     @if($errors->has('title'))
 
-                                         <span class="help-block">{{ $errors->first('title') }}</span>
 
-                                     @endif
 
-                                 </div>
 
-                             @endif
 
-                             <div class="form-group row">
 
-                                 <label class="col-sm-2 col-sm-offset-1 control-label">排序</label>
 
-                                 <div class="col-sm-8">
 
-                                     <input type="text" name="data[sort]" class="form-control" placeholder="请输入排序" value="{{ isset(old('data')['sort']) ? old('data')['sort'] : 0 }}">
 
-                                 </div>
 
-                                 @if($errors->has('sort'))
 
-                                     <span class="help-block">{{ $errors->first('sort') }}</span>
 
-                                 @endif
 
-                             </div>
 
-                             <div class="form-group row">
 
-                                 <div class="col-sm-8 col-sm-offset-3">
 
-                                     <button type="submit" class="btn btn-sm btn-primary">提交</button>
 
-                                 </div>
 
-                             </div>
 
-                         </form>
 
-                     </div>
 
-                 </div>
 
-             </div>
 
-         </div>
 
-     </div>
 
- </div>
 
- @endsection
 
- @section('footer')
 
- <script type="text/javascript">
 
- $(function () {
 
-     $('#upload-video-btn').on('click', function () {
 
-         $('#upload-video-input').click();
 
-     });
 
-     $('#upload-video-input').change(function () {
 
-         if(this['files'].length > 0) {
 
-             $('#upload-video-path').val(this['files'][0]['name']);
 
-         }
 
-     });
 
-     UE.getEditor('content-editor');
 
- })
 
- </script>
 
- @endsection
 
 
  |