Module Ma::NewsHelper
In: app/helpers/ma/news_helper.rb

Methods

Public Instance methods

[Source]

    # File app/helpers/ma/news_helper.rb, line 18
18:  def ma_next_streamig_info(events)
19:   next_streamed_events = events.select {|e| e.streaming_live? && e.streaming_for?(subsite) && e.starts_at > Time.zone.now }
20:   empty_stream_msg = t('events.no_streaming_programmed')
21:   
22:   if next_streamed_events.length > 0
23:     info = []
24:     # Sólo el primero de los próximos eventos con streaming
25:     [next_streamed_events.first].each do |n4s|
26:       info.push t('events.next_stream_at', :at => I18n.localize(n4s.starts_at, :format => :long),
27:                          :event_link => link_to(n4s.title, ma_event_path(n4s)))
28:     end
29:     empty_stream_msg = info.join("<br />")
30:   end
31:   
32:   empty_stream_msg
33:  end

def ma_body_class

  @body_class || (params[:action].eql?("home") ? 'ii_columns' : 'i_column')

end

[Source]

    # File app/helpers/ma/news_helper.rb, line 7
 7:  def ma_video_title(streaming_present, announced_streaming)
 8:    title = t('documents.streaming')
 9:    if streaming_present
10:      title = t('events.streaming_live')
11:    elsif announced_streaming
12:      title = t('events.announced_streaming')
13:    end
14:    return title
15:  end

[Validate]