Class: Decidim::Exporters::FormPDF
- Inherits:
-
PDF
- Object
- Decidim::Exporters::FormPDF
- Defined in:
- lib/decidim/exporters/form_pdf.rb
Overview
Inherits from abstract PDF exporter. This class is used to set the parameters used to create a PDF when exporting Survey Answers.
Instance Method Summary collapse
-
#controller ⇒ Object
i18n-tasks-use t(‘decidim.admin.exports.formats.FormPDF’).
- #layout ⇒ Object
- #locals ⇒ Object
- #template ⇒ Object
Instance Method Details
#controller ⇒ Object
i18n-tasks-use t(‘decidim.admin.exports.formats.FormPDF’)
13 14 15 |
# File 'lib/decidim/exporters/form_pdf.rb', line 13 def controller @controller ||= FormPDFControllerHelper.new end |
#layout ⇒ Object
21 22 23 |
# File 'lib/decidim/exporters/form_pdf.rb', line 21 def layout "decidim/forms/admin/questionnaires/questionnaire_answers" end |
#locals ⇒ Object
25 26 27 28 29 30 |
# File 'lib/decidim/exporters/form_pdf.rb', line 25 def locals { questionnaire: collection.first.first.questionnaire, collection: collection.map { |answer| Decidim::Forms::Admin::QuestionnaireParticipantPresenter.new(participant: answer.first) } } end |
#template ⇒ Object
17 18 19 |
# File 'lib/decidim/exporters/form_pdf.rb', line 17 def template "decidim/forms/admin/questionnaires/answers/export/pdf" end |