Module: Decidim::RedesignHelper
- Included in:
- Conferences::RegistrationTypeCell, RedesignedCardCell, UploadModalCell
- Defined in:
- decidim-core/app/helpers/decidim/redesign_helper.rb
Overview
Module to add some redesign shared helper methods.
Instance Method Summary collapse
- #data_modal_open_key ⇒ Object
- #data_modal_remote_key ⇒ Object
-
#modal_open_key ⇒ Object
REDESIGN_PENDING: When redesign enabled for all the controllers this method will be unnecessary and the dialog-open key should be used directly instead of calling this.
- #modal_remote_key ⇒ Object
- #redesigned_cell_name(name) ⇒ Object
Instance Method Details
#data_modal_open_key ⇒ Object
25 26 27 |
# File 'decidim-core/app/helpers/decidim/redesign_helper.rb', line 25 def data_modal_open_key "data-#{modal_open_key}" end |
#data_modal_remote_key ⇒ Object
29 30 31 |
# File 'decidim-core/app/helpers/decidim/redesign_helper.rb', line 29 def data_modal_remote_key "data-#{modal_remote_key}" end |
#modal_open_key ⇒ Object
REDESIGN_PENDING: When redesign enabled for all the controllers this method will be unnecessary and the dialog-open key should be used directly instead of calling this
17 18 19 |
# File 'decidim-core/app/helpers/decidim/redesign_helper.rb', line 17 def modal_open_key redesign_enabled? ? "dialog-open" : "open" end |
#modal_remote_key ⇒ Object
21 22 23 |
# File 'decidim-core/app/helpers/decidim/redesign_helper.rb', line 21 def modal_remote_key redesign_enabled? ? "dialog-remote-url" : "open-url" end |
#redesigned_cell_name(name) ⇒ Object
6 7 8 9 10 11 12 |
# File 'decidim-core/app/helpers/decidim/redesign_helper.rb', line 6 def redesigned_cell_name(name) redesigned_name = redesigned_layout(name) return name unless Object.const_defined?("#{redesigned_name}_cell".camelize) redesigned_name end |