ref: master
plugins/orders_cycle/lib/orders_cycle_plugin/cycle_helper.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
module OrdersCyclePlugin::CycleHelper protected def timeline_class cycle, status, selected klass = "" if cycle.status == status klass += " cycle-timeline-current-item" elsif cycle.passed_by? status klass += " cycle-timeline-passed-item" else klass += " cycle-timeline-next-item" end klass += " cycle-timeline-selected-item" if selected == status klass end end |