[views/templates] provide a modal main template (closes #3274672)
The current NonTemplatableViewTemplate may seem to provide the desired
feature if a '__notemplate' is provided in the form, unfortunately,
it:
* wraps the view in a spurious div
* calls view.set_stream(), which has the effect of wiping any js/css
resource recorded until then by the view, leading to hard-to-track
missing resources symptoms
import ConfigParser
try:
undo_actions = config.cfgfile_parser.get('MAIN', 'undo-support', False)
except ConfigParser.NoOptionError:
pass # this conf. file was probably already migrated
else:
config.global_set_option('undo-enabled', bool(undo_actions))