1 <xsl:stylesheet version=
"1.0" xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform">
2 <xsl:output method=
"html" encoding=
"utf-8"
3 doctype-system=
"http://www.w3.org/TR/html4/strict.dtd"
4 doctype-public=
"-//W3C//DTD HTML 4.01//EN"/>
5 <xsl:template match=
"TiVoContainer">
6 <xsl:variable name=
"tivos" select=
"Tivos"/>
10 <xsl:value-of select=
"Details/Title"/>
12 <link rel=
"stylesheet" type=
"text/css" href=
"/main.css"/>
15 <form action=
"/TiVoConnect" method=
"POST">
16 <p id=
"titlep"><span id=
"title">pyTivo - Push -
17 <xsl:value-of select=
"Details/Title"/>
19 <p><a href=
"/">Home
</a></p>
20 <script language=
"JavaScript">
23 function toggle(source) {
24 var checkboxes = document.getElementsByName('File');
25 for (var i = 0; i < checkboxes.length; i++) {
26 if (typeof(checkboxes[i].checked) != "undefined") {
27 checkboxes[i].checked = source.checked;
34 <table id=
"main" style=
"text-align: left;" border=
"0" cellpadding=
"0"
35 cellspacing=
"4" width=
"100%">
37 <td><input type=
"checkbox" name=
"selectAll" OnClick=
"toggle(this)" Title=
"Select All" /></td>
43 <tr id=
"parentLinkRow" style=
"display: none;">
44 <td><img src=
"/back.png" alt=
"" /></td>
45 <td width=
"100%" colspan=
"4">
46 <a id=
"parentLink" href=
"">Up to Parent Folder
</a>
49 <SCRIPT LANGUAGE=
"JavaScript">
52 var sGet = window.location.search
53 var re = new RegExp("([\?|&]Container=)(.*)/[^&]+", "g");
54 var m = re.exec(sGet);
56 var re = new RegExp("([\?|&]Container=)(.*)/[^&]+", "g");
57 sGet = sGet.replace(re, "$1$2");
59 //Show up to parent folder link if we are in a subfolder
60 document.getElementById('parentLink').href = sGet;
61 document.getElementById('parentLinkRow').style.display = '';
66 <xsl:for-each select=
"Item">
69 <xsl:when test=
"position() mod 2 = 1">
70 <xsl:attribute name=
"class">
71 <xsl:value-of select=
"'row1'"/>
75 <xsl:attribute name=
"class">
76 <xsl:value-of select=
"'row0'"/>
81 <xsl:when test=
"Details/ContentType = 'x-container/folder'">
83 <td><img src=
"/folder.png" alt=
"" /></td>
86 <xsl:attribute name=
"href">
87 <xsl:value-of select=
"Links/Content/Url"/>
89 <xsl:value-of select=
"Details/Title"/>
93 <xsl:value-of select=
"Details/TotalItems"/> Items
95 <td class=
"unbreak"><xsl:value-of select=
"Links/Push/Date"/></td>
99 <input type=
"checkbox" name=
"File">
100 <xsl:attribute name=
"value">
101 <xsl:value-of select=
"Links/Push/File"/>
107 <span class=
"progtitle">
108 <xsl:value-of select=
"Details/Title"/>
109 <xsl:if test=
"Details/EpisodeTitle != ''">
110 <xsl:if test=
"Details/EpisodeTitle != Details/Title">
111 :
<xsl:value-of select=
"Details/EpisodeTitle"/>
115 <xsl:if test=
"Details/Description != ''">
116 <span class=
"progdesc">
117 <xsl:value-of select=
"Details/Description"/>
122 <xsl:value-of select=
"Links/Push/Size"/>
124 <td class=
"unbreak"><xsl:value-of select=
"Links/Push/Date"/></td>
131 <input type=
"hidden" name=
"Command" value=
"Push"/>
132 <input type=
"hidden" name=
"Container">
133 <xsl:attribute name=
"value">
134 <xsl:value-of select=
"/TiVoContainer/Details/Title"/>
138 <xsl:for-each select=
"/TiVoContainer/Tivos/Tivo">
140 <xsl:attribute name=
"value">
141 <xsl:value-of select=
"."/>
143 <xsl:value-of select=
"."/>
147 <input value=
"Send to TiVo" type=
"submit"/>