Module: RailsTheme::Bootstrap::ModalHelper
- Defined in:
- app/helpers/rails_theme/bootstrap/modal_helper.rb
Instance Method Summary collapse
- #link_to_close_button ⇒ Object
- #link_to_edit_modal(url, modal_id, options = {}) ⇒ Object
- #link_to_modal(text, url, modal_id, options = {}) ⇒ Object
- #link_to_open_modal(text, url, modal_id, options = {}) ⇒ Object
- #modal_close_button ⇒ Object
Instance Method Details
#link_to_close_button ⇒ Object
43 44 45 46 47 48 49 |
# File 'app/helpers/rails_theme/bootstrap/modal_helper.rb', line 43 def = { data: { dismiss: 'modal' }, class: 'btn' } link_to t('helpers.close'), '#', end |
#link_to_edit_modal(url, modal_id, options = {}) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'app/helpers/rails_theme/bootstrap/modal_helper.rb', line 30 def link_to_edit_modal url, modal_id, = {} = { remote: true, data: { toggle: 'modal', target: modal_id, type: 'html' }, class: 'modal-open btn' }.deep_merge link_to_edit url, end |
#link_to_modal(text, url, modal_id, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/helpers/rails_theme/bootstrap/modal_helper.rb', line 4 def link_to_modal text, url, modal_id, = {} = { remote: true, data: { toggle: 'modal', target: modal_id, type: 'html' }, class: 'modal-open' }.deep_merge link_to text, url, end |
#link_to_open_modal(text, url, modal_id, options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'app/helpers/rails_theme/bootstrap/modal_helper.rb', line 17 def link_to_open_modal text, url, modal_id, = {} = { remote: true, data: { toggle: 'modal', target: modal_id, type: 'html' }, class: 'modal-open' }.deep_merge iconed_link_to text, url, end |
#modal_close_button ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'app/helpers/rails_theme/bootstrap/modal_helper.rb', line 51 def = { type: 'button', name: nil, data: { dismiss: 'modal' }, class: 'close' } 'x', end |