first upload all files
This commit is contained in:
44
Modules/Admin/Resources/views/components/accordion.blade.php
Normal file
44
Modules/Admin/Resources/views/components/accordion.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<div class="accordion-content clearfix">
|
||||
<div class="col-lg-3 col-md-4">
|
||||
<div class="accordion-box">
|
||||
<div class="panel-group" id="{{ $name }}">
|
||||
@foreach ($groups as $group => $options)
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a
|
||||
@if (count($groups) > 1)
|
||||
class="{{ ($options['active'] ?? false) ? '' : 'collapsed' }} {{ $tabs->group($group)->hasError() ? 'has-error' : '' }}"
|
||||
data-toggle="collapse"
|
||||
data-parent="#{{ $name }}"
|
||||
href="#{{ $group }}"
|
||||
@endif
|
||||
>
|
||||
{{ $options['title'] }}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div id="{{ $group }}" class="panel-collapse collapse {{ ($options['active'] ?? false) ? 'in' : '' }}">
|
||||
<div class="panel-body">
|
||||
<ul class="accordion-tab nav nav-tabs">
|
||||
{{ $tabs->group($group)->navs() }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-9 col-md-8">
|
||||
<div class="accordion-box-content">
|
||||
<div class="tab-content clearfix">
|
||||
{{ $contents }}
|
||||
|
||||
@include('admin::form.footer')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
@section('title')
|
||||
@isset($subtitle)
|
||||
{{ "{$subtitle} - {$title}" }}
|
||||
@else
|
||||
{{ $title }}
|
||||
@endisset
|
||||
@endsection
|
||||
|
||||
@section('content_header')
|
||||
<h3>{{ $title }}</h3>
|
||||
|
||||
<ol class="breadcrumb">
|
||||
<li><a href="{{ route('admin.dashboard.index') }}">{{ trans('admin::dashboard.dashboard') }}</a></li>
|
||||
|
||||
{{ $slot }}
|
||||
</ol>
|
||||
@endsection
|
||||
@@ -0,0 +1,67 @@
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="btn-group pull-right">
|
||||
@if (isset($buttons, $name))
|
||||
@foreach ($buttons as $view)
|
||||
<a href="{{ route("admin.{$resource}.{$view}") }}" class="btn btn-primary btn-actions btn-{{ $view }}">
|
||||
{{ trans("admin::resource.{$view}", ['resource' => $name]) }}
|
||||
</a>
|
||||
@endforeach
|
||||
@else
|
||||
{{ $buttons ?? '' }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-primary">
|
||||
<div class="box-body index-table" id="{{ isset($resource) ? "{$resource}-table" : '' }}">
|
||||
@if (isset($thead))
|
||||
@include('admin::components.table')
|
||||
@else
|
||||
{{ $slot }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@isset($name)
|
||||
@push('shortcuts')
|
||||
@if (isset($buttons) && in_array('create', $buttons))
|
||||
<dl class="dl-horizontal">
|
||||
<dt><code>c</code></dt>
|
||||
<dd>{{ trans('admin::resource.create', ['resource' => $name]) }}</dd>
|
||||
</dl>
|
||||
@endif
|
||||
|
||||
<dl class="dl-horizontal">
|
||||
<dt><code>Del</code></dt>
|
||||
<dd>{{ trans('admin::resource.delete', ['resource' => $name]) }}</dd>
|
||||
</dl>
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
@if (isset($buttons) && in_array('create', $buttons))
|
||||
keypressAction([
|
||||
{ key: 'c', route: '{{ route("admin.{$resource}.create") }}'}
|
||||
]);
|
||||
@endif
|
||||
|
||||
Mousetrap.bind('del', function () {
|
||||
$('.btn-delete').trigger('click');
|
||||
});
|
||||
|
||||
Mousetrap.bind('backspace', function () {
|
||||
$('.btn-delete').trigger('click');
|
||||
});
|
||||
|
||||
@isset($resource)
|
||||
DataTable.setRoutes('#{{ $resource }}-table .table', {
|
||||
index: '{{ "admin.{$resource}.index" }}',
|
||||
edit: '{{ "admin.{$resource}.edit" }}',
|
||||
destroy: '{{ "admin.{$resource}.destroy" }}',
|
||||
});
|
||||
@endisset
|
||||
</script>
|
||||
@endpush
|
||||
@endisset
|
||||
11
Modules/Admin/Resources/views/components/table.blade.php
Normal file
11
Modules/Admin/Resources/views/components/table.blade.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-hover {{ $class ?? '' }}" id="{{ $id ?? '' }}">
|
||||
<thead>{{ $thead }}</thead>
|
||||
|
||||
<tbody>{{ $slot }}</tbody>
|
||||
|
||||
@isset($tfoot)
|
||||
<tfoot>{{ $tfoot }}</tfoot>
|
||||
@endisset
|
||||
</table>
|
||||
</div>
|
||||
Reference in New Issue
Block a user