Module: Helpdesk::HelpdeskHelper

Defined in:
app/helpers/helpdesk/helpdesk_helper.rb

Instance Method Summary collapse

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


3
4
5
6
7
8
9
10
11
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 3

def menu_left(title,&block)
  (:fieldset) do
    (:legend ,title) +
    ( :ul, class: 'nav nav-list') do
      capture(&block)

    end
  end
end


14
15
16
17
18
# File 'app/helpers/helpdesk/helpdesk_helper.rb', line 14

def menu_li(lbl, path, *args)
  options = args.extract_options!
  (options[:class].nil? ? options.merge!(:class => "active") : options[:class] += " active" ) if url_for(path) == request.fullpath
  (:li, link_to(lbl, path), options)
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)
  (:span, class: "label #{cls}") do
    lbl
  end
end