Expand description
Per-model admin customization bundles.
AdminModel is the admin’s equivalent of umbral_rest::ResourceConfig.
One config per registered model. Build via AdminModel::new + chainable
methods, then register with crate::AdminPlugin::register:
ⓘ
use umbral_admin::{AdminPlugin, AdminModel, Action};
AdminPlugin::default()
.register(
AdminModel::new("post")
.list_display(&["title", "author", "published_at"])
.list_filter(&["published", "author"])
.search_fields(&["title", "body"])
.ordering(&["-published_at", "title"])
.readonly_fields(&["created_at", "id"])
.actions(vec![Action::delete_selected()]),
)Structs§
- Action
- A row or bulk admin action.
- Action
Invocation - Context available to action handlers.
- Admin
Context - Backwards-compatible context type used by phase 1/2 code paths.
- Admin
Model - Per-model admin customization. Build via
Self::new+ chainable methods. - Inline
Model - Data shape for a related-model inline editor.
Enums§
- Action
Result - The result an action handler returns to the admin runtime.
- Action
Scope - Which surfaces an action appears on.
- Action
Variant - Visual variant for an action button.
- Inline
Kind - How an inline’s children are laid out on the parent change form.
- Toast
Level - Severity level for toast notifications.