class StreamingsController

OpenIrekia v4.0.0

Copyright 2009-2013 eFaber, S.L. Copyright 2009-2013 Ejie, S.A. Copyrigth 2009-2013 Dirección de Gobierno Abierto y Comunicación en Internet;

Gobernu Irekirako eta Interneteko Komunikaziorako Zuzendaritza; Lehendakaritza.
Gobierno Vasco – Eusko Jaurlaritza

Licencia con arreglo a la EUPL, Versión 1.1 o –en cuanto sean aprobadas por la Comisión Europea– versiones posteriores de la EUPL (la Licencia); Solo podrá usarse esta obra si se respeta la Licencia. Puede obtenerse una copia de la Licencia en: ec.europa.eu/idabc/eupl Salvo cuando lo exija la legislación aplicable o se acuerde por escrito, el programa distribuido con arreglo a la Licencia se distribuye TAL CUAL, SIN GARANTÍAS NI CONDICIONES DE NINGÚN TIPO, ni expresas ni implícitas. Véase la Licencia en el idioma concreto que rige los permisos y limitaciones que establece la Licencia

http://open.irekia.net, openirekia@efaber.net

Public Instance Methods

index() click to toggle source
# File app/controllers/streamings_controller.rb, line 26
def index
  @flows = StreamFlow.find(:all, :conditions => "announced_in_irekia = 't' OR show_in_irekia = 't'", :order => 'updated_at DESC')
end
live() click to toggle source
# File app/controllers/streamings_controller.rb, line 49
def live
  @streaming = StreamFlow.find(params[:id])
  unless @streaming.code.match(/IREKIABETA/)
    raise ActiveRecord::RecordNotFound
  end
  render :action => 'show'
end
make_breadcrumbs() click to toggle source
# File app/controllers/streamings_controller.rb, line 64
def make_breadcrumbs
  @breadcrumbs_info = []
  
  if @streaming.present?
    @breadcrumbs_info << [@streaming.title,  streaming_path(@streaming)]
  end
end
show() click to toggle source
# File app/controllers/streamings_controller.rb, line 30
def show
  @streaming = StreamFlow.find(params[:id])
  if @streaming.event 
    if  @streaming.event.published?
      redirect_to event_url(@streaming.event)
    else
      if @streaming.event.published?
         redirect_to event_url(@streaming.event)
      else
        raise ActiveRecord::RecordNotFound unless (@streaming.on_air? || @streaming.announced?)
      end
    end
  else
    if !@streaming.on_air? && !@streaming.announced?
      raise ActiveRecord::RecordNotFound
    end
  end
end
update_watchers_info() click to toggle source
# File app/controllers/streamings_controller.rb, line 57
def update_watchers_info
  @stream_flow = StreamFlow.find(params[:id])
  render :update do |page| 
    page.replace_html "sf_watchers_info", admin_show_streaming_watchers(@stream_flow)
  end    
end