Skip to content

View action

ViewAction opens a record in read-only mode. Reach for it on table rows or toolbars when users should inspect a record without editing. Defaults: name view, label View, magnifying-glass icon, gray color.

app/orbit/resources/post_resource.py
from almasix.orbit.actions import ViewAction
from almasix.orbit.forms import TextInput, Textarea
ViewAction.make()
.modal()
.modal_heading("View post")
.form([
TextInput.make("title"),
Textarea.make("body"),
])

Orbit ViewAction (light)

Orbit ViewAction (dark)

Calling .form([...]) on ViewAction automatically sets .modal() and .disabled_form() so fields render locked.

Prefer a dedicated ViewRecord page:

app/orbit/actions/view_url.py
from almasix.orbit.actions import ViewAction
ViewAction.make().url(lambda record, **_: f"/posts/{record['id']}")

Orbit ViewAction URL (light)

Orbit ViewAction URL (dark)

Pair with an Infolist on the resource when the view page should show typed read-only entries instead of a disabled form.

app/orbit/actions/view_auth.py
from almasix.orbit.actions import ViewAction
ViewAction.make().authorize(lambda record, user, **_: can_view(user, record))

Unauthorized view actions hide by default — use .authorization_tooltip(...) if you want a disabled trigger instead.