minor gui tidy ups
[pyTivo/wmcbrine/lucasnz.git] / plugins / video / templates / container_mob.tmpl
blob1149ff6960af4e8d79de655bcd31cf6e1a3c777a
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <title>pyTivo - Push - $escape($name)</title>
6 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
7 <link rel="stylesheet" type="text/css" href="/main_mob.css">
8 </head>
9 <body>
10 <form action="/TiVoConnect" method="POST">
11 <script language="JavaScript">
12 <!--
13 function toggle(source) {
14         var checkboxes = document.getElementsByName('File');
15         for (var i = 0; i < checkboxes.length; i++) {
16                 if (typeof(checkboxes[i].checked) != "undefined") {
17                         checkboxes[i].checked = source.checked;
18                         }
19         }
21 -->
22 </script>
23 <p id="title"><a id="titleA" href="/">pyTiVo</a></p>
24 <table id="main">
25     #set $parent = ''
26     #set $folders = $name.split("/")
27     #set $current_folder = $folders.pop()
28     #set $parent = '/'.join($folders)
29     <tr id="header">
30     <td colspan="2">
31     #if $parent != ''
32     <a id="headerA" href="/TiVoConnect?Command=QueryContainer&amp;Container=$escape($parent)">$escape($name)</a>
33     #else
34     <div id="headerA">$escape($name)</div>
35     #end if
36     </td>
37     <td><input type="checkbox" name="selectAll" onClick="toggle(this)" Title="Select All" /></td>
38     </tr>
39   #set $i = 0
40   ## i variable is used to alternate colors of row
41   ## loop through passed data printing row for each show or folder
42   #for $video in $videos
43           #set $i += 1
44           #set $j = $i%2
45           <tr class="row$(j)">
46           #if $video.is_dir
47             ## This is a folder
48                 <td id="ColA"><a href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)/$quote($video.name)'>$video.title </a></td>
49         <td id="ColB"><div id="count">$video.total_items</div></td>
50                 <td id="ColC"><img src="/iphonearrow.png" alt="" /></td>
51           #else
52             ## This is a show
53                 <td id="ColA">
54                 #if $video.episodeTitle
55                         <span class="progtitle">$video.title: $video.episodeTitle</span>
56                         #else
57                         <span class="progtitle">$video.title</span>
58                         #end if
59                         <span class="progdesc">
60             #if $video.description
61                         $video.description
62                         #end if
63                         #if $video.displayMajorNumbe and $video.callsign
64                         $video.displayMajorNumber $video.callsign
65                         #end if
66                         <span class="rectxt">Added on</span> <span class="recdate">$video.textDate</span>
67                 </td>
68         <td id="ColB"></td>
69                 <td id="ColC">
70             <input type="checkbox" name="File" value="$escape($video.part_path)">
71                 </td>
72           #end if
73           </tr>
74   #end for
75 </table>
76     <div id="pushmenu">
77       <input type="hidden" name="Command" value="Push"/>
78       <input type="hidden" name="Container" value="$name"/>
79         <select name="tsn">
80         #for $tivo in $tivo_names
81         <option>$tivo_names[$tivo]</option>
82         #end for
83         </select>
84       <input value="Send to TiVo" type="submit"/>
85     </div>
86 </form>
87 </body>
88 </html>