Initial Commit
[Projects.git] / pytivo-youtube / source / plugins / youtube / templates / .svn / text-base / container.xsl.svn-base
blob8baeb26947f8f6538401c8c6b945c35acd580af0
1 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
2     <xsl:template match="TiVoContainer">
3         <xsl:variable name="tivos" select="Tivos"/>
4         <html>
5             <body>
6                 <h2><xsl:value-of select="Details/Title"/></h2>
7                 <table border="1">
8                     <tr bgcolor="#9acd32">
9                         <th align="left">Title</th>
10                         <th align="left"></th>
11                         <th align="left"></th>
12                         <th align="left"></th>
13                     </tr>
14                         <xsl:for-each select="Item">
15                             <xsl:choose>
16                                 <xsl:when test="Details/ContentType = 'x-container/folder'">
17                                     <tr bgcolor="#bbbbbb">
18                                         <td><a><xsl:attribute name="href"><xsl:value-of select="Links/Content/Url"/></xsl:attribute><xsl:value-of select="Details/Title"/></a></td>
19                                         <td><xsl:value-of select="Details/TotalItems"/> Items</td>
20                                     </tr>
21                                 </xsl:when>
22                                 <xsl:otherwise>
23                                     <tr>
24                                         <td><a><xsl:attribute name="href"><xsl:value-of select="Links/Watch"/></xsl:attribute><xsl:value-of select="Details/Title"/></a></td>
25                                         <td><form action="/TiVoConnect">
26                                             <input type="hidden" name="Command" value="Push"/>
27                                             <input type="hidden" name="Container">
28                                                 <xsl:attribute name="value">
29                                                     <xsl:value-of select="Links/Push/Container"/>
30                                                 </xsl:attribute>
31                                             </input>
32                                             <input type="hidden" name="id">
33                                                 <xsl:attribute name="value">
34                                                     <xsl:value-of select="Links/Push/id"/>
35                                                 </xsl:attribute>
36                                             </input>
38                                             <select name="tsn">
39                                                 <xsl:for-each select="/TiVoContainer/Tivos/Tivo">
40                                                     <option>
41                                                         <xsl:attribute name="value">
42                                                             <xsl:value-of select="."/>
43                                                         </xsl:attribute>
44                                                         <xsl:value-of select="."/>
45                                                     </option>
46                                                 </xsl:for-each>
47                                             </select>
48                                             <input value="Send to TiVo" type="submit"/>
49                                         </form></td>
50                                         <td><a><xsl:attribute name="href"><xsl:value-of select="Links/Content/Url"/></xsl:attribute>Download</a></td>
51                                         <td><a><xsl:attribute name="href"><xsl:value-of select="Links/TiVoVideoDetails/Url"/></xsl:attribute>Details</a></td>
52                                     </tr>   
53                                 </xsl:otherwise>
54                             </xsl:choose>
55                         </xsl:for-each>
56                 </table>
57             </body>
58         </html>
59     </xsl:template>
60 </xsl:stylesheet>