aces / Loris

LORIS is a web-accessible database solution for longitudinal multi-site studies.
GNU General Public License v3.0
141 stars 173 forks source link

[dataquery] Add ability for other modules to add actions #9302

Open driusan opened 2 weeks ago

driusan commented 2 weeks ago

This adds the ability for other modules to add custom actions to the "Next Steps" of the dataquery module. An example of an "Action" that might be added is a "Package Data Release" for the data_release module or a "Send to CBRAIN" for a theoretical CBRAIN module on the final view data page.

To add an action, the module's getWidgets must return an array of \LORIS\dataquery\ActionWidgets to be added when called with the type argument of dataquery:action. Each ActionWidget adds a button on a particular dataquery page which, when clicked, invokes a javascript callback that can be customized by the module.

Plugin actions provided by a module are displayed in a second row underneath the "Next Steps" .