#2048 (disable actions via disabled_fields (was: Action chooser))

by tonis · in Developers

Résumé

Looking at the sql for #2044, you can see that for each action there is SQL commands for each of the actions for starting and stopping a session, as well as the four starrable actions.

It certainly is a pattern of having several actions for an object, only one of which you want to allow at any given state.

Im seeing two options.

Having the actions nested inside one action, which when rendered decided in a logical manner which action is required, which will allow for some short circuiting of SQL.

Merging the actions and having a logical chooser for the action's label,
Then when the action is called, the chooser works again to find which action's code needs to be executed.

Concepts sous-jacents

Commentaires