summaryrefslogtreecommitdiff
path: root/skins/stone/program.tmpl
blob: 0cda1e95858d6adf7ab2574947320f6d1129acd6 (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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<!-- program -->
<body class="frame">
<div id="body">
<?% ######################################################################## %?>
<?% BLOCK dur %?>
    <?% height=6;d = d div 1 ; IF d >= 0 and d <= 100 %?>
        	<?% IF d >= 1 %?>
				<img class="progressleft" src="images/blank.gif" width="<?% 100 - d %?>" height="<?% height %?>" alt="<?% 100 - d %?>%" /><img class="progressright" src="images/blank.gif" width="<?% d %?>" height="<?% height %?>" alt="" />
            <?% ELSE %?>
				<img class="progress" src="images/blank.gif" width="100" height="<?% height %?>" alt="" />
            <?% END %?>
    <?% END %?>
<?% END %?>
<?% ######################################################################## %?>
<?% BLOCK RowButtons %?>
                        <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="javascript:popup('tedit','<?% timerid %?>',620,670,1)">
                            <img src="images/onoff.<?% global.imagetyp %?>" alt="" title="<?% gettext("Edit this timer") %?>" />
                        </a>
                        <?% ELSIF allow('tnew') %?>
                        <a href="javascript:popup('tnew','<?% id %?>',620,670,1)">
                            <img src="images/record.<?% global.imagetyp %?>" alt="" title="<?% gettext("To record") %?>" />
                        </a>
                        <?% END %?>
<?% END %?>
<?% ######################################################################## %?>
<?% BLOCK SetState %?>
    <?% state = '' %?>
    <?% IF running %?>
        <?% state = "running" %?>
    <?% ELSIF timerid %?>
      <?% UNLESS recording %?>
        <?% state = "deactive" %?>
      <?% ELSE %?>
        <?% state = "active" %?>
      <?% END %?>
    <?% END %?>
<?% END %?>
<?% ######################################################################## %?>
<?% BLOCK ItemAsArea %?>
      <div class="areabegin">
      <?% PROCESS SetState %?>
        <table class="fieldtable" summary="">
          <tr>
            <td class="fieldhead">
              <div class="fieldhead">
                  <a id="E<?% id %?>" href="javascript:popup('display','<?% id %?>',620,670,0)">
                    <font class="fieldinline<?% IF state != "";" ";state;END %?>"><?% chop(title,30) %?></font>
                  </a>
              </div>
            </td>
          </tr>
          <tr>
            <td class="fieldtext">
                  <a href="javascript:popup('display','<?% id %?>',620,670,0)">
                  <font class="subtitle<?% IF state != "";" ";state;END %?>">&nbsp;<?% chop(subtitle,32) %?></font>
        				  </a>
                  <?% IF global.hideDescription != 1 %?>
                  <div class="epgdescription">
                    <a href="javascript:popup('display','<?% id %?>',620,670,0)">
                    <font class="fieldinline<?% IF state != "";" ";state;END %?>"><?% chop(description,35,3) %?>&nbsp;</font>
        				    </a>
                  </div>
                  <?% END %?>
            </td>
          </tr>
          <tr>
            <td class="fieldtext">
              <table class="fieldinline" summary="">
                <tr>
                    <td class="fieldinline" style="white-space: nowrap">
                        <font class="description<?% IF state != "";" ";state;END %?>">
                        <?% start %?>&nbsp;-&nbsp;<?% stop %?>
                        <?% IF pdc && pdc != start %?> (<?% gettext("PDC") %?>:<?% pdc %?>) <?% END %?>
                        <br />
                        <?% gettext("Duration") %?>&nbsp;:&nbsp;<?% duration %?>
                        </font>
                    </td>
                    <td class="fieldinline push">
                        <?% INCLUDE widgets/tooltip.inc cmd="display" eventid=id linkid=id ttp_offset=-200 %?>
                        <?% PROCESS RowButtons %?>
                    </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td class="fieldbottom"></td>
          </tr>
        </table>
      </div>
<?% END %?>
<?% ######################################################################################
    channelpos=0;priorchannel=0;nextchannel=0;priortitle="";nexttitle="";
    FOREACH ch IN param.channels;
        IF cgi.param('data') == ch.1 || cgi.param('data') == ch.0 || param.current == ch.1;
            channel = ch.0;
            channelpos = ch.1;
        ELSE;
            IF channelpos==0;
                priorchannel=ch.1;
                priortitle=ch.0;
            END;
        END;
        IF channelpos!=0 && channelpos != ch.1 && nextchannel==0;
            nextchannel=ch.1;
            nexttitle=ch.0;
            LAST;
        END;
    END; 
%?>
<?% IF data.size <= 1 %?>
<h1><?% gettext("Program guide for") %?>&nbsp;<?% channel %?></h1>
<?% ELSE %?>
<?% fields = data.shift %?>
<h1><?% gettext("Program guide for") %?>&nbsp;<?% channel %?> - <?% data.first.6 %?></h1>
    <?% FOREACH zeile IN data %?>
        <?% IF verbose;"<!-- Item: ";FOREACH x IN zeile;loop.count - 1;":";x.replace("-"," ");"|";END;"-->";END %?>
        <?% id=zeile.0;title=zeile.1;subtitle=zeile.2;start=zeile.3;stop=zeile.4;duration=zeile.5;day = zeile.6;
            description=zeile.7;pdc=zeile.8;timerid=zeile.9;recording=zeile.10;running=zeile.11; %?>
        <?% IF old.defined && day != old %?>
<div class="areaclose"></div>
<h2><?% day %?></h2>
       <?% END %?>
       <?% PROCESS ItemAsArea %?>
       <?% old = day %?>
    <?% END %?>
<?% END %?>
</div>
<!-- ###### Seite ###### -->
<div id="sidebar">
<?% IF allow('switch') || allow('livestream') %?>
  <table summary="">
    <tr><td class="sidehead"><?% chop(channel,20) %?></td></tr>
    <tr>
    <td class="sidetext">
    <?% IF allow('switch') %?>
    <a href="javascript:post('switch','<?% channelpos %?>')"><img src="images/watch.<?% global.imagetyp %?>" alt="" title="<?% gettext("Switch") %?>" /></a>&nbsp;
    <a href="javascript:post('switch','<?% channelpos %?>')"><?% gettext("Switch") %?></a><br />
    <?% END %?>
    <?% IF allow('livestream') %?>
    <?% IF getModule('STREAM').widget == 'external' %?>
      <a href="?cmd=livestream&amp;data=<?% channelpos %?>">
        <img src="images/webcast.<?% global.imagetyp %?>" alt="" title="<?% gettext("Live web cast") %?>" /></a>&nbsp;
      <a href="?cmd=livestream&amp;data=<?% channelpos %?>">
        <?% gettext("Live TV web cast") %?></a>
      <?% ELSE %?>
      <a href="javascript:popup('livestream','<?% channelpos %?>',620,670,0)">
        <img src="images/webcast.<?% global.imagetyp %?>" alt="" title="<?% gettext("Live web cast") %?>" /></a>&nbsp;
      <a href="javascript:popup('livestream','<?% channelpos %?>',620,670,0)">
        <?% gettext("Live TV web cast") %?></a>
      <?% END %?>
    <?% END %?>
    </td>
    </tr>
    <tr>
    <td class="sidebottom"></td>
    </tr>
  </table>
<?% END %?>
  <table summary="">
    <tr><td class="sidehead"><?% gettext("Selection",20) %?></td></tr>
    <tr>
    <td class="sidetext">
    <form action="">
        <select size="15" name="data" onchange="di('?cmd=program&amp;data=',this.form.data.options[this.form.data.options.selectedIndex].value)">
        <?% FOREACH ch IN param.channels %?>
          <?% IF ch.2 && ch.2 != optgroup %?>
            <?% IF optgroup %?>
            </optgroup>
            <?% END %?>
            <optgroup label="<?% optgroup = ch.2;ch.2 %?>">
          <?% END %?>
            <option value="<?% ch.1 %?>"<?% ' selected="selected"' IF channelpos == ch.1 %?>><?% ch.0 %?></option>
        <?% END %?>
        <?% IF optgroup %?>
          </optgroup>
        <?% END %?>
        </select>
    </form>
    <?% ####################################################################### %?>
<?% BLOCK ChannelItem %?>    
        <?% IF chpos != 0 %?>
        <a href="?cmd=program&amp;data=<?% chpos %?>">
            <img src="images/<?% image %?>.<?% global.imagetyp %?>" alt="" title="<?% label %?>" />
        </a>
        &nbsp;
        <a href="?cmd=program&amp;data=<?% chpos %?>">
            <?% chop(label,20) %?>
        </a>
    <?% ELSE %?>
            <img src="images/<?% image %?>.<?% global.imagetyp %?>" alt="" title="" />
            &nbsp;
            <font class="deactive">
                <?% gettext("No channel defined!",20) %?>
            </font>
    <?% END %?>
    <br />
<?% END %?>    
    <?% PROCESS ChannelItem chpos=priorchannel    image='home' label=priortitle %?>
    <?% PROCESS ChannelItem chpos=nextchannel     image='down' label=nexttitle %?>
    <?% ####################################################################### %?>
    </td>
    </tr>
    <tr>
    <td class="sidebottom"></td>
    </tr>
  </table>
<?% IF allow('cedit') %?>
  <table summary="">
    <tr><td class="sidehead"><?% gettext("Channels",20) %?></td></tr>
    <tr>
    <td class="sidetext">
    <a href="?cmd=clist<?% IF id > 0 %?>#<?% channelpos %?><?% END %?>">
        <img src="images/edit.<?% global.imagetyp %?>" alt="" title="<?% gettext("Edit channels") %?>" />
    </a>
    &nbsp;
    <a href="?cmd=clist<?% IF id > 0 %?>#<?% channelpos %?><?% END %?>">
        <?% gettext("Edit channels",20) %?>
    </a>
    </td>
    </tr>
    <tr>
    <td class="sidebottom"></td>
    </tr>
  </table>
<?% END %?>
  <table summary="">
    <tr><td class="sidehead"><?% gettext("Search on Channel",15) %?> (<?% chop(channel,7) %?>)</td></tr>
    <tr>
    <td class="sidetext">
    <form method="post" action="?cmd=search" name="searchform">
        <input type="hidden" name="__channel" value="<?% channelpos %?>" />
        <input type="text" id="epgtext" name="data" alt="<?% gettext("Search") %?>" 
               onkeyup="suggest('esuggest&__channel=<?% channelpos %?>','epgtext','epgsuggest');" 
               autocomplete="off" />
        <br /><div class="suggestbox" id="epgsuggest"></div>
    </form>
    </td>
    </tr>
    <tr>
    <td class="sidebottom"></td>
    </tr>
  </table>
  <p id="sidefooter">&nbsp;</p>
</div>
<?% INCLUDE header.inc %?>