source: documentation/trunk/tutorial_sample_files/custom/gs3-homepage.txt@ 28331

Last change on this file since 28331 was 28331, checked in by jlwhisler, 11 years ago

Updated Homepage tutorial files to use library_name variable instead of hard-coding library. Added an icon for the page. Corrected the AddUser url.

File size: 2.2 KB
Line 
1Step 8:
2
3<xsl:template name="collectionsList">
4 <xsl:for-each select="./page/pageResponse/collectionList/collection">
5 <xsl:variable name="collectionName" select="@name"/>
6 <li>
7 <a href="{$library_name}/collection/{$collectionName}/page/about">
8 <xsl:value-of select="displayItem[@name='name']"/>
9 </a>
10 </li>
11 </xsl:for-each>
12</xsl:template>
13
14
15Step 9:
16
17<xsl:call-template name="collectionsList"/>
18
19Step 11:
20
21<xsl:template name="searchBox">
22<xsl:for-each select="//page/pageResponse/serviceList/service[@name='TextQuery']">
23<form name="QuickSearch" method="get" action="{$library_name}">
24<input type="hidden" name="a" value="q"/>
25<input type="hidden" name="rt" value="rd"/>
26<input type="hidden" name="s" value="{@name}"/>
27<input type="hidden" name="s1.collection" value="all"/>
28<input type="text" name="s1.query" size="20" id="search-text" value="" />
29<input type="submit" id="search-submit">
30<xsl:attribute name="value">
31<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/>
32</xsl:attribute>
33</input>
34</form>
35</xsl:for-each>
36</xsl:template>
37
38
39Step 12:
40
41<xsl:call-template name="searchBox"/>
42
43
44Step 15:
45
46<xsl:template name="loginButton">
47<xsl:variable name="username" select="/page/pageRequest/userInformation/@username"/>
48<xsl:choose>
49<xsl:when test="$username">
50<li><a>
51<xsl:attribute name="href"><xsl:value-of select="$library_name"/>/admin/AccountSettings?s1.username=<xsl:value-of select="$username"/></xsl:attribute><xsl:value-of select="$username"/>
52</a></li>
53<li><a href="{$library_name}/admin/AddUser">Register a new user</a></li>
54<li><a href="{$library_name}/admin/ListUsers">Administration</a></li>
55<li><a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?logout=</xsl:attribute>Logout</a></li>
56</xsl:when>
57<xsl:otherwise>
58<li><a href="?a=p&amp;sa=login&amp;redirectURL={$library_name}%3Fa=p%26sa=home">Login
59<xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'login_tip')"/></xsl:attribute>
60</a></li>
61</xsl:otherwise>
62</xsl:choose>
63</xsl:template>
64
65Step 16:
66
67<xsl:call-template name="loginButton"/>
68
69Step 18:
70
71<xsl:call-template name="siteName"/>
Note: See TracBrowser for help on using the repository browser.