<%pre>
#include <string>
#include <vdr/epg.h>
#include "tools.h"

using namespace std;
using namespace vdrlive;

</%pre>

<# ---------------------------------------------------------------------- #>

<%def doc_type>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
</%def>

<# ---------------------------------------------------------------------- #>

<%def logo>
<img src="logo.png" alt="VDR Live!" class="logo"/>
</%def>

<# ---------------------------------------------------------------------- #>

<%def event_timer>
<%args>
	tChannelID channelid;
	tEventID eventid;
</%args>
	<a href="edit_timer.html?channelid=<$ channelid $>&eventid=<$ eventid $>"><img src="record.png" alt="" <& tooltip.hint text=(tr("Record this")) &> /></a>
</%def>

<# ---------------------------------------------------------------------- #>

<%def ajax_js>
	<script type="text/javascript" language="javascript" src="ajax.js"></script>
</%def>

<# ---------------------------------------------------------------------- #>

<%def ajax_action_href>
<%args>
	string action;
	string tip;
	string param;
	string image;
	string alt = "";
</%args>
	<a href="javascript:LiveSimpleAjaxRequest('<$ action $>.xml', 'param', '<$ param $>');" <%cpp>if (!tip.empty()) { </%cpp><& tooltip.hint text=(tip) &> <%cpp> } </%cpp>><img src="<$ image $>" alt="<$ alt $>" /></a>
</%def>

<# ---------------------------------------------------------------------- #>

<%def epg_tt_box>
<%args>
	string boxId;
	string caption;
	string tools_comp;
	string time;
	string title;
	string short_descr;
	string long_descr;
</%args>
	<div class="epg_description" id="<$ (boxId) $>">
		<div class="station">
			<div class="boxheader"><div><div><$ (caption) $><& tooltip.close domId=(boxId) &></div></div></div>
		</div>
		<div class="epg_content">
			<div class="epg_tools">
		 		<& (tools_comp) id=(boxId) &>
			</div>
		 	<div>
				<div class="info"><$ (time) $></div>
		 		<div class="title"><$ (title) $></div>
				<div class="short"><$ (short_descr) $></div>
				<div class="description">
					<{ reply.out() << StringEscapeAndBreak(long_descr); }>
				</div>
			</div>
		</div>
	</div>
</%def>