12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'app/helpers/state_machines_helper.rb', line 12
def event_status(status, condition, possition, hide_when_not_present = false, description = nil)
return if !condition && hide_when_not_present
content_tag(:li, if condition
raw(status.html_safe) + (
unless description.nil?
content_tag(:div, content_tag(:div, content_tag(:div, nil, class: 'popover-arrow') + content_tag(:div, content_tag(:p, description, class: nil), class: 'popover-content'), class: 'popover bottom'), class: 'statusdescription')
end)
else
fa_icon('check', family: :solid, aria: { hidden: true }, style: (possition ? 'display:none' : nil))
end,
class: (if condition
'currentstatus'
else
(possition ? 'aftercurrent' : 'beforecurrent')
end), title: status, data: condition ? nil : { content: description, toggle: 'popover', trigger: 'hover', placement: 'top' })
end
|