Retire semantic_form_for
Also a buttload of form cleanups...
This commit is contained in:
parent
350b1ebbbe
commit
81853d1ef9
136 changed files with 1825 additions and 1441 deletions
13
app/helpers/event_types_helper.rb
Normal file
13
app/helpers/event_types_helper.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module EventTypesHelper
|
||||
##
|
||||
# Includes functions related to event_types
|
||||
##
|
||||
##
|
||||
# ====Returns
|
||||
# * +String+ -> number of registrations / max allowed registrations
|
||||
def event_type_select_options(event_types = {})
|
||||
event_types.map { |type| ["#{type.title} - #{show_time(type.length)}", type.id] }
|
||||
end
|
||||
end
|
||||
|
|
@ -46,14 +46,6 @@ module EventsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def track_selector_input(form)
|
||||
if @program.tracks.confirmed.cfp_active.any?
|
||||
form.input :track_id, as: :select,
|
||||
collection: @program.tracks.confirmed.cfp_active.pluck(:name, :id),
|
||||
include_blank: '(Please select)'
|
||||
end
|
||||
end
|
||||
|
||||
def rating_tooltip(event, max_rating)
|
||||
"#{event.average_rating}/#{max_rating}, #{pluralize(event.voters.length, 'vote')}"
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue