root/main/trunk/greenstone3/web/interfaces/default/transform/pages/help.xsl @ 33140

Revision 26484, 7.2 KB (checked in by kjdon, 7 years ago)

putting lesser used text strings into interface_default2.properties - help and debug pages

Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4    xmlns:java="http://xml.apache.org/xslt/java"
5    xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6    xmlns:gslib="http://www.greenstone.org/skinning"
7    extension-element-prefixes="java util"
8    exclude-result-prefixes="java util">
9
10    <!-- use the 'main' layout -->
11    <xsl:include href="layouts/main.xsl"/>
12  <xsl:variable name="help_interface_name" select="concat($interface_name, '2')"/>
13    <!-- set page title -->
14    <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($help_interface_name, /page/@lang, 'help_b')"/></xsl:template>
15
16    <!-- set page breadcrumbs -->
17    <xsl:template name="breadcrumbs">
18        <gslib:siteLink/><gslib:rightArrow/>
19        <xsl:if test="/page/pageResponse/collection">
20            <gslib:collectionNameLinked/><gslib:rightArrow/>
21        </xsl:if>
22    </xsl:template>
23
24    <!-- the page content -->
25    <xsl:template match="page">
26        <xsl:call-template name="helpTopics"/>
27        <xsl:choose>
28      <xsl:when test="/page/pageResponse/collection">
29            <xsl:call-template name="findingInformationHelp"/>
30    </xsl:when>
31      <xsl:otherwise>
32    <xsl:call-template name="homePageHelp"/>
33    </xsl:otherwise>
34        </xsl:choose>
35        <xsl:call-template name="readingDocsHelp"/>
36        <xsl:call-template name="searchingHelp"/>
37        <xsl:call-template name="preferencesHelp"/>
38    </xsl:template>
39   
40    <xsl:template name="helpTopics">
41       
42    </xsl:template>
43
44  <xsl:template name="homePageHelp">
45    home page help
46  </xsl:template>
47    <xsl:template name="findingInformationHelp">
48        <xsl:variable name="searchEnabled">
49            <xsl:choose>
50                <xsl:when test="/page/pageResponse/collection[@name=$collName]/serviceList/service[@type='query']">1</xsl:when>
51                <xsl:otherwise>0</xsl:otherwise>
52            </xsl:choose>
53        </xsl:variable>
54       
55        <xsl:variable name="numClassifiers">
56            <xsl:value-of select="count(/page/pageResponse/collection[@name=$collName]/serviceList/service[@name = 'ClassifierBrowse']/classifierList/classifier)"/>
57        </xsl:variable>
58
59        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.findinginformationtitle')"/>
60        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.findinginformation', $searchEnabled + $numClassifiers)"/>
61       
62        <!-- using actual <ul> and <li> tags here would cause the XML parser to break -->
63        <xsl:text disable-output-escaping="yes">&lt;ul&gt;</xsl:text>
64        <xsl:if test="$searchEnabled = 1">
65            <xsl:text disable-output-escaping="yes">&lt;li&gt;</xsl:text>
66            <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.searchdesc')"/>
67            <xsl:text disable-output-escaping="yes">&lt;/li&gt;</xsl:text>
68        </xsl:if>
69       
70        <xsl:for-each select="/page/pageResponse/collection[@name=$collName]/serviceList/service[@name = 'ClassifierBrowse']/classifierList/classifier">
71            <xsl:text disable-output-escaping="yes">&lt;li&gt;</xsl:text>
72            <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.browsedesc', ./displayItem[@name = 'name'])"/>
73            <xsl:text disable-output-escaping="yes">&lt;/li&gt;</xsl:text>
74        </xsl:for-each>
75        <xsl:text disable-output-escaping="yes">&lt;/ul&gt;</xsl:text>
76    </xsl:template>
77   
78    <xsl:template name="readingDocsHelp">
79        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.readingdocstitle')"/>
80        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.readingdocs')"/>
81       
82        <table>
83            <tr>
84                <td colspan="2"><img src="interfaces/default/images/bookshelf.png"/></td>
85                <td><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.openbookshelf')"/></td>
86            </tr>
87            <tr>
88                <td><img src="interfaces/default/images/previous.png"/></td>
89                <td><img src="interfaces/default/images/next.png"/></td>
90                <td><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.sectionarrows')"/></td>
91            </tr>
92        </table>
93    </xsl:template>
94   
95    <xsl:template name="searchingHelp">
96        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.searchingtitle')"/>
97        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.searching')"/>
98       
99        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.querytermstitle')"/>
100        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.queryterms')"/>
101       
102        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.querytypetitle')"/>
103        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.querytype')"/>
104       
105        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.queryscopetitle')"/>
106        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.queryscope')"/>
107    </xsl:template>
108   
109    <xsl:template name="preferencesHelp">
110        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.changingpreferencestitle')"/>
111        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.changingpreferences')"/>
112       
113        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.collectionpreferencestitle')"/>
114        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.collectionpreferences')"/>
115       
116        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.languagepreferencestitle')"/>
117        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.languagepreferences')"/>
118       
119        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.presentationpreferencestitle')"/>
120        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.presentationpreferences')"/>
121       
122        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.searchpreferencestitle')"/>
123        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.searchpreferences1')"/>
124        <xsl:if test="/page/pageResponse/collection[@name=$collName and (@type='mgpp' or @type='mg')]">
125            <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.mgsearchpreferences')"/>
126        </xsl:if>
127        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.searchpreferences2')"/>
128    </xsl:template>
129</xsl:stylesheet>
Note: See TracBrowser for help on using the browser.