Remove Parent folder now this it's in wmcbrines fork.
[pyTivo/wmcbrine/lucasnz.git] / plugins / video / templates / container_html.tmpl
blob8fe8804f77664d1ff9942ca9b8ad8bd3c51529db
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</title>
6 <link rel="stylesheet" type="text/css" href="/main.css">
7 </head>
8 <body>
9 #set $folders = $name.split('/')
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="titlep"><span id="title">
24 <a href="/">pyTivo</a> /
25 #if len($folders) > 1
26 <a href="/TiVoConnect?Command=QueryContainer&amp;Container=$quote($folders[0])&amp;Format=text/html">
27 #end if
28 Push from $escape($folders[0])
29 #if len($folders) > 1
30 </a>
31   #if len($folders) > 2
32     #for $pos, $n in enumerate($folders[1:-1])
33       #set $ppath = '/'.join($folders[:$pos + 2])
34 / <a href="/TiVoConnect?Command=QueryContainer&amp;Container=$quote($ppath)&amp;Format=text/html">$n</a>
35     #end for
36   #end if
37 / $escape($folders[-1])
38 #end if
39 </span></p>
40 <table id="main">
41   ## Header Row
42         <tr class="header">
43                 <td><input type="checkbox" name="selectAll" onClick="toggle(this)" Title="Select All" /></td>
44                 <td></td>
45                 <td><a href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)&SortOrder=Normal&amp;Format=text/html'>Title</a></td>
46                 <td>Size</td>
47                 <td><a href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)&SortOrder=!CaptureDate&amp;Format=text/html'>Capture Date</a></td>
48         </tr>
49   #set $i = 0
50   ## i variable is used to alternate colors of row
51   ## loop through passed data printing row for each show or folder
52   #for $video in $videos
53           #set $i += 1
54           #set $j = $i%2
55           <tr class="row$(j)">
56           #if $video.is_dir
57             ## This is a folder
58                 <td></td>
59                 <td><img src="/folder.png" alt=""></td>
60                 <td class="progmain"><a href="/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)/$quote($video.name)&amp;Format=text/html">$video.title</a></td>
61                 <td class="progsize">$video.total_items Items</td>
62                 <td class="progdate">$video.textDate</td>
63           #else
64             ## This is a show
65                 <td>
66             <input type="checkbox" name="File" value="$escape($video.part_path)">
67                 </td>
68         <td></td>
69                 <td class="progmain">
70                         #if $video.episodeTitle
71                         <span class="progtitle">$escape($video.title): $escape($video.episodeTitle)</span>
72                         #else
73                         <span class="progtitle">$escape($video.title)</span>
74                         #end if
75                         <span class="progdesc">
76             #if $video.description
77                         $escape($video.description)
78                         #end if
79                         #if $video.displayMajorNumber and $video.callsign
80                         $video.displayMajorNumber $video.callsign
81                         #end if
82                         </span>
83                 </td>
84                 <td class="progsize">$video.textSize</td>
85                 <td class="progdate">$video.textDate</td>
86           #end if
87           </tr>
88   #end for
89 </table>
90 <p>
91       <input type="hidden" name="Command" value="Push">
92       <input type="hidden" name="Container" value="$escape($name)">
93         <select name="tsn">
94         #for $tivo in $tivo_names
95             #if $tivo and $tivo in $tivos
96                 <option>$escape($tivo_names[$tivo])</option>
97             #end if
98         #end for
99         #for $tivo in $tivo_names
100             #if $tivo and not $tivo in $tivos
101                 <option>$escape($tivo_names[$tivo])</option>
102             #end if
103         #end for
104         </select>
105       <input value="Send to TiVo" type="submit">
106 </p>
107 </form>
108 </body>
109 </html>