Changeset 19988 for greenstone3/trunk


Ignore:
Timestamp:
2009-07-14T09:09:40+12:00 (15 years ago)
Author:
oranfry
Message:

checking in a batch of changes to the oran skin. more work yet to do.

Location:
greenstone3/trunk/web/interfaces/oran
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/oran/interfaceConfig.xml

    r19858 r19988  
    1616    <action name='a' class='AppletAction' xslt='applet.xsl'/>
    1717    <action name='xd' class='XMLDocumentAction'>
    18       <subaction name='toc' xslt='document-toc.xsl'/>
    19       <subaction name='text' xslt='document-content.xsl'/>
     18      <subaction name='toc' xslt='gberg/document-toc.xsl'/>
     19      <subaction name='text' xslt='gberg/document-content.xsl'/>
    2020    </action>
    2121    <action name='pr' class='ProcessAction' xslt='process.xsl'/>
    2222    <action name='s' class='SystemAction' xslt='system.xsl'/>
    2323    <action name='g' class='GeneralAction'>
    24       <subaction name="authen" xslt='authen.xsl'/>
     24      <subaction name="authen" xslt='pages/authen.xsl'/>
    2525      <subaction name="berry" xslt='pages/berry.xsl'/>
    2626    </action>
  • greenstone3/trunk/web/interfaces/oran/style/core.css

    r19855 r19988  
     1html {
     2    height: 100%;
     3    margin-bottom: 1px;
     4}
    15body {
    26    font-family: sans-serif;
     
    913    position: relative;
    1014    margin: 0 auto 20px auto;
    11     max-width: 1200px;
     15    max-width: 1000px;
    1216    padding: 0;
    1317    line-height: 160%;
     
    2832    background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top;
    2933    padding: 10px 20px 30px 20px;
     34    min-height: 80px;
    3035    max-height: 110px;
    3136    position: relative;
     
    8287
    8388
     89
    8490/* some text should not be rendered as it is just there for search engines */
    8591#collectionLinks a b {
     
    8894
    8995/* make sure h1s and h2s are readable on the green banner */
    90 #banner h1, #banner h2, #banner h1 a, #banner h2 a {
    91     color: #fff;
    92     text-decoration: none;
    93 }
    94 
    95 #banner h1 {
    96     font-size: 16px;
     96#breadcrumbs, #banner h2, #breadcrumbs a, #banner h2 a {
     97    color: #fff;
     98}
     99body.dAction #banner h2 {
     100    max-width: 600px;
     101    font-size: 100%;
     102}
     103
     104#breadcrumbs {
    97105    margin: 0 0 10px 0;
     106    height: 30px;
     107    line-height: 30px;
    98108}
    99109#banner h2 {
     
    148158    right: 0;
    149159    padding: 0 15px 0 0;
     160    text-transform: lowercase;
    150161}
    151162
     
    218229}
    219230
    220 /* style the classifier results */
    221 #classifierResults {
     231/* style the search and classifier results */
     232#results {
    222233    margin: 0;
    223234    padding: 0;
     
    225236}
    226237
    227 #classifierResults ul {
     238#results ul {
    228239    margin: 0 0 0 20px;
    229240    padding: 0;
    230241}
    231242
    232 #classifierResults li {
     243#results li {
    233244    list-style: none;
    234245    margin: 0 0 .2em 0;
     
    236247}
    237248
    238 #classifierResults li a {
     249#results li a {
    239250    padding: 3px 3px 3px 28px;
    240251    background-repeat: no-repeat;
     
    243254
    244255
    245 #classifierResults .document a { background-image: url('../images/book.png'); }
    246 #classifierResults .document a:visited { background-image: url('../images/book-visited.png'); color: #999; }
    247 
    248 #classifierResults .shelf>a { background-image: url('../images/bookshelf.png'); }
     256#results .document a { background-image: url('../images/book.png'); }
     257#results .document a:visited { background-image: url('../images/book-visited.png'); color: #999; }
     258
     259#results .shelf>a { background-image: url('../images/bookshelf.png'); }
    249260
    250261/* corners of the banner */
     
    666677}
    667678
     679/* -------- SEARCH ------- */
     680.paramLabel {
     681    float: left;
     682    min-width: 250px;
     683}
     684.paramValue {
     685    float: left;
     686}
     687
     688
     689table{
     690    border-collapse:collapse;border-spacing:0;
     691}
     692
  • greenstone3/trunk/web/interfaces/oran/transform/layouts/main.xsl

    r19856 r19988  
    88    exclude-result-prefixes="util java util">
    99
    10     <!-- the name of the site -->
    11     <xsl:template name="site-title">My Greenstone Library</xsl:template>
    12     <xsl:template name="site-linked-title"><a href="./">My Greenstone Library</a></xsl:template>
     10    <!-- put the URL or path of your site here site -->
     11    <!-- eg 'http://www.example.com/mysite' or '/mysite'  -->
     12    <xsl:template name="siteURL">/</xsl:template>
     13
    1314
    1415    <!-- the output format for this layout is html -->
     
    2122
    2223            <head>
    23                 <title><xsl:call-template name="title"/> :: <xsl:call-template name="site-title"/></title>
     24                <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
    2425                <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
    2526                <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script>
     
    2728            </head>
    2829           
    29             <body><xsl:call-template name="textDirectionAttribute"/>
     30            <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
     31
     32                <xsl:call-template name="displayErrorsIfAny"/>
    3033
    3134                <div id="container"><div id="container2"><div id="container3"><div id="container4">
    32                     <xsl:call-template name="displayErrorsIfAny"/>
    3335
    3436                    <div id="banner">
    3537
    3638                        <!-- show the title -->
    37                         <h1><xsl:call-template name="site-linked-title"/> /</h1>
    38                         <h2><xsl:call-template name="linked-title"/></h2>
     39                        <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
     40                        <h2><xsl:call-template name="pageTitle"/></h2>
    3941
    4042                        <!-- show home, help, preferences links -->
     
    4951                            </li>
    5052
    51                             <!-- help
     53                            <!-- help -->
    5254                            <li>
    5355                                <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
     
    5658                                </a>
    5759                            </li>
    58                              -->
    5960
    60                             <!-- home
    6161                            <li>
    6262                                <a href="{$library_name}?a=p&amp;amp;sa=home">
     
    6565                                </a>
    6666                            </li>
    67                              -->
    6867
    6968                        </ul>           
     
    8685                        -->
    8786                        <xsl:apply-templates select="/page"/>
     87
    8888                    </div>
    8989
  • greenstone3/trunk/web/interfaces/oran/transform/pages/about.xsl

    r19856 r19988  
    88    exclude-result-prefixes="java util">
    99
    10     <!-- set to the oran layout -->
     10    <!-- use the 'main' layout -->
    1111    <xsl:include href="layouts/main.xsl"/>
    1212
    13     <xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>
    14     <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><gslib:collectionName/></xsl:template>
    1515
    16     <!-- <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template> -->
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
    1718
     19    <!-- the page content -->
    1820    <xsl:template match="/page">
    1921 
  • greenstone3/trunk/web/interfaces/oran/transform/pages/berry.xsl

    r19856 r19988  
    88    exclude-result-prefixes="java util">
    99
    10     <!-- make this page use the 'main' layout -->
     10    <!-- use the 'main' layout -->
    1111    <xsl:include href="layouts/main.xsl"/>
    1212
    13     <!-- set page title and subtitle-->
    14     <xsl:template name="title"><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/> Berry Basket</xsl:template>
    15     <xsl:template name="linked-title"><a href=""><xsl:value-of select="/page/pageResponse/serviceCluster/metadataList/metadata[@name='Title']"/> Berry Basket</a></xsl:template>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/></xsl:template>
    1615
    17     <!-- the main page layout template is here -->
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     18
     19    <!-- the page content -->
    1820    <xsl:template match="/page">
    1921        <xsl:variable name="clusterName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    2022        <script type="text/javascript" src="/interfaces/oran/js/berrycheckout.js"><xsl:text> </xsl:text></script>
    2123        <script type="text/javascript">
     24            <xsl:text> </xsl:text>
    2225            <xsl:for-each select="/page/pageResponse/collection/item">
    2326                <xsl:text disable-output-escaping="yes">var doc = new Array();
  • greenstone3/trunk/web/interfaces/oran/transform/pages/classifier.xsl

    r19856 r19988  
    88    exclude-result-prefixes="java util">
    99   
    10     <xsl:include href=".old/berrytools.xsl"/>
    11 
    12     <!-- make this page use the 'main' layout -->
     10    <!-- use the 'main' layout -->
    1311    <xsl:include href="layouts/main.xsl"/>
    1412
    15     <!-- set page title and subtitle-->
    16     <xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>
    17     <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
    1815
    19     <!-- the page content is here -->
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
     18
     19    <!-- the page content -->
    2020    <xsl:template match="/page/pageResponse">
    2121
     
    4343            the two templates at the bottom of this file
    4444        -->
    45         <ul id="classifierResults">
     45        <ul id="results">
    4646            <xsl:apply-templates select="classifier/*"/>
    4747        </ul>
  • greenstone3/trunk/web/interfaces/oran/transform/pages/document.xsl

    r19856 r19988  
    1212    <xsl:include href=".old/berrytools.xsl"/>
    1313
    14     <!-- make this page use the 'main' layout -->
     14    <!-- use the 'main' layout -->
    1515    <xsl:include href="layouts/main.xsl"/>
    1616
    17     <!-- set page title and subtitle-->
    18     <xsl:template name="title"><gslib:collectionName/></xsl:template>
    19     <xsl:template name="linked-title"><a><xsl:attribute name="href">/<xsl:value-of select="collection/@name"/></xsl:attribute><gslib:collectionName/></a></xsl:template>
     17    <!-- set page title -->
     18    <xsl:template name="pageTitle"><gslib:documentTitle/></xsl:template>
    2019
     20    <!-- set page breadcrumbs -->
     21    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     22
     23    <!-- the page content -->
    2124    <xsl:template match="/page/pageResponse/document">
    2225
     
    5962                <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    6063
     64                <!--
    6165                <div id="documentheading">
    6266
    63                     <!--<a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>-->
     67                    <!- -<a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>- ->
    6468
    6569                    <xsl:choose>
     
    6973
    7074                </div>
     75                -->
    7176
    7277                <div class="documenttext">
     
    102107        <!-- formulate the link -->
    103108        <xsl:variable name="contentsLink">
    104             <xsl:value-of select='$library_name'/>?
    105             a=d&amp;
    106             c=<gslib:collectionShortName/>&amp;
    107             d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;
    108             sib=1&amp;
    109             <!--<xsl:if test="string($ec) = '1'">ec=1&amp;</xsl:if>
     109            <xsl:value-of select='$library_name'/>?a=d&amp;c=<gslib:collectionNameShort/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<!--&amp;<xsl:if test="string($ec) = '1'">ec=1&amp;</xsl:if>
    110110            p.a=<xsl:value-of select="$p.a"/>&amp;
    111111            p.sa=<xsl:value-of select="$p.sa"/>&amp;
  • greenstone3/trunk/web/interfaces/oran/transform/pages/help.xsl

    r19856 r19988  
    11<?xml version="1.0" encoding="ISO-8859-1"?>
    22<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   extension-element-prefixes="java util"
    7   exclude-result-prefixes="java util">
    8  
    9     <!-- choose the main layout -->
     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 -->
    1011    <xsl:include href="layouts/main.xsl"/>
    1112
    12     <!-- title -->
    13     <xsl:template name="title">Help</xsl:template>
    14     <xsl:template name="linked-title">Help</xsl:template>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></xsl:template>
    1515
    16     <!-- the main page layout template is here -->
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     18
     19    <!-- the page content -->
    1720    <xsl:template match="page">
    1821        Help text goes here
    1922    </xsl:template>
    20  
    21  
    2223</xsl:stylesheet>
  • greenstone3/trunk/web/interfaces/oran/transform/pages/home.xsl

    r19856 r19988  
    66    xmlns:gslib="http://www.greenstone.org/skinning"
    77    extension-element-prefixes="java util"
    8     exclude-result-prefixes="util java util">
     8    exclude-result-prefixes="java util">
    99
    10     <!-- make this page use the 'main' layout -->
     10    <!-- use the 'main' layout -->
    1111    <xsl:include href="layouts/main.xsl"/>
    1212
    13     <!-- set page title and subtitle-->
    14     <xsl:template name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_t')"/></xsl:template>
    15     <xsl:template name="linked-title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_t')"/></xsl:template>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><gslib:siteName/></xsl:template>
    1615
    17     <!-- the page content is here -->
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"></xsl:template>
     18
     19    <!-- the page content -->
    1820    <xsl:template match="/page/pageResponse">
    1921
  • greenstone3/trunk/web/interfaces/oran/transform/pages/pref.xsl

    r19856 r19988  
    44    xmlns:java="http://xml.apache.org/xslt/java"
    55    xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
     6    xmlns:gslib="http://www.greenstone.org/skinning"
    67    extension-element-prefixes="java util"
    78    exclude-result-prefixes="java util">
    89 
    9     <!-- style includes global params interface_name, library_name -->
    10     <xsl:include href=".old/style.xsl"/>
    11 
    12     <!-- make this page use the 'main' layout -->
     10    <!-- use the 'main' layout -->
    1311    <xsl:include href="layouts/main.xsl"/>
    1412
    15     <!-- set page title and subtitle-->
    16     <xsl:template name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template>
    17     <xsl:template name="linked-title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></xsl:template>
    1815
    19     <!-- the page content is here -->
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     18
     19    <!-- the page content -->
    2020    <xsl:template match="/page">
    2121
     
    3232                <!-- presentation preferences -->
    3333                <h3 class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></h3>
    34                 <ul id="presprefs">
    35                     <li>
     34                <div id="presprefs">
     35
     36                    <!-- language -->
     37                    <div class="paramLabel">
    3638                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/>
     39                    </div>
     40                    <div class="paramValue">
    3741                        <select name="l">
    3842                            <xsl:for-each select="/page/pageResponse/languageList/language">
     
    4145                        </select>
    4246
    43                     </li>
    44                     <li>
     47                    </div>
     48                    <br class="clear"/>
     49
     50                    <!-- encoding -->
     51                    <div class="paramValue">
    4552                        <span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>
    46                     </li>
    47                 </ul>
     53                    </div>
     54                    <br class="clear"/>
     55
     56                </div>
    4857
    4958                <!-- berry baskets -->
    50                 <ul id="berrybasketprefs">
     59                <div id="berrybasketprefs">
    5160                    <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
    52                     <li>
     61                    <div class="paramLabel">
    5362                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/>
     63                    </div>
     64                    <div class="paramValue">
    5465                        <select name="berrybasket">
    5566                            <option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option>
    5667                            <option value="off"><xsl:if test="$berrybasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
    5768                        </select>
    58                     </li>
    59                 </ul>
     69                    </div>
     70                    <br class="clear"/>
     71                </div>
    6072
    6173                <!-- tidy (?) -->
    6274                <xsl:if test="$tidyoption='tidy'">
    6375                    <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable>
    64                     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book">
    65                         <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option>
    66                         <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
    67                     </select>
     76                    <div class="paramLabel">
     77                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/>
     78                    </div>
     79                    <div class="paramValue">
     80                        <select name="book">
     81                            <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option>
     82                            <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option>
     83                        </select>
     84                    </div>
     85                    <br class="clear"/>
    6886                </xsl:if>
    6987
    7088                <!-- search preferences -->
    7189                <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></h3>
    72                 <ul id="searchprefs">
     90                <div id="searchprefs">
    7391                    <xsl:variable name="hits"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/></xsl:when><xsl:otherwise>20</xsl:otherwise></xsl:choose></xsl:variable>
    74                     <li>
    75                         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/>
     92                    <div class="paramLabel">
     93                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/>
     94                    </div>
     95                    <div class="paramValue">
    7696                        <select name="hitsPerPage">
    7797                            <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
     
    80100                            <option value="-1"><xsl:if test="$hits=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
    81101                        </select>
    82                     </li>
    83                 </ul>
     102                    </div>
     103                    <br class="clear"/>
     104                </div>
     105
     106                <br/>
    84107
    85108                <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
  • greenstone3/trunk/web/interfaces/oran/transform/pages/query.xsl

    r19856 r19988  
    88    exclude-result-prefixes="java util">
    99   
    10     <!-- make this page use the 'main' layout -->
     10    <!-- use the 'main' layout -->
    1111    <xsl:include href="layouts/main.xsl"/>
    1212
    13     <!-- set page title and subtitle-->
    14     <xsl:template name="title"><gslib:aboutCollectionPageTitle/></xsl:template>
    15     <xsl:template name="linked-title"><a href=""><gslib:aboutCollectionPageTitle/></a></xsl:template>
    16 
    17     <!-- the main page layout template is here -->
    18     <xsl:template match="/page/pageResponse/service">
    19 
    20         <form name="QueryForm" method="get" action="{$library_name}">
    21             <div>
    22                 <input type="hidden" name="a" value="q"/>
    23                 <input type="hidden" name="sa"><xsl:attribute name="value"><xsl:value-of select="/page/pageRequest/@subaction"/></xsl:attribute></input>
    24                 <input type="hidden" name="rt" value="rd"/>
    25                 <input type="hidden" name="s" value="{@name}"/>
    26                 <input type="hidden" name="c" value="{$collName}"/>
    27                 <xsl:if test="not(paramList/param[@name='startPage'])">
    28                     <input type="hidden" name="startPage" value="1"/>
    29                 </xsl:if>
    30 
    31                 <xsl:apply-templates select="paramList"/>
    32 
    33                 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
     13    <!-- set page title -->
     14    <xsl:template name="pageTitle"><gslib:serviceName/></xsl:template>
     15
     16    <!-- set page breadcrumbs -->
     17    <xsl:template name="breadcrumbs"> <gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
     18
     19    <!-- the page content -->
     20    <xsl:template match="/page">
     21        <xsl:choose>
     22            <xsl:when test="not(pageResponse/documentNodeList)">
     23                <xsl:for-each select="pageResponse/service">
     24                    <form name="QueryForm" method="get" action="{$library_name}">
     25                        <div>
     26                            <input type="hidden" name="a" value="q"/>
     27                            <input type="hidden" name="sa"><xsl:attribute name="value"><xsl:value-of select="/page/pageRequest/@subaction"/></xsl:attribute></input>
     28                            <input type="hidden" name="rt" value="rd"/>
     29                            <input type="hidden" name="s" value="{@name}"/>
     30                            <input type="hidden" name="c" value="{$collName}"/>
     31                            <xsl:if test="not(paramList/param[@name='startPage'])">
     32                                <input type="hidden" name="startPage" value="1"/>
     33                            </xsl:if>
     34
     35                            <xsl:variable name="ns">s1.</xsl:variable>
     36                            <xsl:for-each select="paramList/param">
     37                                <xsl:choose>
     38                                    <xsl:when test="@type='multi'">
     39                                        <xsl:apply-templates select="."><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
     40                                    </xsl:when>
     41                                    <xsl:otherwise>
     42                                        <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
     43                                        <div class="paramLabel"><xsl:value-of select="displayItem[@name='name']"/></div>
     44                                        <div class="paramValue">
     45                                            <xsl:apply-templates select=".">
     46                                                <xsl:with-param name="default" select="$pvalue"/>
     47                                                <xsl:with-param name="ns" select="$ns"/>
     48                                            </xsl:apply-templates>
     49                                        </div>
     50                                        <br class="clear"/>
     51                                    </xsl:otherwise>
     52                                </xsl:choose>
     53                            </xsl:for-each>
     54
     55                            <br/>
     56
     57                            <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input>
    3458           
    35             </div>
    36         </form>
    37 
    38         <xsl:if test="contains(/page/pageRequest/paramList/param[@name='rt']/@value, 'r')">
    39             <xsl:call-template name="query-response">
    40                 <xsl:with-param name="collName" select="$collName"/>
    41             </xsl:call-template>
     59                        </div>
     60                    </form>
     61                    <xsl:if test="contains(/page/pageRequest/paramList/param[@name='rt']/@value, 'r')">
     62                        <xsl:call-template name="query-response">
     63                            <xsl:with-param name="collName" select="$collName"/>
     64                        </xsl:call-template>
     65                    </xsl:if>
     66
     67                </xsl:for-each>
     68
     69            </xsl:when>
     70
     71            <xsl:otherwise>
     72               
     73                <ul id="results">
     74                    <xsl:for-each select="pageResponse/documentNodeList/documentNode">
     75                        <li class="document">
     76                            <a>
     77                                <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
     78                                <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
     79                            </a>
     80                            <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
     81                        </li>
     82                    </xsl:for-each>
     83                </ul>
     84            </xsl:otherwise>
     85
     86        </xsl:choose>
     87
     88    </xsl:template>
     89
     90 
     91    <!-- puts all the params into a=p&p=h type form - need to change this if use
     92    multi params  -->
     93    <xsl:template match="paramList" mode="cgi">
     94        <xsl:param name="ns">s1.</xsl:param>
     95        <xsl:for-each select="param">
     96            <xsl:variable name='pname' select="@name"/>
     97            <xsl:text>&amp;</xsl:text><xsl:value-of select="$ns"/><xsl:value-of select="@name"/>=<xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name='ns' select='$ns'/></xsl:apply-templates>
     98        </xsl:for-each>
     99    </xsl:template>
     100
     101    <xsl:template match="param" mode="calculate-default">
     102        <xsl:param name="ns">s1.</xsl:param>
     103        <xsl:variable name="pname"><xsl:value-of select="$ns"/><xsl:value-of select="@name"/></xsl:variable>
     104        <xsl:choose>
     105            <xsl:when test="/page/pageRequest/paramList/param[@name=$pname]">
     106                <xsl:choose>
     107                    <xsl:when test="@type='enum_multi'"><xsl:text>,</xsl:text>
     108                        <xsl:for-each select="/page/pageRequest/paramList/param[@name=$pname]">
     109                            <xsl:value-of select="@value"/>,
     110                        </xsl:for-each>
     111                    </xsl:when>
     112                    <xsl:otherwise>
     113                        <xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
     114                    </xsl:otherwise>
     115                </xsl:choose>
     116            </xsl:when>
     117            <xsl:otherwise>
     118                <xsl:value-of select="@default"/>
     119            </xsl:otherwise>
     120        </xsl:choose>
     121    </xsl:template>
     122
     123    <!-- invisible params - used by other stuff. in the query form, we set to teh default -->
     124    <xsl:template match="param[@type='invisible']">
     125        <xsl:param name="ns">s1.</xsl:param>
     126        <input type='hidden' name='{$ns}{@name}' value='{@default}'/>
     127    </xsl:template>
     128
     129    <!-- boolean params -->
     130    <xsl:template match="param[@type='boolean']">
     131        <xsl:param name="ns">s1.</xsl:param>
     132        <xsl:param name="default"/>
     133        <select name='{$ns}{@name}'>
     134            <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option>
     135            <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option>
     136        </select>
     137    </xsl:template>
     138
     139    <!-- integer params -->
     140    <xsl:template match="param[@type='integer']">
     141        <xsl:param name="ns">s1.</xsl:param>
     142        <xsl:param name="default"/>
     143        <input type="text" name="{$ns}{@name}" size="3" value="{$default}"/>
     144    </xsl:template>
     145
     146    <!-- single selection enum params -->
     147    <xsl:template match="param[@type='enum_single']">
     148        <xsl:param name="ns">s1.</xsl:param>
     149        <xsl:param name="default"/>
     150        <xsl:choose>
     151            <xsl:when test="count(option) = 1">
     152                <xsl:value-of select="option/displayItem[@name='name']"/>
     153                <input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of  select='option/@name'/></xsl:attribute></input>
     154            </xsl:when>
     155            <xsl:otherwise>
     156                <select name="{$ns}{@name}">
     157                    <xsl:for-each select="option">
     158                        <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
     159                    </xsl:for-each>
     160                </select>
     161            </xsl:otherwise>
     162        </xsl:choose>
     163    </xsl:template>
     164
     165
     166    <!-- multiple selection enum params -->
     167    <!-- how to do defaults for this?? -->
     168    <xsl:template match="param[@type='enum_multi']">
     169        <xsl:param name="ns">s1.</xsl:param>
     170        <xsl:param name="default"/>
     171        <select name="{$ns}{@name}" size="2">
     172            <xsl:attribute name="multiple"></xsl:attribute>
     173            <xsl:for-each select="option">
     174                <option value="{@name}"><xsl:if test="contains($default, concat(',', @name, ','))"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
     175            </xsl:for-each>
     176        </select>
     177    </xsl:template>
     178
     179    <!-- string params -->
     180    <xsl:template match="param[@type='string']">
     181        <xsl:param name="ns">s1.</xsl:param>
     182        <xsl:param name="default"/>
     183        <input type="text" name="{$ns}{@name}" size="30" value="{$default}"/>
     184    </xsl:template>
     185
     186    <!-- large string  params -->
     187    <xsl:template match="param[@type='text']">
     188        <xsl:param name="ns">s1.</xsl:param>
     189        <xsl:param name="default"/>
     190        <textarea name="{$ns}{@name}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea>
     191    </xsl:template>
     192
     193    <!-- multi params - params that are combinations of other params -->
     194    <xsl:template match="param[@type='multi']">
     195        <xsl:param name="ns">s1.</xsl:param>
     196        <xsl:variable name="parent" select="@name"/>
     197
     198        <table>
     199            <tr class="queryfieldheading">
     200                <xsl:value-of select="displayItem[@name='name']"/>
     201                <xsl:for-each select="param">
     202                    <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
     203                </xsl:for-each>
     204            </tr>
     205            <xsl:apply-templates select="." mode="contents">
     206                <xsl:with-param name="occurs" select="@occurs"/>
     207                <xsl:with-param name="ns" select="$ns"/>
     208            </xsl:apply-templates>
     209        </table>
     210
     211    </xsl:template>
     212
     213    <xsl:template match="param[@type='multi']" mode="contents">
     214        <xsl:param name="ns">s1.</xsl:param>
     215        <xsl:param name="occurs">1</xsl:param>
     216        <xsl:variable name="pos" select="@occurs - $occurs"/>   
     217        <tr class="queryfieldrow">
     218            <xsl:for-each select="param">
     219                <xsl:variable name="pname" select="@name"/>
     220                <xsl:variable name="values" select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
     221                <td class="queryfieldcell">
     222                    <xsl:choose>
     223                        <xsl:when test="not(@ignore) or  @ignore != $pos">     
     224                            <xsl:apply-templates select="."><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($values, $pos)"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
     225                        </xsl:when>
     226                        <xsl:otherwise><!-- put in a hidden placeholder -->
     227                            <input type="hidden" name='{$ns}{@name}' value=''/>
     228                        </xsl:otherwise>
     229                    </xsl:choose>
     230                </td>
     231            </xsl:for-each>
     232        </tr>
     233
     234        <!-- recursively call this template to get multiple entries -->
     235        <xsl:if test="$occurs &gt; 1">
     236            <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="$occurs - 1"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    42237        </xsl:if>
    43 
    44     </xsl:template>
    45 
    46     <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/service"/></xsl:template>
    47 
    48 
    49   <!-- the default param list handling -->
    50   <xsl:template match="paramList">
    51     <xsl:param name="ns">s1.</xsl:param>
    52     <ul id="queryitemlist">
    53       <xsl:for-each select="param">
    54     <xsl:choose>
    55       <xsl:when test="@type='multi'">
    56         <li><xsl:apply-templates select='.'><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
    57       </xsl:when>
    58       <xsl:otherwise>
    59         <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
    60         <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li>
    61       </xsl:otherwise>
    62     </xsl:choose>
    63       </xsl:for-each>
    64     </ul>
    65   </xsl:template>
    66  
    67   <!-- puts all the params into a=p&p=h type form - need to change this if use
    68   multi params  -->
    69   <xsl:template match="paramList" mode="cgi">
    70     <xsl:param name="ns">s1.</xsl:param>
    71     <xsl:for-each select="param">
    72       <xsl:variable name='pname' select="@name"/>
    73       <xsl:text>&amp;</xsl:text><xsl:value-of select="$ns"/><xsl:value-of select="@name"/>=<xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name='ns' select='$ns'/></xsl:apply-templates>
    74     </xsl:for-each>
    75   </xsl:template>
    76 
    77   <xsl:template match="param" mode="calculate-default">
    78     <xsl:param name="ns">s1.</xsl:param>
    79     <xsl:variable name="pname"><xsl:value-of select="$ns"/><xsl:value-of select="@name"/></xsl:variable>
    80     <xsl:choose>
    81       <xsl:when test="/page/pageRequest/paramList/param[@name=$pname]">
    82     <xsl:choose>
    83       <xsl:when test="@type='enum_multi'"><xsl:text>,</xsl:text>
    84         <xsl:for-each select="/page/pageRequest/paramList/param[@name=$pname]">
    85           <xsl:value-of select="@value"/>,
    86         </xsl:for-each>
    87       </xsl:when>
    88       <xsl:otherwise>
    89         <xsl:value-of select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
    90       </xsl:otherwise>
    91     </xsl:choose>
    92       </xsl:when>
    93       <xsl:otherwise>
    94     <xsl:value-of select="@default"/>
    95       </xsl:otherwise>
    96     </xsl:choose>
    97   </xsl:template>
    98 
    99   <!-- invisible params - used by other stuff. in the query form, we set to teh default -->
    100   <xsl:template match="param[@type='invisible']">
    101     <xsl:param name="ns">s1.</xsl:param>
    102     <input type='hidden' name='{$ns}{@name}' value='{@default}'/>
    103   </xsl:template>
    104   <!-- boolean params -->
    105   <xsl:template match="param[@type='boolean']">
    106     <xsl:param name="ns">s1.</xsl:param>
    107     <xsl:param name="default"/>
    108     <select name='{$ns}{@name}'>
    109       <option value="0"><xsl:if test="$default='0'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='0']/displayItem[@name='name']"/></option>
    110       <option value="1"><xsl:if test="$default='1'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="option[@name='1']/displayItem[@name='name']"/></option>
    111     </select>
    112   </xsl:template>
    113  
    114   <!-- integer params -->
    115   <xsl:template match="param[@type='integer']">
    116     <xsl:param name="ns">s1.</xsl:param>
    117     <xsl:param name="default"/>
    118     <input type="text" name="{$ns}{@name}" size="3" value="{$default}"/>
    119   </xsl:template>
    120 
    121   <!-- single selection enum params -->
    122   <xsl:template match="param[@type='enum_single']">
    123     <xsl:param name="ns">s1.</xsl:param>
    124     <xsl:param name="default"/>
    125     <xsl:choose>
    126       <xsl:when test="count(option) = 1">
    127     <xsl:value-of select="option/displayItem[@name='name']"/>
    128     <input type='hidden' name='{$ns}{@name}'><xsl:attribute name='value'><xsl:value-of  select='option/@name'/></xsl:attribute></input>
    129       </xsl:when>
    130       <xsl:otherwise>
    131     <select name="{$ns}{@name}">
    132       <xsl:for-each select="option">
    133         <option value="{@name}"><xsl:if test="@name=$default"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
    134       </xsl:for-each>
    135     </select>
    136       </xsl:otherwise>
    137     </xsl:choose>
    138   </xsl:template>
    139 
    140 
    141   <!-- multiple selection enum params -->
    142   <!-- how to do defaults for this?? -->
    143   <xsl:template match="param[@type='enum_multi']">
    144     <xsl:param name="ns">s1.</xsl:param>
    145     <xsl:param name="default"/>
    146     <select name="{$ns}{@name}" size='2'><xsl:attribute name="multiple"></xsl:attribute>
    147       <xsl:for-each select="option">
    148     <option value="{@name}"><xsl:if test="contains($default, concat(',', @name, ','))"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option>
    149       </xsl:for-each>
    150     </select>
    151   </xsl:template>
    152  
    153   <!-- string params -->
    154   <xsl:template match="param[@type='string']">
    155     <xsl:param name="ns">s1.</xsl:param>
    156     <xsl:param name="default"/>
    157     <input type="text" name="{$ns}{@name}" size="50" value="{$default}"/>
    158   </xsl:template>
    159  
    160   <!-- large string  params -->
    161   <xsl:template match="param[@type='text']">
    162     <xsl:param name="ns">s1.</xsl:param>
    163     <xsl:param name="default"/>
    164     <textarea name="{$ns}{@name}" cols="50" rows="3"><xsl:value-of select='$default'/></textarea>
    165   </xsl:template>
    166 
    167   <!-- multi params - params that are combinations of other params -->
    168   <xsl:template match="param[@type='multi']">
    169     <xsl:param name="ns">s1.</xsl:param>
    170     <xsl:variable name="parent" select="@name"/>
    171     <table>
    172       <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/>
    173         <xsl:for-each select="param">
    174       <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td>
    175     </xsl:for-each>
    176       </tr>
    177      
    178       <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    179     </table>
    180   </xsl:template>
    181 
    182   <xsl:template match="param[@type='multi']" mode="contents">
    183     <xsl:param name="ns">s1.</xsl:param>
    184     <xsl:param name="occurs">1</xsl:param>
    185     <xsl:variable name="pos" select="@occurs - $occurs"/>   
    186     <tr class="queryfieldrow"><xsl:for-each select="param">
    187     <xsl:variable name="pname" select="@name"/>
    188     <xsl:variable name="values" select="/page/pageRequest/paramList/param[@name=$pname]/@value"/>
    189     <td class="queryfieldcell"><xsl:choose>
    190         <xsl:when test="not(@ignore) or  @ignore != $pos">     
    191           <xsl:apply-templates select='.'><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.getNumberedItem($values, $pos)"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    192         </xsl:when>
    193         <xsl:otherwise><!-- put in a hidden placeholder -->
    194           <input type="hidden" name='{$ns}{@name}' value=''/>
    195         </xsl:otherwise>
    196       </xsl:choose></td>
    197       </xsl:for-each></tr>
    198     <!-- recursively call this template to get multiple entries -->
    199     <xsl:if test="$occurs &gt; 1">
    200       <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="$occurs - 1"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    201     </xsl:if>
    202   </xsl:template>
    203 
     238    </xsl:template>
    204239
    205240</xsl:stylesheet>
  • greenstone3/trunk/web/interfaces/oran/transform/util.xsl

    r19856 r19988  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <xsl:stylesheet version="1.0" 
    3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
     2<xsl:stylesheet version="1.0"
     3    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    44    xmlns:gslib="http://www.greenstone.org/XSL/Library"
    55    xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil"
     
    99  <xsl:param name="interface_name"/>
    1010  <xsl:param name="library_name"/>
    11  
     11
    1212  <!-- every pages ....................................................................... -->
    13  
     13    <xsl:template name="siteName"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/></xsl:template>
     14    <xsl:template name="siteLink"><a href="./"><xsl:call-template name="siteName"/></a></xsl:template>
     15
    1416    <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>     </xsl:variable>
    1517    <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
     
    1820    <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
    1921
    20    
     22    <!-- template to get the name of the current collection -->
     23    <xsl:template name="collectionName">
     24        <xsl:choose>
     25            <xsl:when test="/page/pageResponse/collection"><xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/></xsl:when>
     26            <xsl:otherwise>All Collections</xsl:otherwise>
     27        </xsl:choose>
     28    </xsl:template>
     29
     30    <xsl:template name="collectionNameShort">
     31        <xsl:value-of select="/page/pageResponse/collection/@name"/>
     32    </xsl:template>
     33
     34    <xsl:template name="collectionNameLinked">
     35        <xsl:choose>
     36            <xsl:when test="/page/pageResponse/collection">
     37                <a>
     38                    <xsl:attribute name="href"><xsl:call-template name="siteURL"/><xsl:value-of select="$library_name"/>?a=p&amp;sa=about&amp;c=<xsl:call-template name="collectionNameShort"/></xsl:attribute>
     39                    <xsl:call-template name="collectionName"/>
     40                </a>
     41            </xsl:when>
     42            <xsl:otherwise>
     43                <a>
     44                    <xsl:attribute name="href"><xsl:call-template name="siteURL"/></xsl:attribute>
     45                    All Collections
     46                </a>
     47            </xsl:otherwise>
     48        </xsl:choose>
     49    </xsl:template>
     50
     51    <!-- text to get the name of the current service ("Browse","Search" etc) -->
     52    <xsl:template name="serviceName">
     53        <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
     54    </xsl:template>
     55
    2156    <xsl:template name="textDirectionAttribute">
    2257        <xsl:attribute name="dir">
     
    2459                <xsl:when test="/page/@lang='ar' or /page/@lang='fa' or /page/@lang='he' or /page/@lang='ur' or /page/@lang='ps' or /page/@lang='prs'">rtl</xsl:when>
    2560                <xsl:otherwise>ltr</xsl:otherwise>
    26             </xsl:choose> 
     61            </xsl:choose>
    2762        </xsl:attribute>
    28     </xsl:template> 
    29  
     63    </xsl:template>
     64
     65    <xsl:template name="actionClass">
     66        <xsl:attribute name="class"><xsl:value-of select="/page/pageRequest/@action"/>Action <xsl:if test="/page/pageRequest/@subaction"><xsl:value-of select="/page/pageRequest/@subaction"/>Subaction</xsl:if></xsl:attribute>
     67    </xsl:template>
     68
     69    <!-- username, if logged in -->
     70    <!--
     71    <xsl:template name="username">
     72        <xsl:if test="$un_s!=''">
     73            <xsl:if test="$asn!='' and $asn!='0'">
     74            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
     75            </xsl:if>
     76        </xsl:if>
     77    </xsl:template>
     78    -->
     79
    3080    <xsl:template name="defaultDividerBar">
    3181   <xsl:param name='text'/>
     
    3787     <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
    3888      </xsl:otherwise>
    39     </xsl:choose> 
     89    </xsl:choose>
    4090  </xsl:template>
    41  
    42  
     91
     92
    4393    <xsl:template match="error">
    4494    Error: <xsl:value-of select="."/>
    4595  </xsl:template>
    46  
    47  
     96
     97
    4898<xsl:template name="displayErrorsIfAny">
    4999      <xsl:if test="descendant::error">
     
    67117          removeAllChildren(hide_link);
    68118          hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/><xsl:text disable-output-escaping="yes">"));
    69         } 
     119        }
    70120      }
    71121    </xsl:text>
     
    85135   
    86136    <xsl:template name="poweredByGS3TextBar">
    87         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
    88     </xsl:template>
    89  
    90  
     137        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
     138    </xsl:template>
     139
     140    <xsl:template name="rightArrow"><xsl:text disable-output-escaping="yes"> &amp;raquo; </xsl:text></xsl:template>
     141
     142
     143
    91144    <!-- site home ....................................................................... -->
    92145
     
    100153     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
    101154  </xsl:template>
    102  
    103  
    104155    <xsl:template name="crossCollectionQuickSearchForm">
    105156        <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
    106     </xsl:template> 
     157    </xsl:template>
    107158   
    108159    <xsl:template match="service[@name='TextQuery']">
     
    127178            </xsl:when>
    128179            <xsl:otherwise>
    129                 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"> 
     180                <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
    130181                    <xsl:value-of select="displayItem[@name='name']"/>
    131182                </a>
    132183            </xsl:otherwise>
    133         </xsl:choose> 
     184        </xsl:choose>
    134185    </xsl:template>
    135186
     
    137188    <xsl:template name="serviceClusterList">
    138189        <xsl:apply-templates select="serviceClusterList"/>
    139     </xsl:template> 
     190    </xsl:template>
    140191   
    141192      <xsl:template match="serviceClusterList">
    142         <xsl:for-each select="serviceCluster"> 
     193        <xsl:for-each select="serviceCluster">
    143194          <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}"><xsl:value-of select='@name'/><xsl:value-of select="displayItem[@name='name']"/></a>
    144195        </xsl:for-each>
    145196      </xsl:template>
    146197
    147      
    148       <xsl:template name="serviceLink">
    149       <a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/>
    150       </xsl:template>
    151 
    152      
     198   
     199    <xsl:template name="serviceLink">
     200        <div class="paramLabel"><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></div>
     201        <div class="paramValue"><xsl:value-of select="displayItem[@name='description']"/></div>
     202        <br class="clear"/>
     203    </xsl:template>
     204
     205
    153206   <xsl:template name="authenticationLink">
    154207   <xsl:for-each select="serviceList/service[@type='authen']">
    155208      <li><a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li></xsl:for-each>
    156   </xsl:template>
    157  
    158  
     209  </xsl:template>
    159210   <xsl:template name="libraryInterfaceLink">
    160211   <li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>
    161   </xsl:template>
    162  
    163  
     212  </xsl:template>
    164213<xsl:template name="greenstoneLogoAlternateText">
    165214<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
     
    224273
    225274
    226 <xsl:template name="preferencesButtonTop">
    227     <xsl:choose>
    228       <xsl:when test="$pageType='pref'">
    229     <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
    230       </xsl:when>
    231       <xsl:otherwise>
    232     <li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
    233         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    234       </a></li>
    235       </xsl:otherwise>
    236     </xsl:choose>
    237 </xsl:template>
    238 
    239 <xsl:template name="servicesNavigationBar">
    240         <xsl:for-each select="$this-element/serviceList/service">
    241           <xsl:variable name="action"><xsl:choose>
    242           <xsl:when test="@name=$this-service">CURRENT</xsl:when>
    243           <xsl:when test="@type='query'">q</xsl:when>
    244           <xsl:when test="@type='browse'">b</xsl:when>
    245           <xsl:when test="@type='process'">pr</xsl:when>
    246           <xsl:when test="@type='applet'">a</xsl:when>
    247           <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
    248         </xsl:choose></xsl:variable>
    249           <xsl:choose>
    250         <xsl:when test="$action='CURRENT'">
    251           <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li>
    252         </xsl:when>
    253         <xsl:when test="$action !='DO_NOT_DISPLAY'">
    254           <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li>
    255         </xsl:when>
    256           </xsl:choose>
    257         </xsl:for-each>
    258 </xsl:template>
    259 
    260 
    261 <xsl:template name="collectionDescriptionTextAndServicesLinks">
    262     <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
    263 </xsl:template>
    264 
    265 <xsl:template match="collection|serviceCluster">
    266       <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
    267      
    268       <xsl:apply-templates select="serviceList">
    269     <xsl:with-param name="collName" select="$collName"/>
    270       </xsl:apply-templates>
    271 </xsl:template>
    272 
    273 
    274  <xsl:template match="serviceList">
    275     <xsl:param name="collName"/>
    276     <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3>
    277     <xsl:choose>
    278       <xsl:when test="service">
    279     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
    280       </xsl:when>
    281       <xsl:otherwise>
    282     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
    283       </xsl:otherwise>
    284     </xsl:choose>
    285    
    286    
    287     <xsl:if test="service">
    288       <ul id="servicelist">     
    289     <xsl:for-each select="service">
    290       <xsl:variable name="action"><xsl:choose>
    291           <xsl:when test="@type='query'">q</xsl:when>
    292           <xsl:when test="@type='browse'">b</xsl:when>
    293           <xsl:when test="@type='process'">pr</xsl:when>
    294           <xsl:when test="@type='applet'">a</xsl:when>
    295           <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
    296         </xsl:choose></xsl:variable>
    297       <xsl:if test="$action !='DO_NOT_DISPLAY'">
    298         <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li>
    299       </xsl:if>
    300     </xsl:for-each>
    301       </ul>
    302     </xsl:if>
    303   </xsl:template>
     275    <xsl:template name="preferencesButtonTop">
     276        <xsl:choose>
     277            <xsl:when test="$pageType='pref'">
     278                <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
     279            </xsl:when>
     280            <xsl:otherwise>
     281                <li><a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
     282                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     283                </a></li>
     284            </xsl:otherwise>
     285        </xsl:choose>
     286    </xsl:template>
     287
     288    <xsl:template name="servicesNavigationBar">
     289        <xsl:for-each select="$this-element/serviceList/service">
     290            <xsl:variable name="action"><xsl:choose>
     291                <xsl:when test="@name=$this-service">CURRENT</xsl:when>
     292                <xsl:when test="@type='query'">q</xsl:when>
     293                <xsl:when test="@type='browse'">b</xsl:when>
     294                <xsl:when test="@type='process'">pr</xsl:when>
     295                <xsl:when test="@type='applet'">a</xsl:when>
     296                <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
     297            </xsl:choose></xsl:variable>
     298            <xsl:choose>
     299                <xsl:when test="$action='CURRENT'">
     300                    <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li>
     301                </xsl:when>
     302                <xsl:when test="$action !='DO_NOT_DISPLAY'">
     303                    <li><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:if test="displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></a></li>
     304                </xsl:when>
     305            </xsl:choose>
     306        </xsl:for-each>
     307    </xsl:template>
     308
     309
     310    <xsl:template name="collectionDescriptionTextAndServicesLinks">
     311        <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
     312    </xsl:template>
     313
     314    <xsl:template match="collection|serviceCluster">
     315        <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
     316        <xsl:apply-templates select="serviceList">
     317            <xsl:with-param name="collName" select="$collName"/>
     318        </xsl:apply-templates>
     319    </xsl:template>
     320
     321
     322    <xsl:template match="serviceList">
     323        <xsl:param name="collName"/>
     324        <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3>
     325        <p>
     326            <xsl:choose>
     327                <xsl:when test="service">
     328                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
     329                </xsl:when>
     330                <xsl:otherwise>
     331                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
     332                </xsl:otherwise>
     333            </xsl:choose>
     334        </p>
     335
     336        <xsl:if test="service">
     337            <div id="servicelist">
     338                <xsl:for-each select="service">
     339                    <xsl:sort select="position()" order="descending" data-type="number"/>
     340
     341                    <xsl:variable name="action"><xsl:choose>
     342                        <xsl:when test="@type='query'">q</xsl:when>
     343                        <xsl:when test="@type='browse'">b</xsl:when>
     344                        <xsl:when test="@type='process'">pr</xsl:when>
     345                        <xsl:when test="@type='applet'">a</xsl:when>
     346                        <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
     347                    </xsl:choose></xsl:variable>
     348                    <xsl:if test="$action != 'DO_NOT_DISPLAY'">
     349                        <div class="paramLabel"><a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a></div>
     350                        <div class="paramLabel"><xsl:value-of select="displayItem[@name='description']"/></div>
     351                        <br class="clear"/>
     352                    </xsl:if>
     353                </xsl:for-each>
     354            </div>
     355        </xsl:if>
     356    </xsl:template>
    304357
    305358
    306359
    307360<!-- classifier page ............................................................................ -->
    308 <xsl:template name="collectionName">
    309     <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
    310 </xsl:template>
    311 
    312 <xsl:template name="collectionShortName">
    313     <xsl:value-of select="/page/pageResponse/collection/@name"/>
    314 </xsl:template>
     361
    315362
    316363<xsl:template name="navigationTab">
     
    351398</xsl:template>
    352399
     400<!-- query page ............................................................................ -->
     401
     402    <xsl:template name="indexName">
     403        <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
     404    </xsl:template>
     405
     406<xsl:template name="queryPageCollectionName">
     407    <xsl:choose><xsl:when test="/page/pageResponse/collection"><gslib:aboutCollectionPageTitle/></xsl:when><xsl:otherwise>Cross-Collection</xsl:otherwise></xsl:choose>
     408</xsl:template>
     409
     410
     411
     412
     413
    353414<!--
    354415BERRY BASKET TEMPLATES
     
    382443    <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script>
    383444    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script>
    384     <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/> 
     445    <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
    385446</xsl:template>
    386447
     
    445506
    446507
    447 
    448508</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.