Refactoring event states
This commit is contained in:
parent
a95a03c7e5
commit
e5b588df81
12 changed files with 148 additions and 87 deletions
|
|
@ -18,20 +18,18 @@ module ApplicationHelper
|
|||
def label_for(event_state)
|
||||
result = ''
|
||||
case event_state
|
||||
when 'Withdrawn'
|
||||
result = 'label label-danger'
|
||||
when 'Review Pending'
|
||||
when 'new'
|
||||
result = 'label label-primary'
|
||||
when 'Accepted (confirmation pending)'
|
||||
when 'withdrawn'
|
||||
result = 'label label-danger'
|
||||
when 'unconfirmed'
|
||||
result = 'label label-success'
|
||||
when 'Confirmed'
|
||||
when 'confirmed'
|
||||
result = 'label label-success'
|
||||
when 'Rejected'
|
||||
when 'rejected'
|
||||
result = 'label label-warning'
|
||||
when 'Cancelled'
|
||||
when 'canceled'
|
||||
result = 'label label-danger'
|
||||
when 'Submitted'
|
||||
result = 'label label-primary'
|
||||
end
|
||||
result
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue