class PresentationController < ApplicationController Presentations='public/presentations' def first_time if (pa=params[:id]) && get_textfile_list(Presentations).include?(pa) session[:presentation]=pa else session[:presentation]=nil end # session[:presentation]='skid' session[:selected_item]=0 logger.info "showing #{session[:presentation]}" what_next end def filechoices? false end def start_choices if session[:presentation] [] else txl=get_textfile_list Presentations logger.info "available presentations #{txl.join(',')}" txl end end def selected str session[:presentation]=str session[:selected_item]=0 nil end def backspace session[:presentation]=nil session[:choices]=nil what_next end def say str session[:spoken]=@spoken=str end def extras @lines=get_page(Presentations, get_presentation, get_selected_item) logger.info "lines #{@lines.join(';')}" if @lines.empty? @title=translate('pick a presentation') session[:presentation]=nil session[:choices]=nil else @title=@lines.shift end if session[:speak] say @title session[:speak]=nil end if @lines[0] && (@lines[0] =~ /(JPG|JPEG|GIF|PNG)$/i) @pic=@lines.shift end end end