show-pages

Show pages

The show page renders one record from its declared attributes. Each attribute is a detail row, using the same formatters as the index, so a value renders the same way in both places.

attribute('title');
attribute('published', :format<boolean>);
attribute('body',      :display({ .body.substr(0, 200) }));
attribute('author');     # an association

A :display block computes the row value; otherwise the value is read from the column and run through the named :format.

An attribute value is HTML-escaped by default. Declare an attribute :html to render its value as trusted markup instead, bypassing escaping and any :format (see raw markup):

attribute('preview', :html, :display({ .rendered-html }));

Action panel

A sidebar panel holds the per-record actions: Edit (links to the edit form), Delete (a destroying form with a confirmation), and any custom member actions declared for the resource. Each control is hidden when the authorization policy forbids it. See Destroy, batch, and custom actions.

Associations

When an attribute names an association, the show page renders it from the relationship rather than as a column:

  • A belongs-to (or has-one) attribute renders as a link to the associated record's admin show page, when that model is itself a registered resource. A missing association renders a dash, never a broken link.

  • A has-many (or has-and-belongs-to-many) attribute renders as a compact sub-table, each row linking into the associated resource, capped with an "and N more" line.

Association kind and target are detected through the ORM's reflection, so the link targets are resolved from the registry by model.

MVC::Keayl::Admin v0.9.0

Generated administration interface for MVC::Keayl applications

Authors

  • Greg Donald

License

Artistic-2.0

Dependencies

MVC::Keayl:auth<zef:gdonald>ORM::ActiveRecord:auth<zef:gdonald>Template::HAML:auth<zef:gdonald>

Provides

  • MVC::Keayl::Admin
  • MVC::Keayl::Admin::ActionItem
  • MVC::Keayl::Admin::Assets
  • MVC::Keayl::Admin::AssetsController
  • MVC::Keayl::Admin::Attachments
  • MVC::Keayl::Admin::Attribute
  • MVC::Keayl::Admin::Authentication
  • MVC::Keayl::Admin::Authentication::Basic
  • MVC::Keayl::Admin::Authentication::Session
  • MVC::Keayl::Admin::Authorization
  • MVC::Keayl::Admin::Authorization::Abilities
  • MVC::Keayl::Admin::Authorization::Policy
  • MVC::Keayl::Admin::Authorization::Role
  • MVC::Keayl::Admin::BatchAction
  • MVC::Keayl::Admin::Chrome
  • MVC::Keayl::Admin::Column
  • MVC::Keayl::Admin::Config
  • MVC::Keayl::Admin::Controller
  • MVC::Keayl::Admin::CustomAction
  • MVC::Keayl::Admin::DSL
  • MVC::Keayl::Admin::Dashboard
  • MVC::Keayl::Admin::DashboardController
  • MVC::Keayl::Admin::Engine
  • MVC::Keayl::Admin::ExportSpec
  • MVC::Keayl::Admin::Field
  • MVC::Keayl::Admin::Filter
  • MVC::Keayl::Admin::FilterPanel
  • MVC::Keayl::Admin::Form
  • MVC::Keayl::Admin::Formatter
  • MVC::Keayl::Admin::Generators
  • MVC::Keayl::Admin::I18n
  • MVC::Keayl::Admin::IndexView
  • MVC::Keayl::Admin::Inflection
  • MVC::Keayl::Admin::Menu
  • MVC::Keayl::Admin::MenuEntry
  • MVC::Keayl::Admin::Nested
  • MVC::Keayl::Admin::Page
  • MVC::Keayl::Admin::PageController
  • MVC::Keayl::Admin::Pages
  • MVC::Keayl::Admin::Pagination
  • MVC::Keayl::Admin::Panel
  • MVC::Keayl::Admin::Panels
  • MVC::Keayl::Admin::Paths
  • MVC::Keayl::Admin::Predicate
  • MVC::Keayl::Admin::Registry
  • MVC::Keayl::Admin::Resource
  • MVC::Keayl::Admin::ResourceController
  • MVC::Keayl::Admin::Scope
  • MVC::Keayl::Admin::Scopes
  • MVC::Keayl::Admin::Show
  • MVC::Keayl::Admin::Table
  • MVC::Keayl::Admin::TestSupport
  • MVC::Keayl::Admin::Url
  • MVC::Keayl::Admin::View

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.