mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
rearrange helper functions
This commit is contained in:
parent
f63259f187
commit
5b1a730e19
5 changed files with 30 additions and 71 deletions
|
|
@ -10,6 +10,18 @@ module EventsHelper
|
|||
"Registered: #{event.registrations.count}"
|
||||
end
|
||||
|
||||
##
|
||||
# Checks if the voting has already started, or if it has already ended
|
||||
#
|
||||
def voting_open_or_close(program)
|
||||
return if program.voting_period?
|
||||
if program.voting_start_date > Time.current
|
||||
return 'Voting period has not started yet!'
|
||||
else # voting_end_date > Date.today because voting_start_date < voting_end_date
|
||||
return 'Voting period is over!'
|
||||
end
|
||||
end
|
||||
|
||||
def event_types(conference)
|
||||
all = conference.program.event_types.map { |et| et.title.pluralize }
|
||||
first = all[0...-1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue