adl.to-selmer-templates
Application Description Language - generate Selmer templates for the HTML pages implied by an ADL file.
application-to-template
(application-to-template application)
FIXME: write docs
back-link
(back-link content url)
Generate a retrograde primary navigation link with this `content` to this `url`, indicating a backward move through the appliication.
big-link
(big-link content url)
Generate a primary navigation link with this `content` to this `url`. TODO: should be renamed. `primary-link` would be better.
compose-form-auxlist
(compose-form-auxlist auxlist form entity application)
Compose an auxiliary list from this `auxlist` specification of dependent records (i.e. the far side of a one-to-many link) of the record of this `entity` within this `application` being edited in this `form`
compose-form-auxlists
(compose-form-auxlists form entity application)
Generate all auxiliary lists required for this `form` of this `entity` within this `application`.
compose-form-content
(compose-form-content form entity application)
Compose the content for this `form` of this `entity` within this `application`.
compose-form-extra-head
(compose-form-extra-head form entity application)
Compose any extra-head declarations (i.e. special Javascript tags) required for this `form` of this `entity` within this `application`.
compose-form-extra-tail
(compose-form-extra-tail form entity application)
Compose any extra-tail declarations (i.e. special Javascript tags) required for this `form` of this `entity` within this `application`.
compose-if-member-of-tag
(compose-if-member-of-tag privilege & elts)
Generate an appropriate `ifmemberof` tag (see `adl-support.tags`) given this `privilege` for the ADL elements listed in `elts`, which may be fields, properties, list, forms, pages or entities.
compose-input-widget-para
(compose-input-widget-para property form entity application widget-name)
Generate an input widget for this `field-or-property` of this `form` for this `entity` taken from within this `application`, in context of a para also containing its label.
compose-list-search-widget
(compose-list-search-widget field entity)
Compose a list search widget for this `field` referencing a property within this `entity`.
compose-readable-or-not-authorised
(compose-readable-or-not-authorised p f e a w)
Compose content to emit if the user is not authorised to write, or not authorised to read, property `p` in form, list or page `f` of entity `e` within application `a`, while generating a widget with id `w`.
compose-widget-para
(compose-widget-para p f e a w content)
Compose a widget paragraph for property `p` in form, list or page `f` of entity `e` within application `a`, with id `w` and this `content`.
csrf-widget
(csrf-widget)
For the present, just return the standard cross site scripting protection field statement
delete-widget
(delete-widget form entity application)
Return an appropriate 'save' widget for this `form` operating on this `entity` taken from this `application`.
edit-link
(edit-link source entity application parameters)
FIXME: write docs
embed-script-fragment
(embed-script-fragment resource-path substitutions)
(embed-script-fragment resource-path)
Return the content of the file at `resource-path`, with these `substitutions` made into it in order. Substitutions should be pairs [`pattern` `value`], where `pattern` is a string, a char, or a regular expression.
emit-content
(emit-content content)
(emit-content filename application k)
(emit-content filename spec entity application k)
FIXME: write docs
emit-entity-dd
(emit-entity-dd entity application)
FIXME: write docs
emit-entity-dt
(emit-entity-dt entity application)
FIXME: write docs
entity-to-templates
(entity-to-templates entity application)
Generate one or more templates for editing instances of this `entity` in this `application`
file-header
(file-header filename application)
(file-header filename spec entity application)
Generate a header for a template file with this `filename` for this `spec` of this `entity` within this `application`.
form-to-template
(form-to-template form entity application)
Generate a template as specified by this `form` element for this `entity`, taken from this `application`. If `form` is nill, generate a default form template for the entity.
get-options
(get-options property form entity application)
Produce template code to get options for this `property` of this `entity` taken from this `application`.
get-size-for-widget
(get-size-for-widget property)
Return, as an integer, the fieldwidth for the input widget for this `property`.
list-tbody
(list-tbody source list-spec entity application)
Return a table body element for the list view for this `list-spec` of this `entity` within this `application`, using data from this `source`.
list-to-template
(list-to-template list-spec entity application)
Generate a template as specified by this `list` element for this `entity`, taken from this `application`. If `list` is nill, generate a default list template for the entity.
page-to-template
(page-to-template page entity application)
Generate a template as specified by this `page` element for this `entity`, taken from this `application`. If `page` is nil, generate a default page template for the entity. TODO: not yet written.
save-widget
(save-widget form entity application)
Return an appropriate 'save' widget for this `form` operating on this `entity` taken from this `application`. TODO: should be suppressed unless a member of a group which can insert or edit.
select-field-name
(select-field-name entity)
FIXME: write docs
select-property
(select-property entity)
Return the property on which we will by default do a user search on this `entity`.
select-widget
(select-widget property form entity application)
Generate an HTML `SELECT` widget for this `property` of this `entity` within this `application`, to be used in this `form`. TODO: Many selectable things are potentially too numerous to be simply represented in a simple static SELECT, it needs some asynchronous fetching. See [issue 47](https://github.com/simon-brooke/youyesyet/issues/47).
to-selmer-templates
(to-selmer-templates application)
Generate all [Selmer](https://github.com/yogthos/Selmer) templates implied by this ADL `application` spec.
widget
(widget field-or-property form entity application)
Generate a widget for this `field-or-property` of this `form` for this `entity` taken from within this `application`, in context of a para also containing its label.
widget-type
(widget-type property application)
(widget-type property application typedef)
Return an appropriate HTML5 input type for this property.
wrap-in-if-member-of
(wrap-in-if-member-of content privilege & context)
Wrap this `content` in an if-member-of tag; if `writeable?` is true, allow those groups by whom it is writeable, else those by whom it is readable. `context` should be a sequence of adl elements from which permissions may be obtained.
write-template-file
(write-template-file filename template application)
Write a template file with this `filename` from this `template` in the context of this `application`.