content.blade.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. @section('content')
  2. <section class="content-header">
  3. @if($header || $description)
  4. <h1 style="display:inline">
  5. {!! $header !!}
  6. <small>{!! $description !!}</small>
  7. </h1>
  8. @elseif($breadcrumb || config('admin.enable_default_breadcrumb'))
  9. <div>&nbsp;</div>
  10. @endif
  11. @include('admin::partials.breadcrumb')
  12. </section>
  13. <section class="content">
  14. @include('admin::partials.alerts')
  15. @include('admin::partials.exception')
  16. {!! $content !!}
  17. </section>
  18. @if(Session::has('layer-msg'))
  19. @php
  20. $bag = Session::get('layer-msg');
  21. $type = $bag->get('type')[0] ?? 'success';
  22. $message = $bag->get('message')[0] ?? '';
  23. $offset = $bag->get('offset')[0] ?? '';
  24. @endphp
  25. <script>$(function () { LA.{{$type}}('{!! $message !!}', '{{ $offset }}'); })</script>
  26. @endif
  27. @endsection
  28. @section('app')
  29. {!! Dcat\Admin\Admin::style() !!}
  30. {!! admin_section(AdminSection::APP_INNER_BEFORE) !!}
  31. <div id="app">
  32. @yield('content')
  33. </div>
  34. {!! admin_section(AdminSection::APP_INNER_AFTER) !!}
  35. {!! Dcat\Admin\Admin::script() !!}
  36. {!! Dcat\Admin\Admin::html() !!}
  37. @endsection
  38. @if(!request()->pjax())
  39. @include('admin::index', ['header' => $header])
  40. @else
  41. <title>{{ Dcat\Admin\Admin::title() }} @if($header) | {{ $header }}@endif</title>
  42. <script>LA.pjaxresponse = true;</script>
  43. {!! Dcat\Admin\Admin::css() !!}
  44. {!! Dcat\Admin\Admin::js() !!}
  45. @yield('app')
  46. @endif