Add option to generate custom actions in Admin UI
See original GitHub issueIt would be handy to add some custom actions to Admin UI. Such actions that do not require any input and they just return a message and information whether the operation was succesful or not.
For example, for posts there could be a button Archive. This would be in the Admin UI in the view that shows the selected post.
A draft:
var Post = new keystone.List('Post', {
autokey: { path: 'slug', from: 'title', unique: true },
map: { name: 'title' },
defaultSort: '-createdAt',
actions: {
'Archive': archive
}
});
var archive = function(next) {
this.state = 'archived';
this.save(function(err) {
if (!err) {
next(err, 'Post is archived');
} else {
next(err, 'Archiving failed');
}
});
}
Of course this example is not very useful, but I think that useful use cases exist.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Add Custom Action Buttons to Django Admin
Django admin interface with custom action buttons. Our custom actions are the nice looking deposit and withdraw buttons next to each account ...
Read more >Custom Admin Actions - Mastering Django Admin Book!
Django provides list_editable option to make selected fields editable in ... Let us write write a custom admin action to mark selected books...
Read more >Admin actions - Django documentation
In these cases, Django's admin lets you write and register “actions” – functions that get called with a list of objects selected on...
Read more >Adding custom action to UserModel's Admin page
Is there any possibility to create custom action in admin page for django UserModel? I want automatize adding user to group (like adding...
Read more >Custom Actions Overview - Frame.io Docs
Custom actions are a way for you to build integrations directly into Frame.io as programmable UI components. · Setup your Custom Action ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1
Yes, this would be great! I have also several use-cases where I could need such a custom button/action in the Admin UI.
This is definitely a feature that is on the roadmap, but when we include it we want to make the entire admin interface extensible at once, instead of just having a few more buttons. We have big plans for this, but aren’t ready to fully commit just yet due to #2566 amongst other things.
I’ll close this issue for now and move it to ProductPains, let us know if you want this by upvoting it there: https://productpains.com/post/keystonejs/cannot-find-ways-to-add-a-custom-button-or-links-in-admin-ui