<%pre> #include <vdr/plugin.h> #include <vdr/channels.h> #include <vdr/epg.h> #include <vdr/config.h> #include <vdr/i18n.h> #include "setup.h" #include "tools.h" #include "epg_events.h" using namespace std; using namespace vdrlive; </%pre> <%args> type = "now"; </%args> <%include>page_init.eh</%include> <{ cSchedulesLock schedulesLock; const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); string head; if (type == "now") { head = tr("What's running at")+string(" ")+FormatDateTime(tr("%I:%M %p"), time(0)); } else { type="next"; head = tr("What's on next?"); } }> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <title>VDR-Live - <$ head $></title> <link rel="stylesheet" type="text/css" href="styles.css" /> <& tooltip.javascript var=("domTT_styleClass") value=("domTTepg") &> <& pageelems.ajax_js &> </head> <body onload="LiveStatusAjaxRequest('infobox.html', 'infobox')"> <& pageelems.logo &> <& menu active=(type) &> <div class="inhalt"> <{ EpgEvents epgEvents; ReadLock channelsLock( Channels ); if (channelsLock) { int evntNr = 0; for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) { if (!Channel->GroupSep()) { const cSchedule *Schedule = Schedules->GetSchedule(Channel); if (Schedule) { const cEvent *Event = (type == "now" ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent()); if (Event) { string evntId("eventId_"); evntId += lexical_cast<std::string, int>(++evntNr); EpgEventPtr epgEvent(new EpgEvent(evntId, Event, Channel->Name())); epgEvents.push_back(epgEvent); tChannelID channel_id(Channel->GetChannelID()); tEventID event = Event->EventID(); bool truncated = false; string description(); }> <div class="event"> <div class="station"> <div><div><div><a href="schedule.html?channel=<$ Channel->Number() $>" <& tooltip.hint text=(tr("View the schedule of this channel")) &>><$ (epgEvent->Caption()) $></a></div></div></div> </div> <div class="content"> <div class="tools"> <& pageelems.event_timer channelid=(channel_id) eventid=(event) &> % if (type == "now") { <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channel_id) image="zap.png" alt="" &> % } </div> <div> <div class="info"><$ (epgEvent->StartTime(tr("%I:%M %p"))) $> - <$ (epgEvent->EndTime(tr("%I:%M %p"))) $></div> % if (epgEvent->Elapsed() >= 0) { <div class="progress"><div><& pageelems.progressbar progress=(epgEvent->Elapsed()) &></div></div> % } <div class="title"><$ (epgEvent->Title()) $></div> <div class="short"><$ (epgEvent->ShortDescr()) $></div> <div class="description"><$ (StringWordTruncate(epgEvent->LongDescr(), 150, truncated)) $></div> <div class="more"<& tooltip.hint text=(StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), 300, truncated)) + string("<br />") + string(tr("Click to view details."))) &><& tooltip.display domId=(epgEvent->Id()) &>><$ (string(tr("more")) + string(" ...")) $></div> </div> </div> </div> <{ } } } } } }> </div> <div class="epg_data" style="display: none;"> <{ // create hidden div for the tooltip hints. for (vector<EpgEventPtr>::iterator i = epgEvents.begin(); i != epgEvents.end(); ++i) { EpgEventPtr epg = *i; }> <& pageelems.epg_tt_box boxId=(epg->Id()) caption=(epg->Caption()) time=(epg->StartTime(tr("%I:%M %p")) + string(" - ") + epg->EndTime(tr("%I:%M %p"))) title=(epg->Title()) short_descr=(epg->ShortDescr()) long_descr=(epg->LongDescr()) elapsed=(epg->Elapsed()) &> <{ } }> </div> </body> </html> <%include>page_exit.eh</%include>