basic sort options for push webpages
[pyTivo/wmcbrine/lucasnz.git] / plugins / video / templates / container_html.tmpl
blob5cfb584c9612573d7298eadcfe0e6783bbd83142
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 <link rel="stylesheet" type="text/css" href="/main.css">
7 </head>
8 <body>
9 <form action="/TiVoConnect" method="POST">
10 <p id="titlep"><span id="title">pyTivo - Push - $escape($name)</span></p>
11 <p><a href="/">Home</a></p>
12 <script language="JavaScript">
13 <!--
14 function toggle(source) {
15         var checkboxes = document.getElementsByName('File');
16         for (var i = 0; i < checkboxes.length; i++) {
17                 if (typeof(checkboxes[i].checked) != "undefined") {
18                         checkboxes[i].checked = source.checked;
19                         }
20         }
22 -->
23 </script>
24 <table id="main" border="0" cellpadding="0" cellspacing="4">
25   ## Header Row
26         <tr class="header">
27                 <td><input type="checkbox" name="selectAll" onClick="toggle(this)" Title="Select All" /></td>
28                 <td></td>
29                 <td><a href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)&SortOrder=Normal'>Title</a></td>
30                 <td>Size</td>
31                 <td><a href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)&SortOrder=!CaptureDate'>Capture Date</a></td>
32         </tr>
33     #set $parent = ''
34     #set $folders = $name.split("/")
35     #set $current_folder = $folders.pop()
36     #set $parent = '/'.join($folders)
37     #if $parent != ''
38     <tr id="parentLinkRow">
39         <td><img src="/back.png" alt="" /></td>
40         <td width="100%" colspan="4">
41         <a id="parentLink" href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($parent)'>Up to Parent Folder</a>
42         </td>
43     </tr>
44     #end if
45   #set $i = 0
46   ## i variable is used to alternate colors of row
47   ## loop through passed data printing row for each show or folder
48   #for $video in $videos
49           #set $i += 1
50           #set $j = $i%2
51           <tr class="row$(j)">
52           #if $video.is_dir
53             ## This is a folder
54                 <td></td>
55         <td><img src="/folder.png" alt=""></td>
56                 <td class="progmain"><a href='/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)/$quote($video.name)'>$video.title </a></td>
57                 <td class="unbreak">$video.total_items Items</td>
58                 <td class="unbreak">$video.textDate</td>
59           #else
60             ## This is a show
61                 <td>
62             <input type="checkbox" name="File" value="$escape($video.part_path)">
63                 </td>
64         <td></td>
65                 <td class="progmain">
66                         #if $video.episodeTitle
67                         <span class="progtitle">$escape($video.title): $escape($video.episodeTitle)</span>
68                         #else
69                         <span class="progtitle">$escape($video.title)</span>
70                         #end if
71                         <span class="progdesc">
72             #if $video.description
73                         $escape($video.description)
74                         #end if
75                         #if $video.displayMajorNumbe and $video.callsign
76                         $video.displayMajorNumber $video.callsign
77                         #end if
78                         </span>
79                 </td>
80                 <td class="unbreak">$video.textSize
81                 </td>
82                 <td class="unbreak">$video.textDate</td>
83           #end if
84           </tr>
85   #end for
86 </table>
87 <p>
88       <input type="hidden" name="Command" value="Push">
89       <input type="hidden" name="Container" value="$escape($name)">
90         <select name="tsn">
91         #for $tivo in $tivo_names
92             #if $tivo and $tivo in $tivos
93                 <option>$escape($tivo_names[$tivo])</option>
94             #end if
95         #end for
96         #for $tivo in $tivo_names
97             #if $tivo and not $tivo in $tivos
98                 <option>$escape($tivo_names[$tivo])</option>
99             #end if
100         #end for
101         </select>
102       <input value="Send to TiVo" type="submit">
103 </p>
104 </form>
105 </body>
106 </html>