summaryrefslogtreecommitdiff
path: root/skins/deltab/now.tmpl
blob: 8df7d24d17b7bed58208b3f32d14bf77b58a5c5a (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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!-- now -->
<?% USE date %?>
<div id="body">
<?% ######################################################################## %?>
<?% BLOCK dur %?>
    <?% height=6;IF d >= 0 and d < 100 %?>
        	<?% IF d >= 1 %?>
          <?% d = d / 2;d = d div 1 %?>
				<img class="progressleft" src="images/blank.gif" width="<?% 50 - d div 1 %?>" height="<?% height %?>" alt="<?% 50 - d %?>%" /><img class="progressright" src="images/blank.gif" width="<?% d %?>" height="<?% height %?>" alt="" />
            <?% ELSE %?>
				<img class="progress" src="images/blank.gif" width="50" height="<?% height %?>" alt="" />
            <?% END %?>
    <?% END %?>
<?% END %?>
<?% ######################################################################## %?>
<?% BLOCK SetState %?>
    <?% state = '' %?>
    <?% IF running %?>
        <?% state = "running" %?>
    <?% ELSIF timerid %?>
      <?% UNLESS recording %?>
        <?% state = "deactive" %?>
      <?% ELSE %?>
        <?% state = "active" %?>
      <?% END %?>
    <?% END %?>
<?% END %?>
<?% ######################################################################## %?>
<?% BLOCK item %?>
    <?% PROCESS SetState %?>
    <td>
    <?% IF global.preferedlocal && allow('switch') %?>
            <a href="javascript:post('switch','<?% channel %?>')">
              <img src="images/watch.<?% global.imagetyp %?>" alt="" title="<?% gettext("Switch") %?>" />
            </a>
    <?% ELSIF allow('livestream') %?>
          <a href="?cmd=livestream&amp;data=<?% channel %?>">
            <img src="images/webcast.<?% global.imagetyp %?>" alt="" title="<?% gettext("Live TV web cast") %?>" /></a>
    <?% END %?>
        <a style="vertical-align:bottom;" href="?cmd=program&amp;data=<?% channel %?>" title="<?% gettext("Program guide for") %?>&nbsp;<?% sender %?>">
            <font class="channel<?% IF state != "";" ";state;END %?>"><?% sender %?></font>
        </a>
    </td>
    <td>
        <a title="<?% title %?>" href="?cmd=display&amp;data=<?% id %?>">
            <font class="title<?% IF state != "";" ";state;END %?>"><?% title %?></font>
            <?% IF subtitle.length > 0 %?>
                &nbsp;<font class="subtitle<?% IF state != "";" ";state;END %?>"><?% subtitle %?></font>
            <?% END %?>
            <?% IF global.hideDescription != 1 && description.length > 0 %?><br /><font class="description<?% IF state != "";" ";state;END %?>"><?% chop(description,100,2) %?></font><?% END %?>
        </a>
    </td>
    <td>
        <?% PROCESS dur d=duration %?>
    </td>
    <td>
        <?% start %?>&nbsp;-&nbsp;<?% stop %?>
        <?% IF pdc && pdc != start %?> (<?% gettext("PDC") %?>:<?% PDC %?>) <?% END %?>
    </td>
    <td class="push">
        <?% INCLUDE widgets/tooltip.inc cmd="display"  eventid=id linkid=id ttp_offset=-400 %?>
        <a href="?cmd=search&amp;data=<?% url( title ) %?>">
            <img src="images/find.<?% global.imagetyp %?>" alt="" title="<?% gettext("Search for repeats") %?>" />
        </a>
        <?% IF timerid && allow('tedit') %?>
        <a href="?cmd=tedit&amp;data=<?% timerid %?>">
            <img src="images/onoff.<?% global.imagetyp %?>" alt="" title="<?% gettext("Edit this timer") %?>" />
        </a>
        <?% ELSIF allow('tnew') %?>
        <a href="?cmd=tnew&amp;data=<?% id %?>">
             <img src="images/record.<?% global.imagetyp %?>" alt="" title="<?% gettext("To record") %?>" />
        </a>
        <?% END %?>
    </td>
<?% END %?>
<?% ######################################################################## %?>
<?%
    IF cgi.param('data') && cgi.param('data') > 100;
        day = date.format(cgi.param('data'), '%A, %H:%M', locale);
        time = date.format(cgi.param('data'), '%H:%M', locale);
    ELSIF cgi.param('data') && param.zeit;
        time = day = date.format(param.zeit, '%H:%M', locale);
    ELSE;
        day = date.format(date.now, '%H:%M', locale);
        now = 1;
    END;
%?>
<?% ######################################################################## %?>
<h1><?% IF cgi.param('cmd') == 'next' %?>
    <?% gettext("What is running at next") %?>
    <?% ELSIF now %?>
    <?% gettext("What is running now") %?>
    <?% ELSE %?>
    <?% gettext("What is running at") %?>&nbsp;<?% day %?>
    <?% END %?>
</h1>
<?% IF data.size > 1%?>
<?% fields = data.shift %?>
<table summary=""  width="100%">
<tr>
    <th width="180"></th>
    <th></th>
    <th width="60">
    </th><th width="80"></th>
    <th width="40" align="right"></th>
</tr>
<?% FOREACH zeile IN data %?>
    <?% IF verbose;"<!-- Item: ";FOREACH x IN zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?>
    <tr<?% " class='two'" IF loop.count mod 2 == 0 %?>>
        <?% id=zeile.0;title=zeile.1;subtitle=zeile.2;sender=zeile.3;
            channel=zeile.4;group=zeile.5;start=zeile.6;stop=zeile.7;duration=zeile.8;
            description=zeile.9;progress=zeile.10;
            timerid=zeile.11;recording=zeile.12;running=zeile.13;
            pdc=zeile.14; %?>
        <?% IF old.defined && group != old %?>
    </tr>
</table>
<h2><?% group %?></h2>
<table summary="" width="100%">
<tr>
    <th width="180"></th>
    <th></th>
    <th width="60">
    </th><th width="80"></th>
    <th width="40" align="right"></th>
</tr>
       <?% END %?>
       <?% PROCESS item %?>
       <?% old = group %?>
    </tr>
<?% END %?>
</table>
<?% END %?>
</div>
<!-- ###### Seite ###### -->
<div id="sidebar">
    <p class="section"><?% gettext("What is running at",20) %?></p>
    <form action="">
    <p>
        <select name="cgroups" onchange="di('?cmd=<?% cgi.param('cmd') %?>&amp;data=<?% cgi.param('data') %?>&amp;__cgrp=',this.form.cgroups.options[this.form.cgroups.options.selectedIndex].value)">
            <?% FOREACH cgrp IN param.cgroups %?>
              <option value="<?% cgrp.last %?>"<?% ' selected="selected"' IF param.channelgroup == cgrp.last %?>><?% cgrp.first %?></option>
            <?% END %?>
        </select>
    </p>
    </form>
    <p>
        <a href="?cmd=now&amp;__cgrp=<?% cgi.param('__cgrp') %?>"><img src="images/forward.<?% global.imagetyp %?>" alt="" title="<?% gettext("Running now") %?>" /></a>&nbsp;
        <a href="?cmd=now&amp;__cgrp=<?% cgi.param('__cgrp') %?>"><?% gettext("Running now",20) %?></a><br />
        <a href="?cmd=next&amp;__cgrp=<?% cgi.param('__cgrp') %?>"><img src="images/forward.<?% global.imagetyp %?>" alt="" title="<?% gettext("Next") %?>" /></a>&nbsp;
        <a href="?cmd=next&amp;__cgrp=<?% cgi.param('__cgrp') %?>"><?% gettext("Next",20) %?></a><br />
        <a href="?cmd=sch<?% IF param.zeit && cgi.param('cmd') != 'next' && now != 1;"&amp;data=";param.zeit;END;%?>&amp;__cgrp=<?% cgi.param('__cgrp') %?>">
            <img alt="" src="images/forward.<?% global.imagetyp %?>" title="<?% gettext("Schema") %?>" /></a>&nbsp;
        <a href="?cmd=sch<?% IF param.zeit && cgi.param('cmd') != 'next' && now != 1;"&amp;data=";param.zeit;END;%?>&amp;__cgrp=<?% cgi.param('__cgrp') %?>">
            <?% gettext("Schema",20) %?><?% IF param.zeit && cgi.param('cmd') != 'next' && now != 1;" ";day;END;%?></a>
    </p>
    <form method="post" action="?cmd=now"> 
    <p>
        <input type="text" name="data" value="<?% IF time.defined %?><?% time %?><?% ELSE %?>20:15<?% END %?>" size="18" />
        <input type="hidden" name="__cgrp" value="<?% cgi.param('__cgrp') %?>" />
    </p>
    </form>
    <form action="">
        <p>
            <?% zeiten = param.periods.split(','); %?>
            <select size="<?% zeiten.size + 3 %?>" name='data' onchange="di('?cmd=now&amp;__cgrp=<?% cgi.param('__cgrp') %?>&amp;data=',this.form.data.options[this.form.data.options.selectedIndex].value)">
            <?% today = [] %?>
            <?% tomor = [] %?>
        <?% FOREACH zeit IN zeiten %?>
            <?% tom = 0 %?>
            <?% PERL %?>
                use Date::Manip;
                my $z;
                $z   = UnixDate(ParseDate($stash->{zeit}),"%s") || 0;
                if($z and $z < time) {
                    $z += 86400;
                    $stash->set('tom', 1);
                }
                $stash->set('z', $z);
            <?% END %?>
            <?% NEXT UNLESS z;
            IF tom;
                tomor.push(z);
            ELSE;
                today.push(z);
            END %?>
        <?% END %?>
        <?% IF today.size > 0 %?>
            <optgroup label="<?% date.format(today.0, "%A", locale) %?>">
        <?% FOREACH z IN today %?><option value="<?% z %?>"><?% date.format(z, "%H:%M", locale) %?></option><?% END %?> 
            </optgroup>
        <?% END %?>
        <?% IF tomor.size > 0 %?>
            <optgroup label="<?% date.format(tomor.0, "%A", locale) %?>">
        <?% FOREACH z IN tomor %?><option value="<?% z %?>"><?% date.format(z, "%H:%M", locale) %?></option><?% END %?> 
            </optgroup>
        <?% END %?>
            </select>
<?% IF allow('erestart') %?>
      <br />
      <a title="<?% gettext("Update EPG data") %?>" href="?cmd=erestart"><img src="images/refresh.<?% global.imagetyp %?>" alt="" /></a>&nbsp;
      <a title="<?% gettext("Update EPG data") %?>" href="?cmd=erestart"><?% gettext("Update EPG data",20) %?></a>
<?% END %?>
        </p>
    </form>
    <p class="section"><?% gettext("Search",20) %?></p>
    <form method="post" action="?cmd=search">
    <p>
        <input type="text" name="data" size="18" />
    </p>
    </form>
</div>
<?% global.sidebar = 1 %?>