first upload all files
This commit is contained in:
18
Modules/Brand/Resources/views/admin/brands/create.blade.php
Normal file
18
Modules/Brand/Resources/views/admin/brands/create.blade.php
Normal file
@@ -0,0 +1,18 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('admin::resource.create', ['resource' => trans('brand::brands.brand')]))
|
||||
|
||||
<li><a href="{{ route('admin.brands.index') }}">{{ trans('brand::brands.brands') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.create', ['resource' => trans('brand::brands.brand')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.brands.store') }}" class="form-horizontal" id="brand-create-form" novalidate>
|
||||
{{ csrf_field() }}
|
||||
|
||||
{!! $tabs->render(compact('brand')) !!}
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('brand::admin.brands.partials.shortcuts')
|
||||
20
Modules/Brand/Resources/views/admin/brands/edit.blade.php
Normal file
20
Modules/Brand/Resources/views/admin/brands/edit.blade.php
Normal file
@@ -0,0 +1,20 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('admin::resource.edit', ['resource' => trans('brand::brands.brand')]))
|
||||
@slot('subtitle', $brand->name)
|
||||
|
||||
<li><a href="{{ route('admin.brands.index') }}">{{ trans('brand::brands.brands') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.edit', ['resource' => trans('brand::brands.brand')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.brands.update', $brand) }}" class="form-horizontal" id="brand-edit-form" novalidate>
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('put') }}
|
||||
|
||||
{!! $tabs->render(compact('brand')) !!}
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('brand::admin.brands.partials.shortcuts')
|
||||
42
Modules/Brand/Resources/views/admin/brands/index.blade.php
Normal file
42
Modules/Brand/Resources/views/admin/brands/index.blade.php
Normal file
@@ -0,0 +1,42 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('brand::brands.brands'))
|
||||
|
||||
<li class="active">{{ trans('brand::brands.brands') }}</li>
|
||||
@endcomponent
|
||||
|
||||
@component('admin::components.page.index_table')
|
||||
@slot('buttons', ['create'])
|
||||
@slot('resource', 'brands')
|
||||
@slot('name', trans('brand::brands.brand'))
|
||||
|
||||
@component('admin::components.table')
|
||||
@slot('thead')
|
||||
<tr>
|
||||
@include('admin::partials.table.select_all')
|
||||
|
||||
<th>{{ trans('admin::admin.table.id') }}</th>
|
||||
<th>{{ trans('brand::brands.table.logo') }}</th>
|
||||
<th>{{ trans('brand::brands.table.name') }}</th>
|
||||
<th>{{ trans('admin::admin.table.status') }}</th>
|
||||
<th data-sort>{{ trans('admin::admin.table.created') }}</th>
|
||||
</tr>
|
||||
@endslot
|
||||
@endcomponent
|
||||
@endcomponent
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
new DataTable('#brands-table .table', {
|
||||
columns: [
|
||||
{ data: 'checkbox', orderable: false, searchable: false, width: '3%' },
|
||||
{ data: 'id', width: '5%' },
|
||||
{ data: 'logo', orderable: false, searchable: false, width: '10%' },
|
||||
{ data: 'name', name: 'translations.name', orderable: false, defaultContent: '' },
|
||||
{ data: 'status', name: 'is_active', searchable: false },
|
||||
{ data: 'created', name: 'created_at' },
|
||||
],
|
||||
});
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,14 @@
|
||||
@push('shortcuts')
|
||||
<dl class="dl-horizontal">
|
||||
<dt><code>b</code></dt>
|
||||
<dd>{{ trans('admin::admin.shortcuts.back_to_index', ['name' => trans('brand::brands.brand')]) }}</dd>
|
||||
</dl>
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
keypressAction([
|
||||
{ key: 'b', route: "{{ route('admin.brands.index') }}" }
|
||||
]);
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,6 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('name', trans('brand::attributes.name'), $errors, $brand, ['required' => true]) }}
|
||||
{{ Form::checkbox('is_active', trans('brand::attributes.is_active'), trans('brand::brands.form.enable_the_brand'), $errors, $brand) }}
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,13 @@
|
||||
@include('media::admin.image_picker.single', [
|
||||
'title' => trans('brand::brands.form.logo'),
|
||||
'inputName' => 'files[logo]',
|
||||
'file' => $brand->logo,
|
||||
])
|
||||
|
||||
<div class="media-picker-divider"></div>
|
||||
|
||||
@include('media::admin.image_picker.single', [
|
||||
'title' => trans('brand::brands.form.banner'),
|
||||
'inputName' => 'files[banner]',
|
||||
'file' => $brand->banner,
|
||||
])
|
||||
@@ -0,0 +1,5 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
@include('meta::admin.meta_fields', ['entity' => $brand])
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user