module MediaHelper def status_style(s) stat = { 'Append' => 'normal', 'Purged' => 'normal', 'Recycle' => 'normal', 'Error' => 'error', 'Full' => 'okay', } content_tag('td', s, 'class' => stat[s] || 'oops') end def slot_display(in_changer, storage_id, slot_number) return "-" if in_changer == 0 return slot_number.to_s if CHANGERS <= 1 return storage_id.to_s + ":" + slot_number.to_s end end