Module: Panmind::Zendesk::Helpers
- Defined in:
- lib/panmind/zendesk.rb
Instance Method Summary collapse
- #zendesk_dropbox_config ⇒ Object
- #zendesk_dropbox_link_to(text) ⇒ Object
- #zendesk_dropbox_tags ⇒ Object
- #zendesk_link_to(text, options = {}) ⇒ Object
Instance Method Details
#zendesk_dropbox_config ⇒ Object
61 62 63 64 65 66 67 68 |
# File 'lib/panmind/zendesk.rb', line 61 def zendesk_dropbox_config config = Zendesk.dropbox if config[:email].kind_of?(Proc) config = config.merge(:email => instance_exec(&config[:email])) end javascript_tag("var zenbox_params = #{config.to_json};").html_safe end |
#zendesk_dropbox_link_to(text) ⇒ Object
83 84 85 |
# File 'lib/panmind/zendesk.rb', line 83 def zendesk_dropbox_link_to(text) link_to text, '#', :onclick => 'Zenbox.render (); return false' end |
#zendesk_dropbox_tags ⇒ Object
70 71 72 73 74 75 76 |
# File 'lib/panmind/zendesk.rb', line 70 def return unless Zendesk.enabled? %(#{zendesk_dropbox_config} <style type='text/css'>@import url('#{Zendesk.assets_path}/#{Zendesk.assets_name}.css');</style> <script type='text/javascript' src='#{Zendesk.assets_path}/#{Zendesk.assets_name}.js'></script>).html_safe end |