Class: Decidim::ParticipatoryProcesses::ParticipatoryProcessPresenter
- Inherits:
-
ResourcePresenter
- Object
- ResourcePresenter
- Decidim::ParticipatoryProcesses::ParticipatoryProcessPresenter
- Includes:
- ActionView::Helpers::UrlHelper, ResourceHelper
- Defined in:
- app/presenters/decidim/participatory_processes/participatory_process_presenter.rb
Instance Method Summary collapse
- #area_name ⇒ Object
- #description(links: false, strip_tags: false, all_locales: false) ⇒ Object
- #editor_description(all_locales: false) ⇒ Object
- #editor_short_description(all_locales: false) ⇒ Object
- #hero_image_url ⇒ Object
- #process ⇒ Object
- #short_description(links: false, strip_tags: false, all_locales: false) ⇒ Object
- #title(html_escape: false, all_locales: false) ⇒ Object
Instance Method Details
#area_name ⇒ Object
13 14 15 16 17 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 13 def area_name return if process.area.blank? Decidim::AreaPresenter.new(process.area).translated_name_with_type end |
#description(links: false, strip_tags: false, all_locales: false) ⇒ Object
25 26 27 28 29 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 25 def description(links: false, strip_tags: false, all_locales: false) return unless process content_handle_locale(process.description, all_locales, links, ) end |
#editor_description(all_locales: false) ⇒ Object
31 32 33 34 35 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 31 def editor_description(all_locales: false) return unless process editor_locales(process.description, all_locales) end |
#editor_short_description(all_locales: false) ⇒ Object
43 44 45 46 47 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 43 def editor_short_description(all_locales: false) return unless process editor_locales(process.short_description, all_locales) end |
#hero_image_url ⇒ Object
9 10 11 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 9 def hero_image_url process.attached_uploader(:hero_image).url end |
#process ⇒ Object
49 50 51 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 49 def process __getobj__ end |
#short_description(links: false, strip_tags: false, all_locales: false) ⇒ Object
37 38 39 40 41 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 37 def short_description(links: false, strip_tags: false, all_locales: false) return unless process content_handle_locale(process.short_description, all_locales, links, ) end |
#title(html_escape: false, all_locales: false) ⇒ Object
19 20 21 22 23 |
# File 'app/presenters/decidim/participatory_processes/participatory_process_presenter.rb', line 19 def title(html_escape: false, all_locales: false) return unless process super(process.title, html_escape, all_locales) end |