@extends('admin.master')
@section('style')
  <style>
      .message-show-list li {
          width: 100%;
      }
      .message-show-list li span {
          width: 90px;
      }
  </style>
@endsection

@section('top')
  <div class="top-breadcrumb pull-left">
    <h5>查看日志</h5>
    <a class="btn btn-xs btn-default goback" onclick="javascript:history.go(-1);">
      <i class="iconfont icon-back-copy"></i><span>返回</span>
    </a>
  </div>
@endsection

@section('content')
  <div class="message-show">
    {!! Form::model($data, ['route' => ['admin.system-log.update', $data->id], 'method'=>'put', 'class'=>'form-horizontal form-detail']) !!}
    <ul class="message-show-list">
      <li>
        <span>操作人：</span>
        <p>{{ $data->user->name }}</p>
      </li>
      <li>
        <span>操作IP：</span>
        <p>{{ $data->ip }}</p>
      </li>
      <li>
        <span>操作记录：</span>
        <p>{{ $data->record }}</p>
      </li>
      <li>
        <span>操作时间：</span>
        <p>{{ $data->created_at }}</p>
      </li>
      @if($data->content)
        <li>
          <span>标题：</span>
          <p>{{ json_decode($data->content, true)['title'] }}</p>
        </li>
        <li>
          <span>内容：</span>
          {!! Form::textarea("content", json_decode($data->content, true)['content'], ['id'=>"editor", 'class'=>'len-full']) !!}
        </li>
      @endif
    </ul>
    <div class="message-show-back">
      <button type="button" class="btn btn-primary" onclick="javascript:history.go(-1);">返回</button>
    </div>
    {!! Form::close() !!}
  </div>

@endsection

@section('foot')
  <script src="{{ asset('data/assets/js/ueditor/ueditor.config.js') }}"></script>
  <script src="{{ asset('data/assets/js/ueditor/ueditor.all.min.js') }}"></script>
  <script type="text/javascript">
      $(function(){
          UE.getEditor('editor');
      });
  </script>
@endsection