<%pre> #include #include #include #include "tools.h" #include "i18n.h" #include "timers.h" using namespace std; using namespace vdrlive; <# ---------------------------------------------------------------------- #> <%def doc_type> <# ---------------------------------------------------------------------- #> <%def logo>
<# ---------------------------------------------------------------------- #> <%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") &>
<# ---------------------------------------------------------------------- #> <%def infobox_start_update> <%cpp> { LiveStatusRequest('ibox.xml', 'infobox')<%cpp> } <# ---------------------------------------------------------------------- #> <%def hide_element> <%args> bool hide = true; <%cpp> if (hide) { style="visibility: hidden"<%cpp> } <# ---------------------------------------------------------------------- #> <%def progressbar> <%args> string progress = "0"; string id;
if (!id.empty()) { id="<$ id $>"<%cpp> } style="width: <$ progress $>px">
<# ---------------------------------------------------------------------- #> <%def event_timer> <%args> tChannelID channelid; tEventID eventid; <%cpp> const cTimer* timer = LiveTimerManager().GetTimer(eventid, channelid); if (timer) { /> <%cpp> } else { /> <%cpp> } <# ---------------------------------------------------------------------- #> <%def ajax_js> <# ---------------------------------------------------------------------- #> <%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="javascript:LiveSimpleAjaxRequest('<$ action $>.xml', 'param', '<$ param $>');" <%cpp>if (!tip.empty()) { <& tooltip.hint text=(tip) &> <%cpp> } ><$ alt $> <%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) $><& tooltip.close domId=(boxId) &>
<& (tools_comp) id=(boxId) archived=(archived) &>
<%cpp> if (!archived.empty()) { <$ (archived + " ") $><%cpp> } <$ (time) $>
% if (elapsed >= 0) {
<& pageelems.progressbar progress=(elapsed) &>
% }
<$ (title) $>
<$ (short_descr) $>
<%cpp> reply.out() << StringEscapeAndBreak(long_descr);