blob: 32e09bd8bbe3d7142992a728d9ddaf588c34670c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
<!-- tlist -->
<?% enableform = allow('tdelete') || allow('ttoggle');
rest = param.capacity;
%?>
<?% IF data.size <= 1 %?>
<h1><?% gettext("Planned recordings") %?></h1>
<?% ELSE %?>
<h1><?% gettext("Planned recordings") %?> - <?% data.1.4 %?></h1>
<?% END %?>
<?% IF allow('tnew') %?>
<a href="?cmd=tnew">[<?% gettext("Create new timer") %?>]</a>
<?% END %?>
<?% IF allow('tupdate') %?>
<a href="javascript:tostatus('?cmd=tupdate')">[<?% gettext("Update timers") %?>]</a>
<?% END %?>
<form name='Timer'>
<?% INCLUDE 'widgets/referer.tmpl' %?>
<?% IF allow('ttoggle') %?>
<a href="#" onClick="Toggle('<?% gettext("Nothing selected!") %?>',document.TimerList)">
[<?% gettext("Toggle timer") %?>]
</a>
<?% END %?>
<?% IF allow('tdelete') %?>
<a href="#" onClick="Delete('<?% gettext("Would you like to delete these timers?") %?>',
'<?% gettext("Nothing selected!") %?>','tdelete',document.TimerList)">
[<?% gettext("Delete timer") %?>]
</a>
<?% END %?>
<?% gettext("Search for timers") %?>:
<input type="hidden" name="cmd" value='tsearch' >
<input type="text" name="data" size='18' <?% IF cgi.param('cmd')=='ts' || cgi.param('cmd')=='tsearch' %?>value='<?% cgi.param('data')%?>'<?% END %?>>
</form>
<?% IF enableform %?>
<form name='TimerList'>
<?% INCLUDE 'widgets/referer.tmpl' %?>
<?% END %?>
<table border="0" width="95%">
<tr>
<?% fields = data.shift %?>
<?% c = -1 %?>
<?% FOREACH field IN fields %?>
<?% c = c + 1 %?>
<?% NEXT IF field.match('^__') or c == 4 %?>
<th><?% field %?></th>
<?% END %?>
<?% IF param.recorder > 1 %?>
<th><?% gettext("Video disk recorder") %?></th>
<?% END %?>
<?% IF enableform %?>
<th width="64"><?% gettext("Selection",7) %?></th>
<?% END %?>
</tr>
<?% FOREACH zeile IN data %?>
<?% aktiv= ( zeile.1 ? zeile.1 mod 2 : 0 );
pdc= ( zeile.1 ? zeile.1 mod 8 div 4 : 0 );
day = zeile.4;
IF aktiv; rest = rest - zeile.12; END;
%?>
<?% IF oldDay != day %?>
<tr><td colspan='<?% zeile.size %?>' bgcolor='#DDDDDD'><b><?% day %?></b></td><tr>
<?% END %?>
<?% myclass = "normal" %?>
<?% UNLESS aktiv %?>
<?% myclass = "deactive" %?>
<?% ELSIF zeile.9 %?>
<?% myclass = 'problem' %?>
<?% ELSIF zeile.14 %?>
<?% myclass = "active" %?>
<?% END %?>
<tr class="<?% myclass %?>" <?% IF (loop.count mod 2) == 0 %?>bgcolor='#F5F5F5'<?% END %?>>
<?% c = -1 %?>
<?% FOREACH field IN zeile %?>
<?% c = c + 1 %?>
<?% NEXT IF fields.$c.match('^__') or c == 4 %?>
<?% IF c == 0; # Id Field %?>
<td nowrap><nobr>
<a href="?cmd=search&data=<?% url( zeile.7.split('~').last ) %?>" title="<?% gettext("Search for repeats") %?>"><div class="<?% myclass %?>">[R]</div></a>
<?% IF allow('tedit') %?>
<a href="?cmd=tedit&data=<?% zeile.0 %?>" title="<?% gettext("Edit this timer") %?>"><div class="<?% myclass %?>">[E]</div></a>
<?% END %?>
<?% IF allow('tdelete') %?>
<a href="javascript:sure(document.TimerList, '<?% gettext("Would you like to delete this timer?") %?> : <?% escape(zeile.7.split('~').first) %?>','?cmd=tdelete&data=<?% zeile.0 %?>')" title="<?% gettext("Would you like to delete this timer?") %?>"><div class="<?% myclass %?>">[D]</div></a>
<?% END %?>
</td>
<?% ELSIF c == 1; # Id Status %?>
<td>
<?% aus = gettext('Off') %?>
<?% an = gettext('On') %?>
<?% IF allow('ttoggle') %?>
<a name='<?% zeile.0 %?>' href="javascript:tostatus('?cmd=ttoggle&data=<?% zeile.0 %?>')" title="<?% gettext("Toggle timer") %?> <?% aktiv ? aus : an %?>"><div class="<?% myclass %?>">[<?% aktiv ? an : aus %?>]</div></a>
<?% IF pdc;'(';gettext('PDC');')';END %?>
<?% IF zeile.11 && allow('aedit') %?>
<a href="?cmd=aedit&data=<?% zeile.11 %?>" title="<?% gettext("Edit autotimer") %?>"><div class="<?% myclass %?>">(AT)</div></a><br>
<?% END %?>
<?% IF rest <= 0 %?><a href="javascript:alert('<?% gettext("Not enough space to record this timer!") %?>')">(!)</a><br/><?% END %?>
<?% ELSE %?>
[<?% aktiv ? aus : an %?>]<?% IF pdc;' (';gettext('PDC');')';END %?>
<?% END %?>
</td>
<?% ELSIF c == 2; # Channel Field %?>
<td nowrap>
<a href="?cmd=program&data=<?% zeile.3 %?>" title="<?% gettext("Jump to program:") %?> <?% field %?>"><div class="<?% myclass %?>"><?% field %?></div></a>
</td>
<?% ELSIF c == 7; # Title %?>
<td>
<?% IF zeile.10 %?><?% INCLUDE bloecke/tooltip.tmpl cmd="display" title=field desc=zeile.13 eventid=zeile.10 linkid=zeile.10 ttp_offset=0 %?><?% END %?>
<?% FOREACH f IN field.split('~') %?>
<div class="<?% myclass %?>"><?% f %?></div>
<?% END %?>
<?% IF zeile.10 %?></a><?% END %?>
</td>
<?% ELSIF c == 8; # Prio %?>
<td>
<?% IF myclass == 'fastproblem' %?>
<div class="fastproblemgreen"><?% field %?></div>
<?% ELSIF myclass == 'problem' %?>
<div class="problemred"><?% field %?></div>
<?% ELSE %?>
<?% field %?>
<?% END %?>
</td>
<?% ELSE %?>
<td><?% field %?></td>
<?% END %?>
<?% END %?>
<?% IF param.recorder > 1 %?>
<td><div class="<?% myclass %?>"><?% zeile.15 %?></div></td>
<?% END %?>
<?% IF enableform %?>
<td>
<input type="checkbox" value="<?% zeile.0 %?>" name="<?% zeile.7 | replace('~',' ') %?>" />
</td>
<?% END %?>
</tr>
<?% oldDay = day %?>
<?% END %?>
</table>
<?% IF enableform %?>
</form>
<a href="#" onClick="selAll(document.TimerList, 1)">[<?% gettext("Select all") %?>]</a>
<a href="#" onClick="selAll(document.TimerList, 0)">[<?% gettext("Unselect all") %?>]</a>
<a href="#" onClick="reverse(document.TimerList)">[<?% gettext("Reverse select") %?>]</a>
<?% END %?>
|