En dev registry list actions
semuel edited this page Jan 25, 2012
·
10 revisions
defines which buttons will appear on top and bottom of the list.
Example:
list_actions:
profileevent:
hide:
label: Hide
button: 1
order: 100
xhr: 1
code: $ActionStreams::ActionStreams::Plugin::itemset_hide_events
- label
- Will appear on the button
- button
- If not exists and true, this option will enter to the drop-down action selection (under “plugin actions”) instead of being a button
- core
- If true, and button is not true, the action will still appear in the drop-down action selection, but above the “plugin actions” divider
- order
- The action with the smallest number will appear first
- xhr
- if not true, on click the page will reload. if true, the action will be done and only the list will be reloaded
- dialog
- if true, on click the result will be shown in a dialog box
- mode
- When the button is clicked, a call to this __mode will be done. please define this method in the applications→cms→methods section
- code
- Instead of defining a CMS method, Perl code handler can be used, and MT will automagically will route it
- continue_prompt
- If this is an irreversible action, or generally unwise, this string will be shown to the user warning him
- no_prompt
- cause the listing to not ask for action confirmation
- continue_prompt_handler
- in case that continue_prompt needs to be generated on the fly
- js_message
- Will use this name instead of the label when referring to this action in message boxes
- condition
- Should this action appear?
- min, max
- minimum and maximum for the number of element in the list to be selected
- input
- 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
- input_label
- see input
It is probably the best to redirect back to the listing screen
$app->forward('list', ....)
- true
- 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 -
- false
- The function declares that it handled redirection by itself