You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Added a new built-in `RedirectRowAction`, that is now used to render the pre-configured `ShowRowAction`
* Added an optional second argument `bool $openInNewWindow = false` to the `ShowRowAction`
* Added a new pre-configured `AddHeadAction`, that is using the built-in `RedirectHeadAction`
* Added a new `Add` translation for it that you'll have to add to [your own translations](/README.md#translations)
* Added a new `config('laravel-table.icon.add')` config for it with the `<i class="fa-solid fa-circle-plus fa-fw"></i>` default value that you'll also have to add to [your published configuration file](/README.md#configuration)
* Added a new built-in `RedirectRowAction`, that is now used to render the pre-configured `ShowRowAction`
10
+
* Added an optional second argument `bool $openInNewWindow = false` to the `ShowRowAction`
11
+
* Added a new pre-configured `AddHeadAction`, that is using the built-in `RedirectHeadAction`
12
+
* Added a new `Add` translation for it that you'll have to add to [your own translations](/README.md#translations)
13
+
* Added a new `config('laravel-table.icon.add')` config for it with the `<i class="fa-solid fa-circle-plus fa-fw"></i>` default value that you'll also have to add to [your published configuration file](/README.md#configuration)
* Added ability to chain a `->when(bool $condition)` method to an instantiated head action, in order to enable it conditionally
21
-
* Added a new built-in `RedirectHeadAction`, that will be used by the pre-configured `CreateHeadAction`
22
-
* Added an optional `bool $openInNewWindow = false` to the `CreateHeadAction`
33
+
* Added a new built-in `RedirectHeadAction`, that is now used to render the pre-configured `CreateHeadAction`
34
+
* Added an optional second argument `bool $openInNewWindow = false` to the `CreateHeadAction`
23
35
* Added a new [JavaScript snippet](/README.md#set-up-a-few-lines-of-javascript) to handle head action link opening in tab: you'll have to add it if you want to benefit from this new ability
* Redirects to the model create page from a click on a `Create` button
479
+
* Redirects to the given URL from a click on the button
479
480
*`CreateHeadAction`:
480
481
* Requires `string $createUrl` and `bool $openInNewWindow = false` arguments on instantiation
481
-
* Instantiate a pre-configured `RedirectHeadAction` with the given `$createUrl` as URL, `__('Create')` as label and `config('laravel-table.icon.create')` as icon
482
+
* Instantiate a pre-configured `RedirectHeadAction` with `$createUrl` as URL, `__('Create')` as label and `config('laravel-table.icon.create')` as icon
482
483
483
484
To use one of them, you'll have to pass an instance of it to the `headAction` method.
484
485
@@ -491,7 +492,7 @@ namespace App\Tables;
491
492
492
493
use App\Models\User;
493
494
use Okipa\LaravelTable\Table;
494
-
use Okipa\LaravelTable\HeadActions\CreateHeadAction;
495
+
use Okipa\LaravelTable\HeadActions\AddHeadAction;
495
496
use Okipa\LaravelTable\Abstracts\AbstractTableConfiguration;
496
497
497
498
class UsersTable extends AbstractTableConfiguration
@@ -501,7 +502,7 @@ class UsersTable extends AbstractTableConfiguration
501
502
return Table::make()
502
503
->model(User::class)
503
504
// Create head action will not be available when authenticated user is not allowed to create users
@@ -638,9 +639,12 @@ If no row action is declared on your table, the dedicated `Actions` column at th
638
639
**Important note:**[you'll have to set up a few lines of javascript](#set-up-a-few-lines-of-javascript) to allow row actions confirmation requests and feedback to be working properly.
639
640
640
641
This package provides the built-in following row actions:
0 commit comments