summaryrefslogtreecommitdiff
path: root/skins/xstyle/tlist.tmpl
blob: 610c606ce140bdb08513a5311d4243d98ec7a391 (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
<!-- 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 %?>

<div id="navcontainer">
<ul id="navlist">
<?% IF allow('tnew') %?>
    <li><a href="?cmd=tnew"><?% gettext("Create new timer") %?></a></li>
<?% END %?>
<?% IF allow('tupdate') %?>
    <li><a href="?cmd=tupdate"><?% gettext("Update timers") %?></a></li>
<?% END %?>
<?% IF allow('ttoggle') %?>
    <li><a href="#" onClick="Toggle('<?% gettext("Nothing selected!") %?>',document.TimerList)"><?% gettext("Toggle timer") %?></a></li>
<?% END %?>
<?% IF allow('tdelete') %?>
    <li><a href="#" onClick="Delete('<?% gettext("Would you like to delete these timers?") %?>','<?% gettext("Nothing selected!") %?>','tdelete',document.TimerList)"><?% gettext("Delete timer") %?></a></li>
<?% END %?>
    <li><a href="#" onClick="suche('<?% gettext("Search text") %?>', '?cmd=tsearch&data=')"><?% gettext("Search for timers") %?></a></li>
</ul>
</div>

<?% 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>
                        <div id="icons">
    <?% IF allow('tedit') %?>
                        <a href="?cmd=tedit&amp;data=<?% zeile.0 %?>" title="<?% gettext("Edit this timer") %?>"><img src="images/edit.png"></a><br/>
    <?% END %?>
<!--
                        <a href="?cmd=search&amp;data=<?% url( zeile.7.split('~').last ) %?>" title="<?% gettext("Search for repeats") %?>"><img src="images/repeat.png"></a><br/>
    <?% IF allow('tdelete') %?>
                        <a href="javascript:sure(document.TimerList, '<?% gettext("Would you like to delete this timer?") %?> : <?% escape(zeile.7.split('~').first)  %?>','?cmd=tdelete&amp;data=<?% zeile.0 %?>')" title="<?% gettext("Would you like to delete this timer?") %?>"><img src="images/delete.png"></a><br/>
    <?% END %?>
-->
                        </div>
                    </td>
                    <?% ELSIF c == 1; # Id Status %?>
                    <td>
                        <div id="icons">
                        <?% aus = gettext('Off') %?>
                        <?% an = gettext('On') %?>
    <?% IF allow('ttoggle') %?>
            			<a name='<?% zeile.0 %?>' href="javascript:tostatus('?cmd=ttoggle&amp;data=<?% zeile.0 %?>')" title="<?% gettext("Toggle timer") %?>&nbsp;<?% aktiv ? aus : an %?>"><img src="images/<?% aktiv ? "on.png" : "off.png" %?>"></a><br/>
<!--
                        <?% IF zeile.11 && allow('aedit') %?>
            			<a href="?cmd=aedit&amp;data=<?% zeile.11 %?>" title="<?% gettext("Edit autotimer") %?>"><img src="images/at.png"></a><br>
                        <?% END %?>
-->
    <?% ELSE %?>
            			[<?% aktiv ? aus : an %?>]
    <?% END %?>
<!--
    <?% INCLUDE 'bloecke/stars.tmpl' eventid=zeile.10 umbruch='<br/>' %?>
    <?% IF pdc %?>
                            <img src='images/vps.png' /><br/>
    <?% END %?>
    <?% IF rest <= 0 %?>
                        <img src="images/warning.png" title="<?% gettext("Not enough space to record this timer!") %?>"><br/>
    <?% END %?>
-->
                        </div>
    		        </td>
                    <?% ELSIF c == 2; # Channel Field %?>
                    <td nowrap>
                        <a href="?cmd=program&amp;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>
                    <?% ELSE %?>
                    <td><div class="<?% myclass %?>"><?% field %?></div></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 %?>