<%pre> #include #include #include #include "exception.h" #include "livefeatures.h" #include "i18n.h" #include "setup.h" #include "timers.h" #include "tools.h" #include "epg_events.h" #include "gen_version_suffix.h" using namespace std; using namespace vdrlive; <%session scope="global"> int update_status(1); <# ---------------------------------------------------------------------- #> <%def doc_type> <# ---------------------------------------------------------------------- #> <%def stylesheets> "/> <# ---------------------------------------------------------------------- #> <%def logo> <%cpp> if (LiveSetup().GetShowLogo() || (LiveSetup().GetUseAjax() && LiveSetup().GetShowInfoBox())) {
<%cpp> } <# ---------------------------------------------------------------------- #> <%def hide_element> <%args> bool hide = true; <%cpp> if (hide) { style="visibility: hidden"<%cpp> } <# ---------------------------------------------------------------------- #> <%def progressbar> <%args> int progress = 0; string id; int duration = -1; // invalid duration as default <%cpp> string cls("__progress"); if ((duration >= 0) && ((progress < 0) || (duration == 0))) cls +="_invisible";
if (!id.empty()) { id="<$ id $>"<%cpp> } style="width: <$ progress $>px">
<# ---------------------------------------------------------------------- #> <%def ajax_action_href> <%args> string action; string tip; string param; string image; string alt; string id; <%cpp> { if (!id.empty()) { id="<$ id $>" <%cpp> } <& hide_element hide=(!id.empty()) &> href="vdr_request/<$ action $>?param=<$ param $>" <%cpp>if (!tip.empty()) { <& tooltip.hint text=(tip) &> <%cpp> } >" alt="<$ alt $>"> <%cpp> } <# ---------------------------------------------------------------------- #> <%def imdb_info_href> <%args> string title; <%cpp> if (LiveSetup().GetShowIMDb()) { " alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>> <%cpp> } <# ---------------------------------------------------------------------- #> <%def vlc_stream_channel> <%args> tChannelID channelId; <%cpp> if (LiveSetup().GetUseStreamdev() && LiveFeatures().Loaded()) { " alt="" <& tooltip.hint text=(tr("Stream this channel into browser.")) &>><%cpp> } <# ---------------------------------------------------------------------- #> <%def vlc_stream_recording> <%args> string recid; string linkText; <%cpp> { " alt="" <& tooltip.hint text=(tr("Stream this recording into browser.")) &>> <$ linkText $><%cpp> } <# ---------------------------------------------------------------------- #> <%def event_timer> <%args> string epgid; <%cpp> tChannelID channelid; tEventID eventid; EpgEvents::DecodeDomId(epgid, channelid, eventid); const cTimer* timer = LiveTimerManager().GetTimer(eventid, channelid); if (timer) { <& pageelems.edit_timer timerId=(LiveTimerManager().GetTimers().GetTimerId(*timer)) imgName=("record_timer.png") &> <%cpp> } else { " alt="" <& tooltip.hint text=(tr("Record this")) &> /> <%cpp> } <# ---------------------------------------------------------------------- #> <%def edit_timer> <%args> string timerId; string imgName = "edit.png"; " alt="" <& tooltip.hint text=(tr("Edit timer")) &> /> <# ---------------------------------------------------------------------- #> <%def ajax_js> <%cpp> if (LiveSetup().GetUseAjax()) { <%cpp> if (LiveSetup().GetShowInfoBox()) { <%cpp> } <%cpp> } <# ---------------------------------------------------------------------- #> <%def infobox>
<$ tr("retrieving status ...") $>
--:--
--:--
<& ajax_action_href action=("switch_channel") id=("infobox_prevchan") image=("one_downarrow.png") tip=(tr("previous channel")) &> <& ajax_action_href action=("switch_channel") id=("infobox_nextchan") image=("one_uparrow.png") tip=(tr("next channel")) &>
<& progressbar id=("infobox_elapsed") &>
<$ tr("No server response!") $> <$ tr("Failed to update infobox!") $>
<# ---------------------------------------------------------------------- #> <%def epg_tool_box> <%args> int detail; string epgid; string title; time_t startTime; time_t endTime; int lastCurrentChanel = int(); <%cpp> int duration = EpgEvents::Duration(startTime, endTime); int elapsed = EpgEvents::ElapsedTime(startTime, endTime); tEventID eventId = tEventID(); tChannelID channelId = tChannelID(); EpgEvents::DecodeDomId(epgid, channelId, eventId); if (detail) { // output for vertical toolbox <& pageelems.event_timer epgid=(epgid) &> <& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &> <%cpp> if (LiveFeatures().Recent() && eventId != 0) { " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>> <%cpp> } if ((duration == 0) || (elapsed >= 0)) { <& pageelems.vlc_stream_channel channelId=(channelId) &> <%cpp> } if (eventId != 0) { <& pageelems.imdb_info_href title=(title) &> <%cpp> } } else { // table output "><& pageelems.event_timer epgid=(epgid) &> "><& pageelems.ajax_action_href action="switch_channel" tip=(tr("Switch to this channel.")) param=(channelId) image="zap.png" alt="" &> "><%cpp>if (LiveFeatures().Recent() && eventId != 0) { " alt="" <& tooltip.hint text=(tr("Search for repeats.")) &>><%cpp> } else { <%cpp> } "><%cpp>if ((duration == 0) || (elapsed > 0)) { <& pageelems.vlc_stream_channel channelId=(channelId) &><%cpp> } else { <%cpp> } "> <%cpp> if (eventId != 0) { <& pageelems.imdb_info_href title=(title) &> <%cpp> } <%cpp> } <# ---------------------------------------------------------------------- #> <%def epg_tt_box> <%args> string boxId; string caption; string tools_comp; string time; string title; string short_descr; string long_descr; string archived; int elapsed = -1;
<$ (caption) $>
<& (tools_comp) id=(boxId) archived=(archived) detail=(1) title=(title) &>
<%cpp> if (!archived.empty()) { <$ (archived + " ") $><%cpp> } <$ (time) $>
<%cpp> if (elapsed >= 0) {
<& pageelems.progressbar progress=(elapsed) &>
<%cpp> }
<$ (title) $>
<$ (short_descr) $>
<%cpp> list images = EpgEvents::EpgImages(boxId); for(std::list::iterator it = images.begin(); it != images.end(); ++it ) { <%cpp> } <%cpp> reply.out() << StringEscapeAndBreak(long_descr);
<# ---------------------------------------------------------------------- #> <%def about_tt_box>
<$ tr(LIVESUMMARY) $>
<$ tr("Authors") $>
<$ tr("Project Idea") $>:
Thomas Keil (Thomas)
<$ tr("Webserver") $>:
Sascha Volkenandt (LordJaxom)
<$ tr("Project leader") $>:
Dieter Hametner (tadi)
<$ tr("Content") $>:
Christian Wieninger (winni)
<$ tr("Graphics") $>:
Michael Brückner (skiller2k1)
<$ tr("Information") $>
<$ tr("LIVE version") $>:
<$ LIVEVERSION $><$ VERSION_SUFFIX $>
<$ tr("VDR version") $>:
<$ VDRVERSION $>
<$ tr("Features") $>
EPGsearch:
<%cpp> Features< features::epgsearch >& epgsearch = LiveFeatures< features::epgsearch >(); "/> <%cpp> if ( epgsearch.Recent() ) { <$ tr("active") $>: <$ epgsearch.Version() $> <%cpp> } else { <$ tr("required") $>: <$ epgsearch.MinVersion() $> <%cpp> } (<$ tr("Homepage") $>)
Streamdev server:
<%cpp> Features< features::streamdev_server >& streamdev = LiveFeatures< features::streamdev_server >(); "/> <%cpp> if ( streamdev.Loaded() ) { <$ tr("active") $>: <$ streamdev.Version() $> <%cpp> } else { <$ tr("required") $>: <$ streamdev.MinVersion() $> <%cpp> } (<$ tr("Homepage") $>)
<$ tr("Bugs and suggestions") $>
<$ tr("If you encounter any bugs or would like to suggest new features, please use our bugtracker") $>:
http://www.vdr-developer.org/mantisbt