NOWRAP -> CSS.
[pyTivo/TheBayer.git] / plugins / togo / templates / npl.tmpl
blob7d82060dd1dc23f4289d9488a22ae91948759e0a
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\r
2 "http://www.w3.org/TR/html4/loose.dtd">\r
3 <html>\r
4 <head>\r
5 <meta content="text/html; charset=UTF-8" http-equiv="content-type">\r
6 <title>pyTivo - ToGo</title>\r
7 <style type="text/css">\r
8 \r
9 body {\r
10     background-color: rgb(250, 250, 250)\r
11 }\r
13 tr.row1 {\r
14     background-color: rgb(240, 240, 240)\r
15 }\r
17 span#title {\r
18     font-size: xx-large\r
19 }\r
21 table#main {\r
22     border: 1px solid rgb(220, 220, 220);\r
23     background-color: rgb(255, 255, 255)\r
24 }\r
26 td.unbreak {\r
27     white-space: nowrap;\r
28     text-align: center\r
29 }\r
31 </style>\r
32 </head>\r
33 <body>\r
35 #set $tname = $tivoIP\r
36 #for $tsn in $tivos\r
37     #if $tivoIP == $tivos[$tsn]\r
38         #set $tname = $tivo_names[$tsn]\r
39     #end if\r
40 #end for\r
41 <p style="text-align: center"><span id="title">pyTivo - ToGo - $tname</span></p>\r
42 <table id="main" border="0" cellpadding="0" cellspacing="4">\r
43     <tr>\r
44       <td>\r
45       <div>\r
46                   #if $ItemStart > 0\r
47                         #set $Offset = -($ItemStart + 1)\r
48                         #if $Offset < -($shows_per_page+1)\r
49                            #set $Offset = -($shows_per_page+1)\r
50                         #end if\r
51                         <a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP&amp;AnchorItem=$FirstAnchor&amp;AnchorOffset=$Offset&amp;Folder=$folder">Previous Page</a>\r
52                   #end if\r
53                   <table>\r
54                   #if $folder != ''\r
55                         ## We are in a subfolder, offer the option to return to NPL\r
56                         <tr><td colspan=5><a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP">Back to Now Playing List</a></td></tr>\r
57                   #end if\r
58                   #set $i = 0\r
59                   ## i variable is used to alternate colors of row\r
60                   ## loop through passed data printing row for each show or folder\r
61                   #for $row in $data\r
62                           #set $i += 1\r
63                           #set $j = $i%2\r
64                           <tr class="row$(j)">\r
65                           #if $row['ContentType'] == 'x-tivo-container/folder'\r
66                             ## This is a folder\r
67                                 <td></td>\r
68                                 <td><a href='/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;Folder=$(row["UniqueId"])&amp;TiVo=$tivoIP'>$row['Title'] </a></td>\r
69                                 <td class="unbreak">$(row["TotalItems"]) Items</td>\r
70                                 <td class="unbreak">$row["LastChangeDate"]</td>\r
71                                 <td></td>\r
72                           #else\r
73                             ## This is a show\r
74                                 #if 'Icon' in $row\r
75                                     <!-- Display small table with color similar to TiVo colored circles -->\r
76                                         #if $row['Icon'] == 'urn:tivo:image:expires-soon-recording'\r
77                                                 <td><table><tr><td height="18" width="8" bgcolor="yellow"> </td></tr></table></td>\r
78                                         #else if $row['Icon'] == 'urn:tivo:image:expired-recording'\r
79                                                 <td><table><tr><td height="18" width="8" bgcolor="yellow"><b> ! </b></td></tr></table></td>\r
80                                         #else if $row['Icon'] == 'urn:tivo:image:save-until-i-delete-recording'\r
81                                                 <td><table><tr><td height="18" width="8" bgcolor="green"></td></tr></table></td>\r
82                                         #else\r
83                                                 <td width="8"></td>\r
84                                         #end if\r
85                                 #else\r
86                                     ## No Icon listed in XML sheet\r
87                                         <td width="4"></td>\r
88                                 #end if\r
89                                 <td width="*">\r
90                                         #if 'episodeTitle' in $row\r
91                                         <b>$row['title']: $row['episodeTitle']</b><br>\r
92                                         #else\r
93                                         <b>$row['title']</b><br>\r
94                                         #end if\r
95                                         <small>#if 'description' in $row\r
96                                         $row['description']\r
97                                         #end if\r
98                                         #if 'displayMajorNumber' in $row and 'callsign' in $row\r
99                                         $row['displayMajorNumber'] $row['callsign']\r
100                                         #end if\r
101                                         </small>\r
102                                 </td>\r
103                                 <td class="unbreak">$row['SourceSize'] <br>\r
104                                 $row['Duration']\r
105                                 </td>\r
106                                 <td class="unbreak">$row['CaptureDate']</td>\r
107                                 #if 'CopyProtected' in $row and $row['CopyProtected'] == 'Yes'\r
108                                         <td>CopyProtected</td>\r
109                                 #else if 'Url' in $row\r
110                                         <td class="unbreak">\r
111                                         #if $row['Url'] in $status\r
112                                                 #set $this_status = $status[$row['Url']]\r
113                                                 #if $this_status['running'] and $this_status['rate'] != ""\r
114                                                         #set $gb = '%.3f GB' % (float($this_status['size']) / (1024 ** 3))\r
115                                                         Transfering - $this_status['rate'] KB/s<br>$gb\r
116                                                         <a href="/TiVoConnect?Command=ToGoStop&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP&amp;Redirect=NPL">Stop Transfer</a>\r
117                                                 #elif $this_status['running'] and $this_status['rate'] == ""\r
118                                                         Initiating Transfer.<br>\r
119                                                         Please Wait\r
120                                                 #elif $this_status['error']\r
121                                                         Error - $this_status['error']<br>\r
122                                                         <a href="/TiVoConnect?Command=ToGo&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP&amp;Redirect=NPL">Try Transfer Again.</a>\r
123                                                 #elif $this_status['finished']\r
124                                                         Transfer Complete\r
125                                                 #else\r
126                                                         Transfer Stopped<br>\r
127                                                         <a href="/TiVoConnect?Command=ToGo&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP&amp;Redirect=NPL">Try Transfer Again.</a>\r
128                                                 #end if\r
129                                         #else\r
130                                                 <a href="/TiVoConnect?Command=ToGo&amp;Container=$quote($container)&amp;Url=$quote($row['Url'])&amp;TiVo=$tivoIP&amp;Redirect=NPL">Transfer This.</a>\r
131                                         #end if\r
132                                         </td>\r
133                                 #else\r
134                                     ## No URL was in links url in XML\r
135                                         <td></td>\r
136                                 #end if\r
137                           #end if\r
138                           </tr>\r
139                   #end for\r
140                   </table>\r
141                   #if ($TotalItems - $ItemCount) > ($ItemStart + 1)\r
142                      #set $Offset = $shows_per_page - 1\r
143                      <a href="/TiVoConnect?Command=NPL&amp;Container=$quote($container)&amp;TiVo=$tivoIP&amp;AnchorItem=$FirstAnchor&amp;AnchorOffset=$Offset&amp;Folder=$folder">Next Page</a>\r
144                   #end if\r
145       </div>\r
146       </td>\r
147     </tr>\r
148 </table>\r
149 </body>\r
150 </html>\r