I am starting with plugin development. much we could deduce from Plugin API reference — Indico 3.3.7 documentation and the source of indico-plugins.
At the moment much seems to work - global settings are visible under admin/plugins, the plugin can read the values (using ExamplePlugin.event_settings.get_all(event)). But I seem unable to find the dialog to adjust them per event.
Could anyone point to docs or an example plugin using event_settings?
There is no such builtin dialog since there is no particular place for it (exception: payment plugins!), you need to implement it yourself depending on what makes sense for your plugin.
Could you elaborate on what kind of plugin/settings you want to expose? Maybe I can suggest you a good place where to put them.
Thanks, I see - so I didn’t overlook anything. Is there any plugin around that did implement such dialog?
About our plugin idea - basically it should be similar feature to registration list export. it would be a csv export that could be imported in our billing system with almost no restructuring.
the changes I made would be: (1) add a few columns that are not selectable (think transaction order-id, link to registration form) in the current export, (2) format dates and numbers to a specific format, (3) export multiple forms or even events at once. But we would need some internal ids for each event to be filled per event (preferable by organizers) that need to be added to each line.
Much of it is already implemented, I just miss a convenient way for organizers to deposit their ids.
Nope all the plugins (both in indico-plugins and indico-plugins-cern) that aren’t payment plugins use event settings differently (e.g. to remember input in some form fields)…
Anyway, if you look at how most forms are shown via jsonify_form it shouldn’t be too hard to do the same for your plugin event settings form. For the logic on how to save it, check classes like RHUnlistedEvents - for an event you’d just inherit from RHManageEventBase instead and pass self.event to the methods on the YourPlugin.event_settings methods. Also, instead of calling WPSomething.render_template() you can just return jsonify_form(form) assuming you use the declarative way to open the form in a dialog - search for data-ajax-dialog in the html templates for tons of examples.