Hobo Cookbook

View Source



Renders a table with one row per field, where each row contains a <th> with the field name, and a <td> with (by default) a <view> of the field.


  • #{scope.field_name.to_s.sub('?', '').sub('.', '-')}-label
    • label
  • #{scope.field_name.to_s.sub('?', '').sub('.', '-')}-view
    • view
      • #{scope.field_name.to_s.sub('?', '').sub('.', '-')}-tag
    • input-help


  • fields: Comma separated list of field names to display. Defaults to the fields returned by the standard_fields helper. That is, all fields apart from IDs and timestamps.

  • force-all: All non-viewable fields will be skipped unless this attribute is given

  • skip: Comma separated list of fields to exclude

  • tag: The name of a tag to use inside the <td> to display the value. Defaults to view

  • no-edit: Controls the behavior of <input> tags when the user doesn’t have edit permission for a field.

    • view: render the current value using the <view> tag
    • disable: render the input as normal, but add HTML’s disabled attribute
    • skip: render nothing at all. This will omit the entire row (including the label)
    • ignore: render the input normally. That is, don’t even perform the edit check.


<field-list fields="first-name, last-name, city">
  <first-name-label:>Given Name</first-name-label:>
  <last-name-label:>Family Name</last-name-label:>

Show Source


No comments to display