Module: Decidim
- Defined in:
- app/models/decidim/templates/template.rb,
lib/decidim/templates.rb,
lib/decidim/templates/menu.rb,
lib/decidim/templates/admin.rb,
lib/decidim/templates/engine.rb,
lib/decidim/templates/version.rb,
lib/decidim/templates/admin_engine.rb,
app/forms/decidim/templates/admin/template_form.rb,
app/models/decidim/templates/application_record.rb,
app/helpers/decidim/templates/application_helper.rb,
app/models/concerns/decidim/templates/templatable.rb,
app/commands/decidim/templates/admin/copy_template.rb,
app/permissions/decidim/templates/admin/permissions.rb,
app/commands/decidim/templates/admin/create_template.rb,
app/commands/decidim/templates/admin/update_template.rb,
app/commands/decidim/templates/admin/destroy_template.rb,
app/helpers/decidim/templates/admin/application_helper.rb,
app/controllers/decidim/templates/application_controller.rb,
app/commands/decidim/templates/admin/questionnaire_copier.rb,
app/controllers/decidim/templates/admin/concerns/templatable.rb,
app/presenters/decidim/templates/admin_log/template_presenter.rb,
app/controllers/decidim/templates/admin/application_controller.rb,
app/commands/decidim/templates/admin/create_block_user_template.rb,
app/forms/decidim/templates/admin/proposal_answer_template_form.rb,
app/commands/decidim/templates/admin/copy_questionnaire_template.rb,
app/commands/decidim/templates/admin/apply_questionnaire_template.rb,
app/commands/decidim/templates/admin/copy_proposal_answer_template.rb,
app/commands/decidim/templates/admin/create_questionnaire_template.rb,
app/commands/decidim/templates/admin/destroy_questionnaire_template.rb,
app/commands/decidim/templates/admin/create_proposal_answer_template.rb,
app/commands/decidim/templates/admin/update_proposal_answer_template.rb,
app/controllers/decidim/templates/admin/block_user_templates_controller.rb,
app/controllers/decidim/templates/admin/questionnaire_templates_controller.rb,
app/controllers/decidim/templates/admin/proposal_answer_templates_controller.rb,
app/controllers/decidim/templates/admin/questionnaire_templates/questionnaires_controller.rb
Overview
Templates can be defined from the admin panel to store and use objects with given values and use them to create new ones using these values as default
The model class we want to create these templates from must include the Templatable concern. A controller should be created to manage templates for the model, as well as the routes for the controller actions. The command classes to use in these actions should also be created to define the particular data management for the model’s templates.
Defined Under Namespace
Modules: Templates