Module: NimbleshopCod::ExposedHelper
- Defined in:
- app/helpers/nimbleshop_cod/exposed_helper.rb
Instance Method Summary collapse
- #nimbleshop_cod_available_payment_options_icons ⇒ Object
- #nimbleshop_cod_crud_form ⇒ Object
- #nimbleshop_cod_icon_for_order_payment(order) ⇒ Object
- #nimbleshop_cod_next_payment_processing_action(order) ⇒ Object
- #nimbleshop_cod_payment_form(order) ⇒ Object
- #nimbleshop_cod_picture_on_admin_payment_methods ⇒ Object
- #nimbleshop_cod_small_image(options = {}) ⇒ Object
Instance Method Details
#nimbleshop_cod_available_payment_options_icons ⇒ Object
18 19 20 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 18 def return nil # do not display any payment option icon for cash on delivery end |
#nimbleshop_cod_crud_form ⇒ Object
27 28 29 30 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 27 def nimbleshop_cod_crud_form return unless NimbleshopCod::Cod.first render partial: '/nimbleshop_cod/cods/edit' end |
#nimbleshop_cod_icon_for_order_payment(order) ⇒ Object
32 33 34 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 32 def nimbleshop_cod_icon_for_order_payment(order) nimbleshop_cod_small_image( height: '13px' ) end |
#nimbleshop_cod_next_payment_processing_action(order) ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 4 def nimbleshop_cod_next_payment_processing_action(order) if order.pending? link_to 'Mark payment as received', purchase_payment_admin_order_path(order), method: :put, class: 'btn btn-success' end end |
#nimbleshop_cod_payment_form(order) ⇒ Object
22 23 24 25 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 22 def nimbleshop_cod_payment_form(order) return unless NimbleshopCod::Cod.first render partial: '/nimbleshop_cod/payments/new', locals: { order: order } end |
#nimbleshop_cod_picture_on_admin_payment_methods ⇒ Object
14 15 16 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 14 def nimbleshop_cod_picture_on_admin_payment_methods image_tag 'engines/nimbleshop_cod/cod_big.png', alt: 'cod logo' end |
#nimbleshop_cod_small_image(options = {}) ⇒ Object
10 11 12 |
# File 'app/helpers/nimbleshop_cod/exposed_helper.rb', line 10 def nimbleshop_cod_small_image( = {} ) image_tag 'engines/nimbleshop_cod/cod_small.png', {alt: 'cod icon'}.merge() end |