[Concept Release/Request] Nova Action Buttons on Details/Index Page (Code Available) #6041
Replies: 3 comments 1 reply
-
I would be highly interested in a nova package, or even better if that would be included into nova core one day 👍 |
Beta Was this translation helpful? Give feedback.
-
https://codeberg.org/Lednerb/nova-action-button-selectors This was the best package but it broke after v4.29.x so I forked and updated my version and have sent a PR to the main.
|
Beta Was this translation helpful? Give feedback.
-
@davidhemphill I don't know if you're currently working on a Nova release, but I'd like to ask you to consider adding an option for action buttons in the interface. ![]() For our application, customers cannot be created with the normal form, since we need to create a few unrelated entities at once, like the owner user etc. So the only option I'm left with is having a custom action, which cannot be shown above the customer list. I hope you do agree that this is really awful UX for our sales employees, and I don't really understand the decision to not allow first-class primary actions here. |
Beta Was this translation helpful? Give feedback.
-
I would love to have a function where we can have a visible buttons on the details page, I saw few packages on novapackages but they are either broken, incomplete, or they just remove the dropdown list in general and swap it for buttons! So I would love to share with you guys a way of implementing it, and hopefully the nova staff might be interested in the concept, and perhaps they can expand on it, or if this is really requested I could release a novapackage to do the same thing with more features like Disabled Buttons/Smaller buttons/Larger Buttons.
You can extend this further by making the buttons standalone on the index page! and create something like:
GenerateReport::make('Report')->standalone()->buttonStyle('success')->hideFromDropDown();
Or we can extend this further by passing a function to the buttons! And you can also add more styles to the array! Again, so many beautiful possibilities, if nova staff are interested, I could make a pull request with possible implementation!
Step 1: Lets use our new method on our actions in your ResourceName method, for this example I created a "ApproveRequest" action.
Location: YOUR_APP/Nova/Resources/
Step 2: Lets modify the Action.php (To be able to create a method that can be used on the action and pass it onto the Vue)
Location: vendor/laravel/nova/src/Actions/Action.php
Step 3: Lets modify the ActionDropDown.vue
Location: vendor/laravel/resources/js/components/Dropdowns/ActionDropdown.vue
We are inserting here the div class="flex" after
<components>
areaBeta Was this translation helpful? Give feedback.
All reactions