first upload all files
This commit is contained in:
6
Modules/Tag/Resources/lang/en/attributes.php
Normal file
6
Modules/Tag/Resources/lang/en/attributes.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'name' => 'Name',
|
||||
'slug' => 'URL',
|
||||
];
|
||||
8
Modules/Tag/Resources/lang/en/permissions.php
Normal file
8
Modules/Tag/Resources/lang/en/permissions.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'index' => 'Index Tag',
|
||||
'create' => 'Create Tag',
|
||||
'edit' => 'Edit Tag',
|
||||
'destroy' => 'Delete Tag',
|
||||
];
|
||||
15
Modules/Tag/Resources/lang/en/tags.php
Normal file
15
Modules/Tag/Resources/lang/en/tags.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'tag' => 'Tag',
|
||||
'tags' => 'Tags',
|
||||
'table' => [
|
||||
'name' => 'Name',
|
||||
],
|
||||
'tabs' => [
|
||||
'group' => [
|
||||
'tag_information' => 'Tag Information',
|
||||
],
|
||||
'general' => 'General',
|
||||
],
|
||||
];
|
||||
18
Modules/Tag/Resources/views/admin/tags/create.blade.php
Normal file
18
Modules/Tag/Resources/views/admin/tags/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('tag::tags.tag')]))
|
||||
|
||||
<li><a href="{{ route('admin.tags.index') }}">{{ trans('tag::tags.tags') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.create', ['resource' => trans('tag::tags.tag')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.tags.store') }}" class="form-horizontal" id="tag-create-form" novalidate>
|
||||
{{ csrf_field() }}
|
||||
|
||||
{!! $tabs->render(compact('tag')) !!}
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('tag::admin.tags.partials.shortcuts')
|
||||
20
Modules/Tag/Resources/views/admin/tags/edit.blade.php
Normal file
20
Modules/Tag/Resources/views/admin/tags/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('tag::tags.tag')]))
|
||||
@slot('subtitle', $tag->name)
|
||||
|
||||
<li><a href="{{ route('admin.tags.index') }}">{{ trans('tag::tags.tags') }}</a></li>
|
||||
<li class="active">{{ trans('admin::resource.edit', ['resource' => trans('tag::tags.tag')]) }}</li>
|
||||
@endcomponent
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ route('admin.tags.update', $tag) }}" class="form-horizontal" id="tag-edit-form" novalidate>
|
||||
{{ csrf_field() }}
|
||||
{{ method_field('put') }}
|
||||
|
||||
{!! $tabs->render(compact('tag')) !!}
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@include('tag::admin.tags.partials.shortcuts')
|
||||
38
Modules/Tag/Resources/views/admin/tags/index.blade.php
Normal file
38
Modules/Tag/Resources/views/admin/tags/index.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@extends('admin::layout')
|
||||
|
||||
@component('admin::components.page.header')
|
||||
@slot('title', trans('tag::tags.tags'))
|
||||
|
||||
<li class="active">{{ trans('tag::tags.tags') }}</li>
|
||||
@endcomponent
|
||||
|
||||
@component('admin::components.page.index_table')
|
||||
@slot('buttons', ['create'])
|
||||
@slot('resource', 'tags')
|
||||
@slot('name', trans('tag::tags.tag'))
|
||||
|
||||
@component('admin::components.table')
|
||||
@slot('thead')
|
||||
<tr>
|
||||
@include('admin::partials.table.select_all')
|
||||
|
||||
<th>{{ trans('admin::admin.table.id') }}</th>
|
||||
<th>{{ trans('tag::tags.table.name') }}</th>
|
||||
<th data-sort>{{ trans('admin::admin.table.created') }}</th>
|
||||
</tr>
|
||||
@endslot
|
||||
@endcomponent
|
||||
@endcomponent
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
new DataTable('#tags-table .table', {
|
||||
columns: [
|
||||
{ data: 'checkbox', orderable: false, searchable: false, width: '3%' },
|
||||
{ data: 'id', width: '5%' },
|
||||
{ data: 'name', name: 'translations.name', orderable: false, defaultContent: '' },
|
||||
{ data: 'created', name: 'created_at', width: '30%' },
|
||||
],
|
||||
});
|
||||
</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('tag::tags.tag')]) }}</dd>
|
||||
</dl>
|
||||
@endpush
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
keypressAction([
|
||||
{ key: 'b', route: "{{ route('admin.tags.index') }}" }
|
||||
]);
|
||||
</script>
|
||||
@endpush
|
||||
@@ -0,0 +1,9 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
{{ Form::text('name', trans('tag::attributes.name'), $errors, $tag, ['required' => true]) }}
|
||||
|
||||
@if ($tag->exists)
|
||||
{{ Form::text('slug', trans('tag::attributes.slug'), $errors, $tag, ['required' => true]) }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user