En dev registry list actions

semuel edited this page Jan 25, 2012 · 10 revisions

Registry: list_actions

defines which buttons will appear on top and bottom of the list.

            label: Hide
            button: 1
            order: 100
            xhr: 1
            code:  $ActionStreams::ActionStreams::Plugin::itemset_hide_events

Possible values

Will appear on the button
If not exists and true, this option will enter to the drop-down action selection (under “plugin actions”) instead of being a button
If true, and button is not true, the action will still appear in the drop-down action selection, but above the “plugin actions” divider
The action with the smallest number will appear first
if not true, on click the page will reload. if true, the action will be done and only the list will be reloaded
if true, on click the result will be shown in a dialog box
When the button is clicked, a call to this __mode will be done. please define this method in the applications→cms→methods section
Instead of defining a CMS method, Perl code handler can be used, and MT will automagically will route it
If this is an irreversible action, or generally unwise, this string will be shown to the user warning him
cause the listing to not ask for action confirmation
in case that continue_prompt needs to be generated on the fly
Will use this name instead of the label when referring to this action in message boxes
Should this action appear?
min, max
minimum and maximum for the number of element in the list to be selected
if true, the user will be prompted to enter a value (input_label is used to set the prompt message) and whatever the user wrote will be submitted as the itemset_action_input parameter
see input

Handler return value

for non-XHR case

It is probably the best to redirect back to the listing screen

$app->forward('list', ....)

in the XHR case

the operation is success, and the filtered list will be refreashed
hash ref

same as true, but will transfer some parameters to the filtered_list method

messages will appear on the top of the screen
validated Tells the filtered list processor that we validated the fields already, no need to do it again
saved_label -
The function declares that it handled redirection by itself

See Also

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.