index
Index section defines actions that are displayed while browsing data. This is usually Rails index action hence name index.
index:
filter: name, email, year as text_field
sort: name, active
actions: standard
actions:
1: new
2: sort
3: filter
actions:
standard: yes
1:
type: new
caption: Alternative caption
20:
type: link
url: some_url
caption: Some caption
title: Text for mouse over
html:
class: dc-link-spinner
data-confirm: Confirm dialog text.
30:
type: ajax
controller: controller_name
action: action_name
table: table_name
form_name: form_name
40:
type: menu
eval: ModulClassName.menu_for(self)
caption: Some caption
filter: list of field names separated by comma on which data can be filtered. Definition for data entry field will be picked from field definition in form section, so no additional data is required. When data entry field is not defined in form section, than data entry type can be suggested by as text_field syntax.
sort: list of field names separated by comma on which data can be sorted. Data can also be sorted by clicking on header of result browser, so this option defines additional fields, which are not defined in result_set.
Actions
There are 3 standard predefined index actions.
- new: Creates action for adding a new document.
- sort: Creates action for sorting data
- filter: creates action for filtering data
They can be simply defined as
or
standard: yes
which is same as
1: new
2: sort
3: filter
As you see, standard actions are numbered, and can be overwritten by defining complex actions further on.
How to create custom actions is described in actions sub chapter.