diff --git a/app/Http/Controllers/Admin/IconCrudController.php b/app/Http/Controllers/Admin/IconCrudController.php index c9b5da12f..9bc4dca65 100644 --- a/app/Http/Controllers/Admin/IconCrudController.php +++ b/app/Http/Controllers/Admin/IconCrudController.php @@ -39,6 +39,9 @@ protected function setupListOperation() $this->crud->addClause('where', 'created_at', '<=', $value['to']); } }); + + $this->crud->removeButton('update'); + $this->crud->addButton('line', 'inline_edit_icon', 'view', 'crud::buttons.inline_edit_icon', 'beginning'); } protected function setupCreateOperation() diff --git a/resources/views/admin/new-in-v7.blade.php b/resources/views/admin/new-in-v7.blade.php index b92bd3617..065dfefab 100644 --- a/resources/views/admin/new-in-v7.blade.php +++ b/resources/views/admin/new-in-v7.blade.php @@ -1,10 +1,31 @@ @extends(backpack_view('blank')) +@php + // Add the form widget to the 'after_content' section of the widgets array + $widgets['after_content'][] = [ + 'type' => 'div', + 'class' => 'row', + 'content' => [ // widgets + [ + 'type' => 'form', + 'wrapper' => [ + 'class' => 'col-md-12 mt-3', + ], + 'controller' => '\App\Http\Controllers\Admin\PetShop\SkillCrudController', + 'content' => [ + 'header' => 'Create Skill', // optional + 'body' => 'This form should make it easy to create a new skill.

', // optional + ], + ] + ] + ]; +@endphp + @section('content')
-
+
Components

Datagrid

Show the most important info about an Eloquent entry, anywhere you want.

@@ -56,4 +77,22 @@ @include('admin.partials.datatable-examples') + +
+
+
Components
+

Dataform

+

Show a form for an Eloquent entry, anywhere you want.

+
+
+
+ + See docs + +
+
+
+ +@include('admin.partials.dataform-examples') + @endsection diff --git a/resources/views/admin/partials/dataform-examples.blade.php b/resources/views/admin/partials/dataform-examples.blade.php new file mode 100644 index 000000000..06855b231 --- /dev/null +++ b/resources/views/admin/partials/dataform-examples.blade.php @@ -0,0 +1,92 @@ +
+
+
+
+

+ Create Invoice + + +

+ +
+
+ + + +
+
+
+
+ +
+
+
+
+

+ Quick Add Tag +

+
+
+ + + +
+
+
+ +
+
+
+

+ Other Quick Actions +

+
+ +
+ + + + + + + + +
+
+ + @include('backpack.theme-tabler::inc.commercial') +
+
diff --git a/resources/views/vendor/backpack/crud/buttons/inline_edit_icon.blade.php b/resources/views/vendor/backpack/crud/buttons/inline_edit_icon.blade.php new file mode 100644 index 000000000..04c0744c8 --- /dev/null +++ b/resources/views/vendor/backpack/crud/buttons/inline_edit_icon.blade.php @@ -0,0 +1,14 @@ + + {{ trans('backpack::crud.edit') }} + + + diff --git a/resources/views/vendor/backpack/theme-tabler/dashboard.blade.php b/resources/views/vendor/backpack/theme-tabler/dashboard.blade.php index f11aa5c38..fa8310337 100644 --- a/resources/views/vendor/backpack/theme-tabler/dashboard.blade.php +++ b/resources/views/vendor/backpack/theme-tabler/dashboard.blade.php @@ -35,7 +35,7 @@ // notice we use Widget::make() to add widgets as content (not in a group) Widget::make() ->type('progress') - ->class('card mb-3') + ->class('card mb-1') ->statusBorder('start') // start|top|bottom ->accentColor('success') // primary|secondary|warning|danger|info ->ribbon(['top', 'la-user']) // ['top|right|bottom'] @@ -48,7 +48,7 @@ // but we need to use onlyHere() or remove() at the end Widget::add() ->type('progress') - ->class('card mb-3') + ->class('card mb-1') ->statusBorder('start') // start|top|bottom ->accentColor('danger') // primary|secondary|warning|danger|info ->ribbon(['top', 'la-bell']) // ['top|right|bottom'] @@ -63,7 +63,7 @@ Widget::make() ->group('hidden') ->type('progress') - ->class('card mb-3') + ->class('card mb-1') ->statusBorder('start') // start|top|bottom ->accentColor('info') // primary|secondary|warning|danger|info ->ribbon(['top', 'la-star']) // ['top|right|bottom'] @@ -76,7 +76,7 @@ // if you prefer defining your widgets as arrays Widget::make([ 'type' => 'progress', - 'class'=> 'card mb-3', + 'class'=> 'card mb-1', 'statusBorder' => 'start', // start|top|bottom 'accentColor' => 'warning', // primary|secondary|warning|danger|info 'ribbon' => ['top', 'la-lock'], // ['top|right|left|bottom', 'la-xxx'] @@ -151,7 +151,7 @@ 'close_button' => true, // show close button or not ]; - $widgets['before_content'][] = [ + $widgets['after_content'][] = [ 'type' => 'div', 'class' => 'row', 'content' => [ // widgets @@ -263,12 +263,13 @@ 'header' => 'Line Chart - Frappe', // optional // 'body' => 'This chart should make it obvious how many new users have signed up in the past 7 days.

', // optional ] - ], + ] ] ]; @endphp @section('content') + {{-- In case widgets have been added to a 'content' group, show those widgets. --}} @include(backpack_view('inc.widgets'), [ 'widgets' => app('widgets')->where('group', 'content')->toArray() ]) @endsection diff --git a/resources/views/vendor/backpack/theme-tabler/inc/commercial.blade.php b/resources/views/vendor/backpack/theme-tabler/inc/commercial.blade.php new file mode 100644 index 000000000..a7e9b7f98 --- /dev/null +++ b/resources/views/vendor/backpack/theme-tabler/inc/commercial.blade.php @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+
Help us polish Backpack v7 public beta
+

If you find any problems, let us know in a discussion on Github.

+
+ +
+
+
+
+