zotonic/zotonic — pull request #588 by ArthurClemens (2013-07-07 13:04:29+00:00)
Title: mod_admin: flexible display of tabs in connect dialog

When wiring _action_dialog_connect.tpl, the tabs that should be visible can be set with param tabs_enabled, for instance:
tabs_enabled=["new", "find"].
By default all tabs are enabled (dependent on the context) - this means no change for existing code.

The highlighted tab can be passed with param "tab", for instance: tab="new". Otherwise the first tab in the list is highlighted.
The code does not solve the situation when the first enabled tab is not available in this context.

More work will be needed to enable embed panels, but also here this is no different than the current code.
A possible future enhancement is to iterate over tabs_enabled to modularize the code further.