Liking cljdoc? Tell your friends :D

wagoe.admin.core.ui.cells

List cells rendered by display role (ADR-040).

cell turns one value into the content of its list cell according to the field's role; cell-class is the class every cell of that role carries, so the stylesheet styles roles, never fields. What a cell needs beyond the value — a relation's title, a has-many count, the time — arrives in the overview the shell computed for the page. Pure Hiccup.

List cells rendered by display role (ADR-040).

`cell` turns one value into the content of its list cell according to the
field's role; `cell-class` is the class every cell of that role carries, so
the stylesheet styles roles, never fields. What a cell needs beyond the
value — a relation's title, a has-many count, the time — arrives in the
overview the shell computed for the page. Pure Hiccup.
raw docstring

cellclj

(cell field
      record
      {:keys [role field-config entity-config display href relation]})

The content of field's list cell for record.

ctx: :role the field's display role :field-config its config (may be nil for a has-many column) :entity-config the entity's config :display zone, locale, patterns and the :overview ({:titles :counts :links :now}) from the shell (ADR-040) :href the record's detail URL, when the user may open it :relation the column's belongs-to or has-many

Nil renders as nothing in every role but :count, which is 0.

The content of `field`'s list cell for `record`.

ctx:
  :role          the field's display role
  :field-config  its config (may be nil for a has-many column)
  :entity-config the entity's config
  :display       zone, locale, patterns and the `:overview` ({:titles :counts
                 :links :now}) from the shell (ADR-040)
  :href          the record's detail URL, when the user may open it
  :relation      the column's belongs-to or has-many

Nil renders as nothing in every role but :count, which is 0.
sourceraw docstring

cell-classclj

(cell-class role)

The class of a cell with role: c-money, c-relation, …

The class of a cell with `role`: `c-money`, `c-relation`, …
sourceraw docstring

columnsclj

(columns entity-config fields)

fields as list columns: {:field :config :role :class :label :relation :data?}. :data? is a column of the table, not a computed one: only those sort, filter and edit. The role comes with the config, or is derived now for a config built without it.

`fields` as list columns: {:field :config :role :class :label :relation :data?}.
`:data?` is a column of the table, not a computed one: only those sort,
filter and edit. The role comes with the config, or is derived now for a
config built without it.
sourceraw docstring

currencyclj

(currency field-config entity-config)

The ISO currency of a money field: its :currency, else the admin's [:ui :currency], else EUR.

The ISO currency of a money field: its `:currency`, else the admin's
`[:ui :currency]`, else EUR.
sourceraw docstring

enum-labelclj

(enum-label field-config value)

The label :options gives value, else the value humanized.

The label `:options` gives `value`, else the value humanized.
sourceraw docstring

enum-toneclj

(enum-tone field-config value)

The tone :tones gives value, else :neutral.

The tone `:tones` gives `value`, else :neutral.
sourceraw docstring

format-aggregateclj

(format-aggregate value role field-config entity-config display)

A computed aggregate shown as role shows its values.

A computed aggregate shown as `role` shows its values.
sourceraw docstring

(link-chips entity items total)

Linked records as chips, each a link to its record, then "+N" for the ones total counts beyond them.

Linked records as chips, each a link to its record, then "+N" for the
ones `total` counts beyond them.
sourceraw docstring

page-totalclj

(page-total records field)

The sum of field over records, or nil when no row has a number there.

The sum of `field` over `records`, or nil when no row has a number there.
sourceraw docstring

record-titleclj

(record-title entity-config record display)

What record is called: its :title-field rendered by the role it would have if it were not the title, so an instant reads as a date, else its id. Never a link, as a heading or breadcrumb holds it.

What `record` is called: its `:title-field` rendered by the role it would
have if it were not the title, so an instant reads as a date, else its id.
Never a link, as a heading or breadcrumb holds it.
sourceraw docstring

urgency-toneclj

(urgency-tone field-config days record)

For a date with :urgency: :danger when it has passed, :warning within :warn-days (default 7), else nil. :urgency is true or a map {:warn-days 7 :until {:status [:paid]}}; :until ends the urgency once the record holds one of those values — a paid invoice is not overdue.

For a date with `:urgency`: :danger when it has passed, :warning within
`:warn-days` (default 7), else nil. `:urgency` is true or a map
`{:warn-days 7 :until {:status [:paid]}}`; `:until` ends the urgency once
the record holds one of those values — a paid invoice is not overdue.
sourceraw docstring

value-nameclj

source

with-record-titleclj

(with-record-title {:keys [entity-config record] :as trail} display)

trail, the shell's parent trail, with its record's title rendered.

`trail`, the shell's parent trail, with its record's title rendered.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close