Actions
Feature #14588
closedImprove extending template helpers from plugin
Description
Currently we have two helpers available for plugin to extend allowed helpers in template rendering. Unfortunately an extra effort is required for template previewing, the concern has to be included in TemplatesController and all its children. The plugin API should do this, ideally something like
extend_template_helpers MyPlugin::Helpers
which would do following
::Foreman::Renderer.send :include, MyPlugin::Helpers
(TemplatesController.descendants + [TemplatesController]).each do |klass|
klass.send(:include, MyPlugin::Helpers)
end
it could also call allowed_template_helpers with all public methods found in MyPlugin::Helpers.
Updated by Marek Hulán over 8 years ago
- Related to Bug #14587: Previewing templates which contains subscription_manager_configuration_url helper does not work added
Updated by The Foreman Bot over 8 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3417 added
Updated by Lukas Zapletal over 8 years ago
- Related to Bug #11403: Allowed vars and helpers are global constants added
Updated by Lukas Zapletal over 8 years ago
- Related to Feature #14595: Use the template plugin API to define helpers and attributes added
Updated by Marek Hulán over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 32f3b017df7235cf68b2c590c0508ed31476ef9d.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release set to 136
Updated by Dominic Cleal over 8 years ago
- Blocks Bug #14969: Custom status is not reloaded correctly added
Updated by Marek Hulán about 8 years ago
- Related to Feature #16754: Use 1.12 plugin mechanism for registering templates helpers added
Updated by Lukas Zapletal over 7 years ago
- Related to Bug #19735: Plugin API for extending template helpers does not work added
Actions