diff options
Diffstat (limited to 'html/schema.tmpl')
| -rw-r--r-- | html/schema.tmpl | 174 |
1 files changed, 174 insertions, 0 deletions
diff --git a/html/schema.tmpl b/html/schema.tmpl new file mode 100644 index 0000000..38ad6d6 --- /dev/null +++ b/html/schema.tmpl @@ -0,0 +1,174 @@ +<?%- +USE date; +zeitformat = gettext("%A the %D at %H:%M o'clock"); +day = date.format(param.zeitvon, zeitformat, locale); + +width = 720; # Table width +Duration = param.zeitbis - param.zeitvon; + +-%?> +<script language="javascript" type="text/javascript"> + var interval = 300 + + function reload() { + Now = new Date(); + location.href = '?cmd=schema'; + } + + inter = interval * 1000; + aktiv = window.setTimeout("reload()", inter); +</script> + +<form> +<h1><?% gettext("What is running at") %?> <?% day %?><br/> +<?% gettext('Display') %?> <?% gettext('from') %?> <?% date.format(param.zeitvon, '%H:%M', locale) %?> <?% gettext('to') %?> <?% date.format(param.zeitbis, '%H:%M', locale) %?> <?% gettext("o'clock") %?> +</h1> + +<!-- TableTemplate --> +<select name='cgroups' onChange="di(this.form.cgroups.options[this.form.cgroups.options.selectedIndex].value, '?cmd=schema&data=<?% param.zeitvon %?>&__cgrp=')"> +<?% FOREACH cgrp = param.cgroups %?> + <option value='<?% cgrp.last %?>' <?% "selected" IF param.channelgroup == cgrp.last %?>><?% cgrp.first %?> +<?% END %?> +</select> + +<table width='<?% (width + 100) %?>' cellpadding="0" cellspacing="0"> +<tr> + <td><img alt="" src='images/blank.png' width=100 height=1 border=0 /></td> + <?% c = 0; colspan = 0; abstand = 15 * 60; # 15 Minuten %?> + <?%- WHILE c < Duration -%?> + <?%- + c = c + abstand; + percent = (abstand / Duration) * width + colspan = colspan + 1; + zeit = param.zeitvon + c; + -%?> + <td bgcolor="white" width="<?% offset = (c % 3600 ? 1 : 2);(percent - offset) | format('%d') %?>" align='right'> + <?% IF c == abstand && zeit > date.now %?> + <a href='?cmd=schema&data=<?% (param.zeitvon - Duration) %?>&__cgrp=<?% param.channelgroup %?>'><</a> + <?% END %?> + <font size='1'><?% date.format(zeit, '%H:%M', locale) %?> + <?% IF c >= Duration %?> + <a href='?cmd=schema&data=<?% (param.zeitvon + Duration) %?>&__cgrp=<?% param.channelgroup %?>'>></a> + <?% END %?> + </font></td> + <?% END %?> +</tr> + +<tr> + <?% c = 0 %?> + <?% abstand = abstand div 3 %?> + <td> </td> + <td bgcolor="white" colspan="<?% colspan %?>" style="white-space: nowrap"> + <?%- IF date.now > param.zeitvon && date.now < param.zeitbis -%?> + <?% a = date.now - param.zeitvon; + p = (a / Duration) * width; + %?> + <div style="position:absolute; z-index:1"> + <div style="position:relative; top:0px; left:0px; width:<?% p | format('%d') %?>px; height:10px; z-index:2; border:thin solid #804000; background-color:#FF0000; text-align: right; -moz-opacity:0.2; filter:Alpha(opacity=20)"><font size="1"> </font></div> + </div> + <div style="position:absolute; z-index:1"> + <div style="position:relative; top:0px; left:<?% p | format('%d') %?>px; width:1px; height:100%; border-left:1px solid red; margin:0px; z-Index: 2;"><img alt="" src='images/blank.png' width='1' height='<?% data.keys.size * 23 %?>' border="0" hspace="0" vspace="0" /></div> + </div> + <?%- END -%?> + <?%- WHILE c < Duration; + c = c + abstand; + percent = (abstand / Duration) * width + -%?><img alt="" style="background:white" src='images/blank.png' width="<?%- + offset = (c % 3600 ? 1 : 2); + (percent - offset) | format('%d') + -%?>" height='10' /><img alt="" + style="background:<?% c % 900 ? "gray" : "black" %?>" + src='images/blank.png' + width="<?% c % 3600 ? "1" : "2" %?>" + height='<?% (c % 900 ? "5" : "10") %?>' /> + <?%- END -%?> + </td> +</tr> + +<?% x = -1 %?> +<?% FOREACH cpos = data.keys.nsort %?> +<tr><td colspan="<?% (colspan + 1) %?>"><img src='images/blank.png' width='10' height=1 border=0 align='left' /></td></tr> +<?% x = x + 1; + channelName = data.$cpos.first.3; + channelId = data.$cpos.first.4; +%?> +<tr class="<?% myclass %?>" <?% IF (x mod 2) == 0 %?>bgcolor='#E5E5E5'<?% END %?>> + <td> + <a href="?cmd=program&data=<?% channelId %?>"><?% chop(channelName,12) %?></a> + </td> + <td colspan="<?% colspan %?>" style="white-space: nowrap"> + <?%- ges = 0; oldend = param.zeitvon -%?> + <?%- + FOREACH event = data.$cpos; + epgId = event.0; + epgTitle = event.1; + epgSubTitle = event.2; + chName = event.3; + chPos = event.4; + epgStart = event.5; + epgStop = event.6; + epgPercent = event.7; + epgDesc = event.8; + second_start= event.9; + second_stop = event.10; + video = event.11;
+ audio = event.12;
+ image = event.13; + IF second_start > oldend; + laenge = second_start - oldend; + percent = (laenge / Duration) * width; + ges = ges + percent; + -%?> + <img alt="" src='images/blank.png' width='<?% percent | format('%d') %?>' height=8 border=0 align='left' /> + <?% END; + IF second_start < oldend; + dur = second_stop - oldend; + ELSE; + dur = second_stop - second_start; + END; + IF dur < 0; dur = 0; END; + percent = (dur / Duration) * width; + IF (ges + percent) > width; + percent = width - ges; + END; + ges = ges + percent; + trun = percent / 10 | format('%d'); + IF dur < 300; + trun = 3; + + END; + -%?> + <?% d=[epgStart, " - ", epgStop ,"<br />", epgDesc ];desc=d.join("") %?> +<?% IF trun <= 3 %?> + <?% INCLUDE bloecke/tooltip.tmpl cmd="display" title=epgTitle subtitle=epgSubTitle eventid=epgId linkid=epgId ttp_offset=-200 %?><img alt="" src='images/blank.png' width='<?% percent | format('%d') %?>' height=8 border=0 hspace=0 vspace=0 align='left' /></a> +<?% ELSE %?> + <table class='<?% PROCESS getStatus e=event t=param.timers r=param.runningTimer %?>' align="left" width="<?% percent | format('%d') %?>" cellpadding="0" cellspacing="0"><tr><td> + <?% INCLUDE bloecke/tooltip.tmpl cmd="display" title=epgTitle subtitle=epgSubTitle eventid=epgId linkid=epgId ttp_offset=-200 %?> + <?% chop(epgTitle,trun) %?></a></td></tr></table> +<?% END %?> + <?% oldend = second_stop %?> + <?% END %?> + </td> +</tr> +<?% END %?> +</table> +</form> + +<?% BLOCK title %?> +<?% e.1 %?> +<?% e.2 IF e.2 %?> +<?% e.5 %?> - <?% e.6 %?> +<?% END %?> + +<?%- BLOCK getStatus -%?> +<?%- + class = 'schema_normal'; + IF t.exists(e.0) && t.${e.0}.Status; + class = 'schema_record_plan'; + END; + IF t.exists(e.0) && r.exists(t.${e.0}.Id); + class = 'schema_record_now'; + END; +class; +-%?> +<?%- END -%?> |
