osem-fcy/app/views/proposals/_encouragement_text.html.haml
James Mason fa55224163 Break up the one-query-of-doom
The single query was producing a tremendously large ActiveRecord allocation.

While this isn't nearly as cool as one query, it's still a significant
reduction in SQL trips, and now has the bonus of only loading what is
actually going to be displayed.
2017-12-22 10:48:55 -08:00

24 lines
840 B
Text

%p.lead
- if @program.event_types.any?
You can submit proposals for
= "#{event_types_sentence(@conference)}."
- if @program.tracks.confirmed.cfp_active.any?
Proposals should fit in one of the
= "#{pluralize(@program.tracks.confirmed.cfp_active.count, 'track')}:"
= "#{tracks(@conference)}."
- if @program.cfp_open?
The submission period has begun
%em.notranslate
= @program.cfp.start_date.strftime('%A, %B %-d. %Y')
and closes
%em.notranslate
= @program.cfp.end_date.strftime('%A, %B %-d. %Y.')
That means you have
%b.notranslate= pluralize(@program.cfp.remaining_days, 'day')
left!
Remember
%span.notranslate
= @conference.title
will only be as good as the content you present. Submit early, submit often!
-else
The submission period is closed now.