Module Ma::EventsHelper
In: app/helpers/ma/events_helper.rb

Methods

Public Instance methods

[Source]

    # File app/helpers/ma/events_helper.rb, line 2
 2:   def event_day_for_icon(evt)
 3:     date = evt.starts_at.to_date
 4:     
 5:     if !evt.one_day? 
 6:       # Evento de más de ún día. Si ya ha empezado se pone fecha de hoy. 
 7:       # Si no ha empezado o ya ha acabado se pone la fecha de inicio.
 8:       if (evt.starts_at.to_date > Time.now.to_date) || evt.passed?
 9:         date = evt.starts_at.to_date
10:       else
11:         date = Time.now.to_date
12:       end
13:     end
14:     
15:     date
16:   end

[Source]

    # File app/helpers/ma/events_helper.rb, line 18
18:   def icon_for_day(evt)
19:     date = event_day_for_icon(evt)
20:     content_tag(:div, content_tag(:div, I18n.localize(date, :format => :abbr_month), :class => "top")+content_tag(:p, date.day.to_s, :class => "day"), :class=>"date_icon")
21:   end

[Source]

    # File app/helpers/ma/events_helper.rb, line 23
23:   def show_day_icon?(list, evt, i)
24:     (i == 0) || !event_day_for_icon(list[i-1]).eql?(event_day_for_icon(evt)) 
25:   end

[Source]

    # File app/helpers/ma/events_helper.rb, line 27
27:   def show_journalists_notice
28:     content_tag(:div, content_tag(:span, t('events.Solo_medios_graficos'), :class => 'marked'), :class => 'journalists_notice')
29:   end

[Validate]