Module: MailyHerald::Webui::DispatchesHelper

Defined in:
app/helpers/maily_herald/webui/dispatches_helper.rb

Instance Method Summary collapse

Instance Method Details

#display_dispatch_state(s) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/helpers/maily_herald/webui/dispatches_helper.rb', line 4

def display_dispatch_state s
  (:span) do 
    case s.state
    when :enabled
      boolean_icon true, style: :toggle, text: :enabled
    when :disabled
      boolean_icon false, style: :toggle, text: :enabled
    when :archived
      icon("archive", tw("commons.archived"))
    end
  end
end