diff --git a/.gitignore b/.gitignore index 730160b..b4a27af 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ storage/ .env.php .env .env.example +composer.lock diff --git a/composer.json b/composer.json index ce41caa..5abb31e 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "require": { "php": "^8.0", "illuminate/support": "^9.0", + "illuminate/view": "^9.0", "infyomlabs/laravel-ui-adminlte": "^4.0" }, "autoload": { diff --git a/src/AdminLTETemplatesServiceProvider.php b/src/AdminLTETemplatesServiceProvider.php index abaf86c..97e9366 100644 --- a/src/AdminLTETemplatesServiceProvider.php +++ b/src/AdminLTETemplatesServiceProvider.php @@ -3,6 +3,7 @@ namespace InfyOm\AdminLTETemplates; use Illuminate\Pagination\Paginator; +use Illuminate\Support\Facades\Blade; use Illuminate\Support\ServiceProvider; class AdminLTETemplatesServiceProvider extends ServiceProvider @@ -21,6 +22,14 @@ public function boot() Paginator::defaultView('adminlte-templates::common.paginator'); Paginator::defaultSimpleView('adminlte-templates::common.simple_paginator'); + + Blade::directive('ocb', function () { + return ''; + }); + + Blade::directive('ccb', function () { + return ''; + }); } /** diff --git a/templates/scaffold/fields/boolean.stub b/templates/scaffold/fields/boolean.stub deleted file mode 100644 index 97d3c22..0000000 --- a/templates/scaffold/fields/boolean.stub +++ /dev/null @@ -1,8 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - -
diff --git a/templates/scaffold/fields/boolean_locale.stub b/templates/scaffold/fields/boolean_locale.stub deleted file mode 100644 index 63a63f7..0000000 --- a/templates/scaffold/fields/boolean_locale.stub +++ /dev/null @@ -1,8 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - -
diff --git a/templates/scaffold/fields/checkbox.stub b/templates/scaffold/fields/checkbox.stub deleted file mode 100644 index 2ecb82d..0000000 --- a/templates/scaffold/fields/checkbox.stub +++ /dev/null @@ -1,8 +0,0 @@ - -
-
- {!! Form::hidden('$FIELD_NAME$', 0, ['class' => 'form-check-input']) !!} - {!! Form::checkbox('$FIELD_NAME$', '$CHECKBOX_VALUE$', null, ['class' => 'form-check-input']) !!} - {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$', ['class' => 'form-check-label']) !!} -
-
diff --git a/templates/scaffold/fields/checkbox_group.stub b/templates/scaffold/fields/checkbox_group.stub deleted file mode 100644 index 6ff474e..0000000 --- a/templates/scaffold/fields/checkbox_group.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - $CHECKBOXES$ -
\ No newline at end of file diff --git a/templates/scaffold/fields/checkbox_group_locale.stub b/templates/scaffold/fields/checkbox_group_locale.stub deleted file mode 100644 index 95578ce..0000000 --- a/templates/scaffold/fields/checkbox_group_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - $CHECKBOXES$ -
\ No newline at end of file diff --git a/templates/scaffold/fields/checkbox_locale.stub b/templates/scaffold/fields/checkbox_locale.stub deleted file mode 100644 index 094439f..0000000 --- a/templates/scaffold/fields/checkbox_locale.stub +++ /dev/null @@ -1,8 +0,0 @@ - -
-
- {!! Form::hidden('$FIELD_NAME$', 0, ['class' => 'form-check-input']) !!} - {!! Form::checkbox('$FIELD_NAME$', '$CHECKBOX_VALUE$', null, ['class' => 'form-check-input']) !!} - {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':', ['class' => 'form-check-label']) -
-
diff --git a/templates/scaffold/fields/date.stub b/templates/scaffold/fields/date.stub deleted file mode 100644 index 289f19f..0000000 --- a/templates/scaffold/fields/date.stub +++ /dev/null @@ -1,15 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::text('$FIELD_NAME$', null, ['class' => 'form-control','id'=>'$FIELD_NAME$']) !!} -
- -@push('page_scripts') - -@endpush \ No newline at end of file diff --git a/templates/scaffold/fields/date_locale.stub b/templates/scaffold/fields/date_locale.stub deleted file mode 100644 index eb2b228..0000000 --- a/templates/scaffold/fields/date_locale.stub +++ /dev/null @@ -1,15 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::text('$FIELD_NAME$', null, ['class' => 'form-control','id'=>'$FIELD_NAME$']) !!} -
- -@push('page_scripts') - -@endpush \ No newline at end of file diff --git a/templates/scaffold/fields/email.stub b/templates/scaffold/fields/email.stub deleted file mode 100644 index 835076e..0000000 --- a/templates/scaffold/fields/email.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::email('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/email_locale.stub b/templates/scaffold/fields/email_locale.stub deleted file mode 100644 index 5dac4f9..0000000 --- a/templates/scaffold/fields/email_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::email('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/file.stub b/templates/scaffold/fields/file.stub deleted file mode 100644 index 7daf5cf..0000000 --- a/templates/scaffold/fields/file.stub +++ /dev/null @@ -1,11 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} -
-
- {!! Form::file('$FIELD_NAME$', ['class' => 'custom-file-input']) !!} - {!! Form::label('$FIELD_NAME$', 'Choose file', ['class' => 'custom-file-label']) !!} -
-
-
-
diff --git a/templates/scaffold/fields/file_locale.stub b/templates/scaffold/fields/file_locale.stub deleted file mode 100644 index c0f45ab..0000000 --- a/templates/scaffold/fields/file_locale.stub +++ /dev/null @@ -1,11 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} -
-
- {!! Form::file('$FIELD_NAME$', ['class' => 'custom-file-input']) !!} - {!! Form::label('$FIELD_NAME$', 'Choose file', ['class' => 'custom-file-label']) !!} -
-
-
-
diff --git a/templates/scaffold/fields/number.stub b/templates/scaffold/fields/number.stub deleted file mode 100644 index 39bb8dc..0000000 --- a/templates/scaffold/fields/number.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::number('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/number_locale.stub b/templates/scaffold/fields/number_locale.stub deleted file mode 100644 index 265dd7e..0000000 --- a/templates/scaffold/fields/number_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::number('$FIELD_NAME$', null, ['class' => 'form-control']) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/password.stub b/templates/scaffold/fields/password.stub deleted file mode 100644 index 29adcb5..0000000 --- a/templates/scaffold/fields/password.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::password('$FIELD_NAME$', ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/password_locale.stub b/templates/scaffold/fields/password_locale.stub deleted file mode 100644 index f3bd8e5..0000000 --- a/templates/scaffold/fields/password_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::password('$FIELD_NAME$', ['class' => 'form-control']) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/radio.stub b/templates/scaffold/fields/radio.stub deleted file mode 100644 index 8ac4c92..0000000 --- a/templates/scaffold/fields/radio.stub +++ /dev/null @@ -1,3 +0,0 @@ - diff --git a/templates/scaffold/fields/radio_group.stub b/templates/scaffold/fields/radio_group.stub deleted file mode 100644 index debc6f8..0000000 --- a/templates/scaffold/fields/radio_group.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$', ['class' => 'form-check-label']) !!} - $RADIO_BUTTONS$ -
diff --git a/templates/scaffold/fields/radio_group_locale.stub b/templates/scaffold/fields/radio_group_locale.stub deleted file mode 100644 index 7833833..0000000 --- a/templates/scaffold/fields/radio_group_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$'), ['class' => 'form-check-label']) !!} - $RADIO_BUTTONS$ -
diff --git a/templates/scaffold/fields/select.stub b/templates/scaffold/fields/select.stub deleted file mode 100644 index e4ec4cc..0000000 --- a/templates/scaffold/fields/select.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::select('$FIELD_NAME$', $INPUT_ARR$, null, ['class' => 'form-control custom-select']) !!} -
diff --git a/templates/scaffold/fields/select_locale.stub b/templates/scaffold/fields/select_locale.stub deleted file mode 100644 index 5b6298a..0000000 --- a/templates/scaffold/fields/select_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::select('$FIELD_NAME$', $INPUT_ARR$, null, ['class' => 'form-control custom-select']) !!} -
diff --git a/templates/scaffold/fields/text.stub b/templates/scaffold/fields/text.stub deleted file mode 100644 index e06fe3e..0000000 --- a/templates/scaffold/fields/text.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::text('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/text_locale.stub b/templates/scaffold/fields/text_locale.stub deleted file mode 100644 index f3b8832..0000000 --- a/templates/scaffold/fields/text_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::text('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/textarea.stub b/templates/scaffold/fields/textarea.stub deleted file mode 100644 index ac96860..0000000 --- a/templates/scaffold/fields/textarea.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} - {!! Form::textarea('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/textarea_locale.stub b/templates/scaffold/fields/textarea_locale.stub deleted file mode 100644 index 375e7d7..0000000 --- a/templates/scaffold/fields/textarea_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} - {!! Form::textarea('$FIELD_NAME$', null, ['class' => 'form-control'$SIZE$]) !!} -
\ No newline at end of file diff --git a/templates/scaffold/fields/toggle-switch.stub b/templates/scaffold/fields/toggle-switch.stub deleted file mode 100644 index e4e9111..0000000 --- a/templates/scaffold/fields/toggle-switch.stub +++ /dev/null @@ -1,7 +0,0 @@ - -
-
- {!! Form::checkbox('$FIELD_NAME$', 1, null, ['class' => 'custom-control-input']) !!} - {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:', ['class' => 'custom-control-label']) !!} -
-
diff --git a/templates/scaffold/fields/toggle-switch_locale.stub b/templates/scaffold/fields/toggle-switch_locale.stub deleted file mode 100644 index fcd692c..0000000 --- a/templates/scaffold/fields/toggle-switch_locale.stub +++ /dev/null @@ -1,8 +0,0 @@ - -
-
- {!! Form::checkbox('$FIELD_NAME$', 1, null, ['class' => 'custom-control-input']) !!} - {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':', ['class' => 'custom-control-label']) !!} -
-
- diff --git a/templates/scaffold/layouts/menu_template.stub b/templates/scaffold/layouts/menu_template.stub deleted file mode 100644 index f53bea2..0000000 --- a/templates/scaffold/layouts/menu_template.stub +++ /dev/null @@ -1,6 +0,0 @@ - diff --git a/templates/scaffold/views/blade_table_body.stub b/templates/scaffold/views/blade_table_body.stub deleted file mode 100644 index 7809568..0000000 --- a/templates/scaffold/views/blade_table_body.stub +++ /dev/null @@ -1,32 +0,0 @@ -
- - - - $FIELD_HEADERS$ - - - - - @foreach($$MODEL_NAME_PLURAL_CAMEL$ as $$MODEL_NAME_CAMEL$) - - $FIELD_BODY$ - - - @endforeach - -
Action
- {!! Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $$MODEL_NAME_CAMEL$->$PRIMARY_KEY_NAME$], 'method' => 'delete']) !!} -
- - - - - - - {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} -
- {!! Form::close() !!} -
-
diff --git a/templates/scaffold/views/blade_table_body_locale.stub b/templates/scaffold/views/blade_table_body_locale.stub deleted file mode 100644 index 99ddcdc..0000000 --- a/templates/scaffold/views/blade_table_body_locale.stub +++ /dev/null @@ -1,32 +0,0 @@ -
- - - - $FIELD_HEADERS$ - - - - - @foreach($$MODEL_NAME_PLURAL_CAMEL$ as $$MODEL_NAME_CAMEL$) - - $FIELD_BODY$ - - - @endforeach - -
@lang('crud.action')
- {!! Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $$MODEL_NAME_CAMEL$->$PRIMARY_KEY_NAME$], 'method' => 'delete']) !!} -
- - - - - - - {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} -
- {!! Form::close() !!} -
-
diff --git a/templates/scaffold/views/create.stub b/templates/scaffold/views/create.stub deleted file mode 100644 index 1e3420c..0000000 --- a/templates/scaffold/views/create.stub +++ /dev/null @@ -1,39 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-

Create $MODEL_NAME_HUMAN$

-
-
-
-
- -
- - @include('adminlte-templates::common.errors') - -
- - {!! Form::open(['route' => '$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.store'$FILES$]) !!} - -
- -
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.fields') -
- -
- - - - {!! Form::close() !!} - -
-
-@endsection diff --git a/templates/scaffold/views/create_locale.stub b/templates/scaffold/views/create_locale.stub deleted file mode 100644 index d5dc1a1..0000000 --- a/templates/scaffold/views/create_locale.stub +++ /dev/null @@ -1,39 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
- @lang('models/$MODEL_NAME_PLURAL_CAMEL$.singular') -
-
-
-
- -
- - @include('adminlte-templates::common.errors') - -
- - {!! Form::open(['route' => '$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.store'$FILES$]) !!} - -
-
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.fields') -
-
- - - - {!! Form::close() !!} - -
-
-@endsection diff --git a/templates/scaffold/views/datatable_body.stub b/templates/scaffold/views/datatable_body.stub deleted file mode 100644 index 7fbd4d3..0000000 --- a/templates/scaffold/views/datatable_body.stub +++ /dev/null @@ -1,10 +0,0 @@ -@push('third_party_stylesheets') - @include('layouts.datatables_css') -@endpush - -{!! $dataTable->table(['width' => '100%', 'class' => 'table table-striped table-bordered']) !!} - -@push('third_party_scripts') - @include('layouts.datatables_js') - {!! $dataTable->scripts() !!} -@endpush \ No newline at end of file diff --git a/templates/scaffold/views/datatable_column.stub b/templates/scaffold/views/datatable_column.stub deleted file mode 100644 index e4872ef..0000000 --- a/templates/scaffold/views/datatable_column.stub +++ /dev/null @@ -1 +0,0 @@ -'$FIELD_NAME$' \ No newline at end of file diff --git a/templates/scaffold/views/datatable_column_locale.stub b/templates/scaffold/views/datatable_column_locale.stub deleted file mode 100644 index f7f8421..0000000 --- a/templates/scaffold/views/datatable_column_locale.stub +++ /dev/null @@ -1 +0,0 @@ -'$FIELD_NAME$' => new Column(['title' => __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$'), 'data' => '$FIELD_NAME$'$SEARCHABLE$]) \ No newline at end of file diff --git a/templates/scaffold/views/datatables_actions.stub b/templates/scaffold/views/datatables_actions.stub deleted file mode 100644 index 5a4ab71..0000000 --- a/templates/scaffold/views/datatables_actions.stub +++ /dev/null @@ -1,15 +0,0 @@ -{!! Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $$PRIMARY_KEY_NAME$], 'method' => 'delete']) !!} -
- - - - - - - {!! Form::button('', [ - 'type' => 'submit', - 'class' => 'btn btn-danger btn-xs', - 'onclick' => "return confirm('Are you sure?')" - ]) !!} -
-{!! Form::close() !!} diff --git a/templates/scaffold/views/datatables_actions_locale.stub b/templates/scaffold/views/datatables_actions_locale.stub deleted file mode 100644 index f4a93c1..0000000 --- a/templates/scaffold/views/datatables_actions_locale.stub +++ /dev/null @@ -1,15 +0,0 @@ -{!! Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $$PRIMARY_KEY_NAME$], 'method' => 'delete']) !!} -
- - - - - - - {!! Form::button('', [ - 'type' => 'submit', - 'class' => 'btn btn-danger btn-xs', - 'onclick' => 'return confirm("'.__('crud.are_you_sure').'")' - ]) !!} -
-{!! Form::close() !!} diff --git a/templates/scaffold/views/edit.stub b/templates/scaffold/views/edit.stub deleted file mode 100644 index d441e5f..0000000 --- a/templates/scaffold/views/edit.stub +++ /dev/null @@ -1,37 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-

Edit $MODEL_NAME_HUMAN$

-
-
-
-
- -
- - @include('adminlte-templates::common.errors') - -
- - {!! Form::model($$MODEL_NAME_CAMEL$, ['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.update', $$MODEL_NAME_CAMEL$->$PRIMARY_KEY_NAME$], 'method' => 'patch'$FILES$]) !!} - -
-
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.fields') -
-
- - - - {!! Form::close() !!} - -
-
-@endsection diff --git a/templates/scaffold/views/edit_locale.stub b/templates/scaffold/views/edit_locale.stub deleted file mode 100644 index f74faf1..0000000 --- a/templates/scaffold/views/edit_locale.stub +++ /dev/null @@ -1,39 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
- @lang('models/$MODEL_NAME_PLURAL_CAMEL$.singular') -
-
-
-
- -
- - @include('adminlte-templates::common.errors') - -
- - {!! Form::model($$MODEL_NAME_CAMEL$, ['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.update', $$MODEL_NAME_CAMEL$->$PRIMARY_KEY_NAME$], 'method' => 'patch'$FILES$]) !!} - -
-
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.fields') -
-
- - - - {!! Form::close() !!} - -
-
-@endsection \ No newline at end of file diff --git a/templates/scaffold/views/fields.stub b/templates/scaffold/views/fields.stub deleted file mode 100644 index 2e2bf9b..0000000 --- a/templates/scaffold/views/fields.stub +++ /dev/null @@ -1 +0,0 @@ -$FIELDS$ \ No newline at end of file diff --git a/templates/scaffold/views/fields_locale.stub b/templates/scaffold/views/fields_locale.stub deleted file mode 100644 index 2e2bf9b..0000000 --- a/templates/scaffold/views/fields_locale.stub +++ /dev/null @@ -1 +0,0 @@ -$FIELDS$ \ No newline at end of file diff --git a/templates/scaffold/views/index.stub b/templates/scaffold/views/index.stub deleted file mode 100644 index 16754b8..0000000 --- a/templates/scaffold/views/index.stub +++ /dev/null @@ -1,40 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-

$MODEL_NAME_PLURAL_HUMAN$

-
- -
-
-
- -
- - @include('flash::message') - -
- -
-
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.table') - - -
- -
-
- -@endsection \ No newline at end of file diff --git a/templates/scaffold/views/index_locale.stub b/templates/scaffold/views/index_locale.stub deleted file mode 100644 index 5942fa5..0000000 --- a/templates/scaffold/views/index_locale.stub +++ /dev/null @@ -1,41 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
- @lang('models/$MODEL_NAME_PLURAL_CAMEL$.plural') -
- -
-
-
- -
- - @include('flash::message') - -
- -
-
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.table') - - -
-
-
- -@endsection - - diff --git a/templates/scaffold/views/paginate.stub b/templates/scaffold/views/paginate.stub deleted file mode 100644 index a3dcc76..0000000 --- a/templates/scaffold/views/paginate.stub +++ /dev/null @@ -1 +0,0 @@ -@include('adminlte-templates::common.paginate', ['records' => $$MODEL_NAME_PLURAL_CAMEL$]) \ No newline at end of file diff --git a/templates/scaffold/views/show_field.stub b/templates/scaffold/views/show_field.stub deleted file mode 100644 index b0f21dc..0000000 --- a/templates/scaffold/views/show_field.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', '$FIELD_NAME_TITLE$:') !!} -

{{ $$MODEL_NAME_CAMEL$->$FIELD_NAME$ }}

-
\ No newline at end of file diff --git a/templates/scaffold/views/show_field_locale.stub b/templates/scaffold/views/show_field_locale.stub deleted file mode 100644 index d723065..0000000 --- a/templates/scaffold/views/show_field_locale.stub +++ /dev/null @@ -1,5 +0,0 @@ - -
- {!! Form::label('$FIELD_NAME$', __('models/$MODEL_NAME_PLURAL_CAMEL$.fields.$FIELD_NAME$').':') !!} -

{{ $$MODEL_NAME_CAMEL$->$FIELD_NAME$ }}

-
\ No newline at end of file diff --git a/templates/scaffold/views/show_locale.stub b/templates/scaffold/views/show_locale.stub deleted file mode 100644 index fcad1d8..0000000 --- a/templates/scaffold/views/show_locale.stub +++ /dev/null @@ -1,29 +0,0 @@ -@extends('layouts.app') - -@section('content') -
-
-
-
-

@lang('models/$MODEL_NAME_PLURAL_CAMEL$.singular')

-
- -
-
-
- -
-
-
-
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.show_fields') -
-
-
-
-@endsection diff --git a/templates/scaffold/views/table.stub b/templates/scaffold/views/table.stub deleted file mode 100644 index 449d568..0000000 --- a/templates/scaffold/views/table.stub +++ /dev/null @@ -1,30 +0,0 @@ - - - - $FIELD_HEADERS$ - - - - - @foreach($$MODEL_NAME_PLURAL_CAMEL$ as $$MODEL_NAME_CAMEL$) - - $FIELD_BODY$ - - - @endforeach - -
Action
- {!! Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $$MODEL_NAME_CAMEL$->$PRIMARY_KEY_NAME$], 'method' => 'delete']) !!} -
- - - - - - - {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} -
- {!! Form::close() !!} -
\ No newline at end of file diff --git a/templates/scaffold/views/table_cell.stub b/templates/scaffold/views/table_cell.stub deleted file mode 100644 index 97f322e..0000000 --- a/templates/scaffold/views/table_cell.stub +++ /dev/null @@ -1 +0,0 @@ -{{ $$MODEL_NAME_CAMEL$->$FIELD_NAME$ }} \ No newline at end of file diff --git a/templates/scaffold/views/table_header.stub b/templates/scaffold/views/table_header.stub deleted file mode 100644 index a99b514..0000000 --- a/templates/scaffold/views/table_header.stub +++ /dev/null @@ -1 +0,0 @@ -$FIELD_NAME_TITLE$ \ No newline at end of file diff --git a/templates/scaffold/views/table_header_locale.stub b/templates/scaffold/views/table_header_locale.stub deleted file mode 100644 index a99b514..0000000 --- a/templates/scaffold/views/table_header_locale.stub +++ /dev/null @@ -1 +0,0 @@ -$FIELD_NAME_TITLE$ \ No newline at end of file diff --git a/templates/scaffold/views/table_locale.stub b/templates/scaffold/views/table_locale.stub deleted file mode 100644 index 666b7f4..0000000 --- a/templates/scaffold/views/table_locale.stub +++ /dev/null @@ -1,30 +0,0 @@ - - - - $FIELD_HEADERS$ - - - - - @foreach($$MODEL_NAME_PLURAL_CAMEL$ as $$MODEL_NAME_CAMEL$) - - $FIELD_BODY$ - - - @endforeach - -
@lang('crud.action')
- {!! Form::open(['route' => ['$ROUTE_NAMED_PREFIX$$MODEL_NAME_PLURAL_CAMEL$.destroy', $$MODEL_NAME_CAMEL$->$PRIMARY_KEY_NAME$], 'method' => 'delete']) !!} -
- - - - - - - {!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} -
- {!! Form::close() !!} -
\ No newline at end of file diff --git a/views/templates/fields/boolean.blade.php b/views/templates/fields/boolean.blade.php new file mode 100644 index 0000000..ffad7f5 --- /dev/null +++ b/views/templates/fields/boolean.blade.php @@ -0,0 +1,12 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + +
\ No newline at end of file diff --git a/views/templates/fields/checkbox.blade.php b/views/templates/fields/checkbox.blade.php new file mode 100644 index 0000000..ca7bb6b --- /dev/null +++ b/views/templates/fields/checkbox.blade.php @@ -0,0 +1,8 @@ + +
+
+ @{!! Form::hidden('{{ $fieldName }}', 0, ['class' => 'form-check-input']) !!} + @{!! Form::checkbox('{{ $fieldName }}', '{{ $checkboxVal }}', null, ['class' => 'form-check-input']) !!} + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}', ['class' => 'form-check-label']) !!} +
+
\ No newline at end of file diff --git a/views/templates/fields/checkbox_group.blade.php b/views/templates/fields/checkbox_group.blade.php new file mode 100644 index 0000000..fb9fbf7 --- /dev/null +++ b/views/templates/fields/checkbox_group.blade.php @@ -0,0 +1,14 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif +@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + {!! $checkboxes !!} +
\ No newline at end of file diff --git a/views/templates/fields/date.blade.php b/views/templates/fields/date.blade.php new file mode 100644 index 0000000..ee1d94a --- /dev/null +++ b/views/templates/fields/date.blade.php @@ -0,0 +1,15 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::text('{{ $fieldName }}', null, ['class' => 'form-control','id'=>'{{ $fieldName }}']) !!} +
+ +@@push('page_scripts') + +@@endpush diff --git a/views/templates/fields/email.blade.php b/views/templates/fields/email.blade.php new file mode 100644 index 0000000..f350eb2 --- /dev/null +++ b/views/templates/fields/email.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::email('{{ $fieldName }}', null, ['class' => 'form-control'@php if(isset($options)) { echo htmlspecialchars_decode($options); } @endphp]) !!} +
\ No newline at end of file diff --git a/views/templates/fields/file.blade.php b/views/templates/fields/file.blade.php new file mode 100644 index 0000000..259434a --- /dev/null +++ b/views/templates/fields/file.blade.php @@ -0,0 +1,15 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif +
+
+ @{!! Form::file('{{ $fieldName }}', ['class' => 'custom-file-input']) !!} + @{!! Form::label('{{ $fieldName }}', 'Choose file', ['class' => 'custom-file-label']) !!} +
+
+
+
diff --git a/views/templates/fields/number.blade.php b/views/templates/fields/number.blade.php new file mode 100644 index 0000000..bc5d38c --- /dev/null +++ b/views/templates/fields/number.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::number('{{ $fieldName }}', null, ['class' => 'form-control'@php if(isset($options)) { echo htmlspecialchars_decode($options); } @endphp]) !!} +
\ No newline at end of file diff --git a/views/templates/fields/password.blade.php b/views/templates/fields/password.blade.php new file mode 100644 index 0000000..f48683d --- /dev/null +++ b/views/templates/fields/password.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::password('{{ $fieldName }}', ['class' => 'form-control'@php if(isset($options)) { echo htmlspecialchars_decode($options); } @endphp]) !!} +
\ No newline at end of file diff --git a/views/templates/fields/radio.blade.php b/views/templates/fields/radio.blade.php new file mode 100644 index 0000000..a8f528e --- /dev/null +++ b/views/templates/fields/radio.blade.php @@ -0,0 +1,3 @@ + diff --git a/views/templates/fields/radio_group.blade.php b/views/templates/fields/radio_group.blade.php new file mode 100644 index 0000000..9637d0c --- /dev/null +++ b/views/templates/fields/radio_group.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}'), ['class' => 'form-check-label']) !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}', ['class' => 'form-check-label']) !!} +@endif + {!! $radioButtons !!} +
diff --git a/views/templates/fields/select.blade.php b/views/templates/fields/select.blade.php new file mode 100644 index 0000000..08ec7b0 --- /dev/null +++ b/views/templates/fields/select.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::select('{{ $fieldName }}', @php echo htmlspecialchars_decode($selectValues) @endphp, null, ['class' => 'form-control custom-select']) !!} +
diff --git a/views/templates/fields/text.blade.php b/views/templates/fields/text.blade.php new file mode 100644 index 0000000..2e2c2e6 --- /dev/null +++ b/views/templates/fields/text.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::text('{{ $fieldName }}', null, ['class' => 'form-control'@php if(isset($options)) { echo htmlspecialchars_decode($options); } @endphp]) !!} +
\ No newline at end of file diff --git a/views/templates/fields/textarea.blade.php b/views/templates/fields/textarea.blade.php new file mode 100644 index 0000000..7b324c0 --- /dev/null +++ b/views/templates/fields/textarea.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif + @{!! Form::textarea('{{ $fieldName }}', null, ['class' => 'form-control'@php if(isset($options)) { echo htmlspecialchars_decode($options); } @endphp]) !!} +
\ No newline at end of file diff --git a/views/templates/fields/toggle-switch.blade.php b/views/templates/fields/toggle-switch.blade.php new file mode 100644 index 0000000..50dc6d3 --- /dev/null +++ b/views/templates/fields/toggle-switch.blade.php @@ -0,0 +1,11 @@ + +
+
+ @{!! Form::checkbox('{{ $fieldName }}', 1, null, ['class' => 'custom-control-input']) !!} +@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':', ['class' => 'custom-control-label']) !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:', ['class' => 'custom-control-label']) !!} +@endif +
+
diff --git a/views/templates/layouts/menu_template.blade.php b/views/templates/layouts/menu_template.blade.php new file mode 100644 index 0000000..f55644d --- /dev/null +++ b/views/templates/layouts/menu_template.blade.php @@ -0,0 +1,10 @@ + diff --git a/views/templates/scaffold/create.blade.php b/views/templates/scaffold/create.blade.php new file mode 100644 index 0000000..ec59588 --- /dev/null +++ b/views/templates/scaffold/create.blade.php @@ -0,0 +1,43 @@ +@@extends('layouts.app') + +@@section('content') +
+
+
+
+@if($config->options->localized) + @@lang('models/{!! $config->modelNames->camelPlural !!}.singular') +@else +

Create {{ $config->modelNames->humanPlural }}

+@endif +
+
+
+
+ +
+ + @@include('adminlte-templates::common.errors') + +
+ + @{!! Form::open(['route' => '{{ $config->prefixes->getRoutePrefixWith('.') }}{{ $config->modelNames->camelPlural }}.store']) !!} + +
+ +
+ @@include('{{ $config->prefixes->getViewPrefixForInclude() }}{{ $config->modelNames->snakePlural }}.fields') +
+ +
+ + + + @{!! Form::close() !!} + +
+
+@@endsection diff --git a/views/templates/scaffold/edit.blade.php b/views/templates/scaffold/edit.blade.php new file mode 100644 index 0000000..d45d420 --- /dev/null +++ b/views/templates/scaffold/edit.blade.php @@ -0,0 +1,41 @@ +@@extends('layouts.app') + +@@section('content') +
+
+
+
+@if($config->options->localized) + @@lang('models/{!! $config->modelNames->camelPlural !!}.singular') +@else +

Edit {{ $config->modelNames->human }}

+@endif +
+
+
+
+ +
+ + @@include('adminlte-templates::common.errors') + +
+ + @{!! Form::model(${{ $config->modelNames->camel }}, ['route' => ['{{ $config->prefixes->getRoutePrefixWith('.') }}{{ $config->modelNames->camelPlural }}.update', ${{ $config->modelNames->camel }}->{{ $config->primaryName }}], 'method' => 'patch']) !!} + +
+
+ @@include('{{ $config->prefixes->getViewPrefixForInclude() }}{{ $config->modelNames->snakePlural }}.fields') +
+
+ + + + @{!! Form::close() !!} + +
+
+@@endsection diff --git a/views/templates/scaffold/index.blade.php b/views/templates/scaffold/index.blade.php new file mode 100644 index 0000000..e70f482 --- /dev/null +++ b/views/templates/scaffold/index.blade.php @@ -0,0 +1,39 @@ +@@extends('layouts.app') + +@@section('content') +
+
+
+
+@if($config->options->localized) +

@@lang('models/{{ $config->modelNames->camelPlural }}.plural')

+@else +

{{ $config->modelNames->humanPlural }}

+@endif +
+ +
+
+
+ +
+ + @@include('flash::message') + +
+ +
+ {!! $table !!} +
+
+ +@@endsection diff --git a/views/templates/scaffold/paginate.blade.php b/views/templates/scaffold/paginate.blade.php new file mode 100644 index 0000000..ec6551e --- /dev/null +++ b/views/templates/scaffold/paginate.blade.php @@ -0,0 +1 @@ +@@include('adminlte-templates::common.paginate', ['records' => ${!! $config->modelNames->camelPlural !!}]) \ No newline at end of file diff --git a/templates/scaffold/views/show.stub b/views/templates/scaffold/show.blade.php similarity index 51% rename from templates/scaffold/views/show.stub rename to views/templates/scaffold/show.blade.php index 2d387f3..fadb609 100644 --- a/templates/scaffold/views/show.stub +++ b/views/templates/scaffold/show.blade.php @@ -1,15 +1,19 @@ -@extends('layouts.app') +@@extends('layouts.app') -@section('content') +@@section('content')
-

$MODEL_NAME_HUMAN$ Details

+@if($config->options->localized) +

{{ $config->modelNames->human }} Details

+@else +

@@lang('models/{!! $config->modelNames->camelPlural !!}.singular')

+@endif
@@ -21,9 +25,9 @@
- @include('$VIEW_PREFIX$$MODEL_NAME_PLURAL_SNAKE$.show_fields') + @@include('{{ $config->prefixes->getViewPrefixForInclude() }}{{ $config->modelNames->snakePlural }}.show_fields')
-@endsection +@@endsection diff --git a/views/templates/scaffold/show_field.blade.php b/views/templates/scaffold/show_field.blade.php new file mode 100644 index 0000000..43a0a2d --- /dev/null +++ b/views/templates/scaffold/show_field.blade.php @@ -0,0 +1,9 @@ + +
+@if($config->options->localized) + @{!! Form::label('{{ $fieldName }}', __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}').':') !!} +@else + @{!! Form::label('{{ $fieldName }}', '{{ $fieldTitle }}:') !!} +@endif +

@{{ ${!! $config->modelNames->camel !!}->{!! $fieldName !!} }}

+
\ No newline at end of file diff --git a/views/templates/scaffold/table/blade/body.blade.php b/views/templates/scaffold/table/blade/body.blade.php new file mode 100644 index 0000000..e3967a3 --- /dev/null +++ b/views/templates/scaffold/table/blade/body.blade.php @@ -0,0 +1,44 @@ +
+
+ + + + {!! $fieldHeaders !!} +@if($config->options->localized) + +@else + +@endif + + + + @@foreach(${{ $config->modelNames->camelPlural }} as ${{ $config->modelNames->camel }}) + + {!! $fieldBody !!} + + + @@endforeach + +
@lang('crud.action')Action
+ @{!! Form::open(['route' => ['{{ $config->prefixes->getRoutePrefixWith('.') }}{{ $config->modelNames->camelPlural }}.destroy', ${{ $config->modelNames->camel }}->{{ $config->primaryName }}], 'method' => 'delete']) !!} +
+ + + + + + + @{!! Form::button('', ['type' => 'submit', 'class' => 'btn btn-danger btn-xs', 'onclick' => "return confirm('Are you sure?')"]) !!} +
+ @{!! Form::close() !!} +
+
+ + +
diff --git a/views/templates/scaffold/table/blade/cell.blade.php b/views/templates/scaffold/table/blade/cell.blade.php new file mode 100644 index 0000000..fa8b1e9 --- /dev/null +++ b/views/templates/scaffold/table/blade/cell.blade.php @@ -0,0 +1 @@ +@{{ ${!! $modelVariable !!}->{!! $fieldName !!} }} \ No newline at end of file diff --git a/views/templates/scaffold/table/blade/header.blade.php b/views/templates/scaffold/table/blade/header.blade.php new file mode 100644 index 0000000..726343f --- /dev/null +++ b/views/templates/scaffold/table/blade/header.blade.php @@ -0,0 +1 @@ +{!! $fieldTitle !!} \ No newline at end of file diff --git a/views/templates/scaffold/table/datatable/actions.blade.php b/views/templates/scaffold/table/datatable/actions.blade.php new file mode 100644 index 0000000..2d72232 --- /dev/null +++ b/views/templates/scaffold/table/datatable/actions.blade.php @@ -0,0 +1,20 @@ +@{!! Form::open(['route' => ['{!! $config->prefixes->getRoutePrefixWith('.') !!}{{ $config->modelNames->camelPlural }}.destroy', ${{ $config->primaryName }}], 'method' => 'delete']) !!} +
+ + + + + + + @{!! Form::button('', [ + 'type' => 'submit', + 'class' => 'btn btn-danger btn-xs', +@if($config->options->localized) + 'onclick' => "return confirm('Are you sure?')" +@else + 'onclick' => 'return confirm("'.__('crud.are_you_sure').'")' +@endif + + ]) !!} +
+@{!! Form::close() !!} diff --git a/views/templates/scaffold/table/datatable/body.blade.php b/views/templates/scaffold/table/datatable/body.blade.php new file mode 100644 index 0000000..8575f98 --- /dev/null +++ b/views/templates/scaffold/table/datatable/body.blade.php @@ -0,0 +1,12 @@ +@@push('third_party_stylesheets') + @@include('layouts.datatables_css') +@@endpush + +
+ @{!! $dataTable->table(['width' => '100%', 'class' => 'table table-striped table-bordered']) !!} +
+ +@@push('third_party_scripts') + @@include('layouts.datatables_js') + @{!! $dataTable->scripts() !!} +@@endpush diff --git a/views/templates/scaffold/table/datatable/column.blade.php b/views/templates/scaffold/table/datatable/column.blade.php new file mode 100644 index 0000000..4f46c99 --- /dev/null +++ b/views/templates/scaffold/table/datatable/column.blade.php @@ -0,0 +1,5 @@ +@if($config->options->localized) + '{{ $fieldName }}' => new Column(['title' => __('models/{{ $config->modelNames->camelPlural }}.fields.{{ $fieldName }}'), 'data' => '{{ $fieldName }}']) +@else + '{{ $fieldName }}' +@endif \ No newline at end of file diff --git a/views/templates/scaffold/table/livewire/actions.blade.php b/views/templates/scaffold/table/livewire/actions.blade.php new file mode 100644 index 0000000..0c66a35 --- /dev/null +++ b/views/templates/scaffold/table/livewire/actions.blade.php @@ -0,0 +1,12 @@ + diff --git a/views/templates/scaffold/table/livewire/body.blade.php b/views/templates/scaffold/table/livewire/body.blade.php new file mode 100644 index 0000000..ff6826a --- /dev/null +++ b/views/templates/scaffold/table/livewire/body.blade.php @@ -0,0 +1,3 @@ +
+ @@livewire('{{ $config->modelNames->dashedPlural }}-table', []) +
\ No newline at end of file diff --git a/templates/scaffold/users/create.stub b/views/templates/users/create.blade.php similarity index 100% rename from templates/scaffold/users/create.stub rename to views/templates/users/create.blade.php diff --git a/templates/scaffold/users/edit.stub b/views/templates/users/edit.blade.php similarity index 100% rename from templates/scaffold/users/edit.stub rename to views/templates/users/edit.blade.php diff --git a/templates/scaffold/users/fields.stub b/views/templates/users/fields.blade.php similarity index 100% rename from templates/scaffold/users/fields.stub rename to views/templates/users/fields.blade.php diff --git a/templates/scaffold/users/index.stub b/views/templates/users/index.blade.php similarity index 77% rename from templates/scaffold/users/index.stub rename to views/templates/users/index.blade.php index 8e94b88..d1ccda7 100644 --- a/templates/scaffold/users/index.stub +++ b/views/templates/users/index.blade.php @@ -26,6 +26,12 @@
@include('users.table') + +
diff --git a/templates/scaffold/users/menu.stub b/views/templates/users/menu.blade.php similarity index 100% rename from templates/scaffold/users/menu.stub rename to views/templates/users/menu.blade.php diff --git a/templates/scaffold/users/show.stub b/views/templates/users/show.blade.php similarity index 100% rename from templates/scaffold/users/show.stub rename to views/templates/users/show.blade.php diff --git a/templates/scaffold/users/show_fields.stub b/views/templates/users/show_fields.blade.php similarity index 100% rename from templates/scaffold/users/show_fields.stub rename to views/templates/users/show_fields.blade.php diff --git a/templates/scaffold/users/table.stub b/views/templates/users/table.blade.php similarity index 100% rename from templates/scaffold/users/table.stub rename to views/templates/users/table.blade.php