Sha256: 603bfcd0e9a5e356dbfd41ec54b2ca7bc1f364b3f8eece6568dc2a5be8df90c8
Contents?: true
Size: 861 Bytes
Versions: 7
Compression:
Stored size: 861 Bytes
Contents
module TasksHelper def icon_for_task task icon = 'icon_warning.gif' alt = 'Unknwon' if task.pending? if task.reloading_config? icon = 'icon_init_queue.gif' alt = 'Reloading Config' else icon = 'icon_pending.gif' alt = 'Pending' end elsif task.init_queue? icon = 'icon_init_queue.gif' alt = 'Initialize Queue' elsif task.acquire_lock? icon = 'icon_acquire_lock.png' alt = 'Acquire Lock' elsif task.running? icon = 'icon_running.gif' alt = 'Running' elsif task.successful? icon = 'icon_successful.png' alt = 'Successful' elsif task.error? icon = 'icon_error.png' alt = 'Error!' elsif task.aborted? icon = 'icon_aborted.png' alt = 'Aborted!' end image_tag(icon, :alt => alt) end end
Version data entries
7 entries across 7 versions & 1 rubygems