Skip to main content

Module config

Module config 

Source
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.
ActionInvocation
Context available to action handlers.
AdminContext
Backwards-compatible context type used by phase 1/2 code paths.
AdminModel
Per-model admin customization. Build via Self::new + chainable methods.
InlineModel
Data shape for a related-model inline editor.

Enums§

ActionResult
The result an action handler returns to the admin runtime.
ActionScope
Which surfaces an action appears on.
ActionVariant
Visual variant for an action button.
InlineKind
How an inline’s children are laid out on the parent change form.
ToastLevel
Severity level for toast notifications.

Type Aliases§

AdminConfig