Module: Helpdesk::HelpdeskHelper
- Defined in:
- app/helpers/helpdesk/helpdesk_helper.rb
Instance Method Summary collapse
- #ico(name, color = 'black') ⇒ Object
- #menu_left(title, &block) ⇒ Object
- #menu_li(lbl, path, *args) ⇒ Object
- #parent_layout(layout) ⇒ Object
- #status_label(lbl, cls) ⇒ Object
Instance Method Details
#ico(name, color = 'black') ⇒ Object
26 27 28 |
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 26 def ico(name,color='black') raw("<i class=\"icon-#{name} icon-#{color}\"></i> ") end |
#menu_left(title, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 3 def (title,&block) content_tag(:fieldset) do content_tag(:legend ,title) + content_tag( :ul, class: 'nav nav-list') do capture(&block) end end end |
#menu_li(lbl, path, *args) ⇒ Object
14 15 16 17 18 |
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 14 def (lbl, path, *args) = args. ([:class].nil? ? .merge!(:class => "active") : [:class] += " active" ) if url_for(path) == request.fullpath content_tag(:li, link_to(lbl, path), ) end |
#parent_layout(layout) ⇒ Object
30 31 32 33 |
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 30 def parent_layout(layout) @view_flow.set(:layout,output_buffer) self.output_buffer = render(:file => "layouts/#{layout}") end |
#status_label(lbl, cls) ⇒ Object
20 21 22 23 24 |
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 20 def status_label(lbl,cls) content_tag(:span, class: "label #{cls}") do lbl end end |