Merge pull request #21 from geekmug/patch-1
[pyTivo/wmcbrine.git] / plugins / video / templates / container_html.tmpl
blob555c77ded1853349d0d75151157af89ed82d331a
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 <p id="titlep"><span id="title">
12 <a href="/">pyTivo</a> /
13 #if len($folders) > 1
14 <a href="/TiVoConnect?Command=QueryContainer&amp;Container=$quote($folders[0])&amp;Format=text/html">
15 #end if
16 Push from $folders[0]
17 #if len($folders) > 1
18 </a>
19   #if len($folders) > 2
20     #for $pos, $n in enumerate($folders[1:-1])
21       #set $ppath = '/'.join($folders[:$pos + 2])
22 / <a href="/TiVoConnect?Command=QueryContainer&amp;Container=$quote($ppath)&amp;Format=text/html">$n</a>
23     #end for
24   #end if
25 / $folders[-1]
26 #end if
27 </span></p>
28 <table id="main">
29   #set $i = 0
30   ## i variable is used to alternate colors of row
31   ## loop through passed data printing row for each show or folder
32   #for $video in $videos
33           #set $i += 1
34           #set $j = $i%2
35           <tr class="row$(j)">
36           #if $video.is_dir
37             ## This is a folder
38                 <td></td>
39                 <td><img src="/folder.png" alt=""></td>
40                 <td class="progmain"><a href="/TiVoConnect?Command=QueryContainer&amp;Container=$quote($name)/$quote($video.name)&amp;Format=text/html">$video.title</a></td>
41                 <td class="progsize">$video.total_items Items</td>
42                 <td class="progdate">$video.textDate</td>
43           #else
44             ## This is a show
45                 <td>
46             <input type="checkbox" name="File" value="$video.part_path">
47                 </td>
48         <td></td>
49                 <td class="progmain">
50                         #if $video.episodeTitle
51                         <span class="progtitle">$video.title: $video.episodeTitle</span>
52                         #else
53                         <span class="progtitle">$video.title</span>
54                         #end if
55                         <span class="progdesc">
56             #if $video.description
57                         $video.description
58                         #end if
59                         #if $video.displayMajorNumber and $video.callsign
60                         $video.displayMajorNumber $video.callsign
61                         #end if
62                         </span>
63                 </td>
64                 <td class="progsize">$video.textSize</td>
65                 <td class="progdate">$video.textDate</td>
66           #end if
67           </tr>
68   #end for
69 </table>
70 <p>
71       <input type="hidden" name="Command" value="Push">
72       <input type="hidden" name="Container" value="$name">
73         <select name="tsn">
74         #for $tivo in $tivos
75             #if 'name' in $tivos[$tivo] and not $tivo.startswith('{')
76                 <option>$tivos[$tivo]['name']</option>
77             #end if
78         #end for
79         #for $tivo in $tivos
80             #if not 'name' in $tivos[$tivo] and not $tivo.startswith('{')
81                 <option>$tivo</option>
82             #end if
83         #end for
84         </select>
85       <input value="Send to TiVo" type="submit">
86 </p>
87 </form>
88 </body>
89 </html>