Ignore:
Timestamp:
2011-03-25T11:12:23+13:00 (13 years ago)
Author:
sjm84
Message:

Lots of upgrades to the oran skin, getting it ready to be the default skin for Greenstone3

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

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/js/berrybasket.js

    r19854 r23813  
    5959        // they are set to be invisible to prevent flickering when first loaded (see berry.css)
    6060
    61         var berries = $('img');
     61        var berries = document.getElementsByTagName('img');
    6262        var berrybasket = new YAHOO.util.DDTarget('berrybasket','basket');
    6363
     
    8787
    8888    var responseFailure = function(o){
     89        alert("CHECKOUT FAILED");
    8990//alert( arguments.callee );
    9091    }
     
    165166    var basketHandle = YAHOO.util.Dom.get('baskethandle');
    166167    var berries = YAHOO.util.Dom.get('berries');
    167     var div = document.createElement('div');
    168     var list = document.createElement('ol');
    169168    var width = 500;
    170169    var height = 40;
    171170    var i=0;
    172171
    173     list.id = 'doclist';
    174 
    175172    //remove berryImages in the berry basket
    176173    while (berries.hasChildNodes()) {
     
    180177        basketHandle.removeChild(basketHandle.firstChild);
    181178    }
     179   
     180    var div = document.createElement('div');
     181    berries.appendChild(div);
     182    var list = document.createElement('ol');
     183    div.appendChild(list);
     184   
     185    list.id = 'doclist';
    182186
    183187    //put the berries in
    184     for (i in berryList){
     188    for (i; i < berryList.length; i++){
    185189        var berryItem = berryList[i];
    186190        var berryElement = document.createElement('li');
     191        list.appendChild(berryElement);
    187192        var title = berryItem.getAttribute('title');
    188193        var root_title = berryItem.getAttribute('root_title');
    189         var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
     194        //var id = berryItem.getAttribute('collection')+":"+berryItem.getAttribute('name');
    190195
    191196        if (root_title != ""){
     
    197202            title = title.substring(0,20)+" ... "+title.substr(title.length-35,35);
    198203        }
    199 
    200         berryElement.appendChild(document.createTextNode(title));
     204       
    201205        berryElement.setAttribute("class","berryitem");
    202         list.appendChild(berryElement);
    203         height +=18;
     206        berryElement.setAttribute("title",title);
     207        berryElement.innerHTML = title;
     208        height +=40;
    204209    }
    205210
     
    207212    oldWidth = berryBasket.style.width;
    208213    oldBg = berryBasket.style.background;
    209     berryBasket.style.height = height;
    210     berryBasket.style.width = width;
     214    //berryBasket.style.height = height;
     215    //berryBasket.style.width = width;
    211216    berryBasket.style.background ='url("interfaces/default/images/kete2.png") 0 0 repeat';
    212217    berryBasket.style.cursor = "default";
    213218    berryBasket.className = "show";
    214     div.appendChild(list);
    215     berries.appendChild(div);
    216     berries.style.height = height - 40;
     219    //berries.style.height = height - 40;
    217220
    218221    //put the full view link in
    219222    var fullView = document.createElement('a');
    220223    berries.appendChild(fullView);
     224   
     225    //Find the collection in the cgi parameters
     226    var url = window.location.href;
     227    var colstart = url.indexOf("&c=");
     228    var collectionName = "";
     229    if (colstart != -1)
     230    {
     231        var colend = url.indexOf("&", (colstart + 1));
     232        if (colend == -1)
     233        {
     234            colend = url.length - 1;
     235        }
     236        collectionName = url.substring(colstart + 3, colend);
     237    }
     238   
    221239    fullView.appendChild(document.createTextNode('Full View »'));
    222     fullView.setAttribute("href","?a=g&sa=berry&c=&s=DisplayList&rt=r");
     240    fullView.setAttribute("href","?a=g&sa=berry&c=&s=DisplayList&rt=r&p.c=" + collectionName);
    223241    fullView.setAttribute("id","berryFullViewLink");
    224 
    225242
    226243    //toggle expand/collapse links
  • main/trunk/greenstone3/web/interfaces/oran/js/berrycheckout.js

    r19854 r23813  
    1515
    1616function navigate(e){
    17 
    18     var target = e.target;
     17   
     18    var target = this;
    1919
    2020    if ( target.id.toLowerCase() == '' ) {
     
    4646        var parea =YAHOO.util.Dom.get('pretextarea');
    4747        urlonly = false;
     48       
     49        this.value='URL only view';
     50       
    4851        populateUrlsAndMetadata(parea);
    4952        return;
     
    5659        populateUrls(parea);
    5760        urlonly = true;
     61       
     62        this.value='URL and Metadata view';
     63       
    5864        return;
    5965    }
     
    9197}
    9298
     99function pageLoad(){
     100    for(var j = 0; j < options.length; j++)
     101    {
     102        var ele = document.getElementById(options[j]);
     103        YAHOO.util.Event.addListener(ele, 'click', navigate);
     104    }
     105   
     106    showFullView();
     107}
     108
    93109function showFullView(){
    94110
     
    101117        return;
    102118    }
    103 
    104119
    105120    var trashbin = document.createElement('div');
     
    277292    input.setAttribute("value", "send");
    278293    content.appendChild(input);
    279 
    280 }
    281 
     294   
     295    YAHOO.util.Event.addListener(input, 'click', navigate);
     296}
    282297
    283298function buildPreview(parent){
     
    285300    var div = document.createElement('div');
    286301    var cb = document.createElement('input');
    287     cb.type = 'checkbox';
    288 
     302    cb.setAttribute('class', 'sendbutton');
     303    cb.type = 'button';
     304    cb.id = 'urlcheck';
     305    if (urlonly)
     306    {
     307        cb.value='URL and Metadata view';
     308    }
     309    else
     310    {
     311        cb.value='URL only view';
     312    }
     313
     314    YAHOO.util.Event.addListener(cb, 'click', navigate);
     315   
    289316    var img = document.createElement('img');
    290317    img.src = 'interfaces/default/images/check3.gif';
     
    296323    urls.id = 'urls';
    297324    urls.className = 'berrycheck';
    298     urls.appendChild(document.createTextNode('URL only'));
     325    //urls.appendChild(document.createTextNode('URL only'));
    299326    div.appendChild(urls);
    300327
     
    312339    parent.appendChild(parea);
    313340
    314     populateUrlsAndMetadata(parea);
    315 
    316 
     341    if(urlonly)
     342    {
     343        populateUrls(parea);
     344    }
     345    else
     346    {
     347        populateUrlsAndMetadata(parea);
     348    }
    317349}
    318350
     
    406438}
    407439
    408 YAHOO.util.Event.addListener(window,'click', navigate);
    409 YAHOO.util.Event.addListener(window,'load', showFullView);
    410 
    411 
     440YAHOO.util.Event.addListener(window,'load', pageLoad);
     441
     442
  • main/trunk/greenstone3/web/interfaces/oran/style/berry.css

    r19855 r23813  
    3939    display:block;
    4040    cursor: pointer;
    41     text-align: right;
     41    text-align: left;
    4242    padding: .5em;
    4343}
     
    142142   font-weight: bold;
    143143   cursor: pointer;
    144    width: 5em;
     144   /*width: 5em;*/
    145145   font-size: 90%;
    146146   margin: 1em 0 0 0;
  • main/trunk/greenstone3/web/interfaces/oran/style/core.css

    r22784 r23813  
    1717    padding: 0;
    1818    line-height: 160%;
    19 /*  background: url('../images/layout/containerLeft.png') scroll repeat-y left top;*/
    2019    background-color: #fff;
    2120    border: 1px solid #c8c3b9;
    2221}
    23 #container2 {
    24     /* background: url('../images/layout/containerRight.png') scroll repeat-y right top; */
    25 }
    26 /*
    27 #container3 {
    28     background: url('../images/layout/containerTop.png') scroll repeat-x left top;
    29 }
    30 #container4 {
    31     background: url('../images/layout/containerBottom.png') scroll repeat-x left bottom;
    32     padding: 10px;
    33 }
    34 */
    3522
    3623#gs_banner {
    37     background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top;
     24    /*background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top;*/
     25    background-color: #008800;
    3826    padding: 10px 20px 30px 20px;
    3927    min-height: 80px;
    40     max-height: 110px;
    4128    position: relative;
    4229}
     
    10895body.dAction #gs_banner h2 {
    10996    max-width: 600px;
    110     font-size: 100%;
     97    font-size: 100;
     98}
     99
     100#titlearea {
     101    padding-left: 1em;
     102    padding-right: 1em;
     103    height:60px;
     104    background-color: #007200;
     105    width:40%;
     106}
     107
     108#titlesearchcontainer {
     109    width:100%;
     110    margin: 5px 0 5px;
     111}
     112
     113#quicksearcharea {
     114    width:60%;
     115    text-align:right;
     116    padding: 5px;
     117    color:white;
     118    background-color:#007200;
     119}
     120
     121#quicksearcharea table{
     122    font-size:10px;
     123    margin:0;
     124    float: right;
     125}
     126
     127#quicksearcharea a{
     128    font-size: 11px;
     129    color:white;
     130    text-transform:lowercase;
     131    padding-left:10px;
     132}
     133
     134#expandqueryboxbutton {
     135    color:white;
     136    text-decoration:none;
    111137}
    112138
    113139#breadcrumbs {
    114     margin: 0 0 10px 0;
    115     height: 30px;
    116     line-height: 30px;
    117 }
    118 #gs_banner h2 {
    119     margin: 0 0 10px 1em;
    120 }
    121 
     140    /*margin: 0 0 10px 0;*/
     141    height: 25px;
     142    line-height: 15px;
     143}
    122144
    123145/* css to make the tabs work */
    124146#nav {
    125     position: absolute;
     147    position:absolute;
    126148    width: auto;
    127149    bottom: 0;
    128     right: 0;
     150    left: 0;
    129151    list-style: none;
    130152    margin:0;
    131     padding: 0 15px 0 0;
     153    padding: 0 0 0 20px;
    132154    font-size: 14px;
    133155}
    134156
    135157#nav li {
    136     float: right;
     158    float: left;
    137159    color: #fff;
    138160    background: transparent url('../images/tab-right.png') scroll no-repeat 100% -100px;
    139161    margin: 0 5px 0 0;
    140162    padding: 0 8px 0 0;
     163    text-transform: capitalize;
    141164}
    142165
    143166#nav a {
     167
    144168    display: block;
    145     float: left;
    146 
     169    float:left;
    147170    background: transparent url('../images/tab-left.png') no-repeat scroll 0 -100px;
    148171    margin:0;
    149172    padding: 5px 4px 3px 10px;
    150     font-weight: normal;
     173    font-weight: bold;
    151174    color: #fff;
    152175    text-decoration: none;
     
    164187    list-style: none;
    165188    margin:0;
    166     top: 15px;
     189    top: 7px;
    167190    right: 0;
    168191    padding: 0 15px 0 0;
  • main/trunk/greenstone3/web/interfaces/oran/transform/layouts/main.xsl

    r23568 r23813  
    1515    exclude-result-prefixes="util java util">
    1616
     17    <xsl:include href="header.xsl"/>
     18    <!--<xsl:include href="formatmanager.xsl"/>-->
     19   
    1720    <xsl:include href="xml-to-gui.xsl"/>
    1821    <xsl:include href="xml-to-gui-templates.xsl"/>
     
    3336
    3437            <head>
    35                 <title><xsl:call-template name="pageTitle"/> :: <xsl:call-template name="siteName"/></title>
    36                 <link rel="stylesheet" href="interfaces/{$interface_name}/style/core.css" type="text/css"/>
    37                 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery.js"><xsl:text> </xsl:text></script> -->
    38                 <script type="text/javascript" src="interfaces/oran/js/jquery-1.4.2.js"><xsl:text> </xsl:text></script>
    39                 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8.2.custom.min.js"><xsl:text> </xsl:text></script> -->
    40                 <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/ui/jquery-ui.js"><xsl:text> </xsl:text></script>
    41                 <script type="text/javascript" src="interfaces/oran/js/jquery.selectboxes.js"><xsl:text> </xsl:text></script>
    42                 <!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.js"><xsl:text> </xsl:text></script> -->
    43                 <!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"><xsl:text> </xsl:text></script> -->
    44                 <!-- <script type="text/javascript" src="interfaces/oran/js/jquery-ui-1.8rc1/jquery-1.4.1.js"><xsl:text> </xsl:text></script> -->
    45 
     38                <!-- ***** in header.xsl ***** -->
     39                <xsl:call-template name="create-html-header"/>
    4640                <xsl:call-template name="berryBasketHeadTags"/>
    4741            </head>
     
    5145                <xsl:call-template name="displayErrorsIfAny"/>
    5246
    53                 <div id="container"><div id="container2"><div id="container3"><div id="container4">
     47                <div id="container">
    5448
    5549                    <div id="gs_banner">
    5650
    57                         <!-- show the title -->
    58                         <div id="breadcrumbs"><xsl:call-template name="breadcrumbs"/><xsl:text> </xsl:text></div>
    59                         <h2><xsl:call-template name="pageTitle"/></h2>
    60 
    61                         <xsl:if test="/page/pageResponse/collection">
    62                             <!-- show home, help, preferences links -->
    63                             <ul id="bannerLinks">
    64 
    65                                 <!-- preferences -->
    66                                 <li>
    67                                     <a href="{$library_name}?a=p&amp;amp;sa=pref&amp;amp;c={$collName}">
    68                                         <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
    69                                         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    70                                     </a>
    71                                 </li>
    72 
    73                                 <!-- help -->
    74                                 <li>
    75                                     <a href="{$library_name}?a=p&amp;amp;sa=help&amp;amp;c={$collName}">
    76                                         <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
    77                                         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    78                                     </a>
    79                                 </li>
    80 
    81                                 <li>
    82                                     <a href="{$library_name}?a=p&amp;amp;sa=home">
    83                                         <xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
    84                                         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
    85                                     </a>
    86                                 </li>
    87 
    88                             </ul>
    89                         </xsl:if>
    90 
    91                         <!-- show the available 'services' (browse, search, etc.) -->
    92                         <xsl:if test="/page/pageResponse/collection/serviceList/service">
    93                             <ul id="nav">
    94                                 <!-- show browse service, if it exists -->
    95                                 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='browse']">
    96                                     <xsl:for-each select="/page/pageResponse/collection/serviceList/service[@type='browse']">
    97                                         <xsl:call-template name="navigationTab"/>
    98                                     </xsl:for-each>
    99                                 </xsl:if>
    100 
    101                                 <!-- show search services (collapsed) if they exist -->
    102                                 <xsl:if test="/page/pageResponse/collection/serviceList/service[@type='query']">
    103                                     <xsl:for-each select="/page/pageResponse/collection/serviceList">
    104 
    105                                         <!--
    106                                             using collapsedNavigationTab instead of navigationTab collapses
    107                                             all the services of the given type onto one tab
    108                                         -->
    109                                         <xsl:call-template name="collapsedNavigationTab">
    110                                             <xsl:with-param name="type">query</xsl:with-param>
    111                                         </xsl:call-template>
    112                                     </xsl:for-each>
    113                                 </xsl:if>
    114 
    115                                 <!-- all other services -->
    116                                 <xsl:for-each select="/page/pageResponse/collection/serviceList/service[not(@type='query') and not(@type='browse')]">
    117                                     <xsl:call-template name="navigationTab"/>
    118                                 </xsl:for-each>
    119 
    120                             </ul>
    121                         </xsl:if>
     51                        <!-- ***** in header.xsl ***** -->
     52                        <xsl:call-template name="create-banner"/>
    12253
    12354                    </div>
     55                   
     56                    <!--<xsl:call-template name="formatmanagerpre"/>-->
    12457
    125 <!-- *************************************************************************************** -->
    126 
    127     <!-- <xsl:variable name="foo"> -->
    128     <!-- <xsl:value-of select="/page/pageRequest/paramList[@name='formatedit']"/> -->
    129 
    130     <xsl:if test="/page/pageRequest/paramList/param[(@name='formatedit') and (@value='1')]">
    131 
    132 <!-- Sam2's div code -->
    133 
    134     <script type="text/javascript" src="interfaces/oran/js/innerxhtml.js"><xsl:text> </xsl:text></script>
    135     <script type="text/javascript" src="interfaces/oran/js/gui_div.js"><xsl:text> </xsl:text></script>
    136    
    137     <xsl:call-template name="xml-to-gui-templates">
    138         <xsl:with-param name="node-set" select="test"/>
    139         <xsl:with-param name="metadataSets" select="//metadataSetList"/>
    140     </xsl:call-template>
    141 
    142     <xsl:variable name="fmt1">
    143         <xsl:call-template name="xml-to-string">
    144             <xsl:with-param name="node-set" select="//format[@type='browse']"/>
    145           </xsl:call-template>
    146     </xsl:variable>
    147 
    148     <xsl:variable name="meta">
    149         <xsl:call-template name="xml-to-string">
    150             <xsl:with-param name="node-set" select="//metadataSetList"/>
    151           </xsl:call-template>
    152     </xsl:variable>
    153 
    154     <style type="text/css">
    155         .placeholder{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; height:20px; }
    156 
    157         .placeholder_td{margin-left: 10px; border: dashed 1px #ccc; background-color:#FFFFCC; width:20px; }
    158 
    159         .header { background-color: #AFCCAF; border: solid 1px #117711; padding: 5px; padding-left: 10px;}
    160 
    161         .resizable { width: 150px; height: 150px; padding: 0.5em; }
    162        
    163         .block { margin-left: 15px; border-left: dashed 1px black;}
    164 
    165         .droppable { background-color: #99dd99;}
    166         .droppable_hl { border: dashed 1px #ccc; background-color:#FFFFCC; }
    167 
    168         <!-- .gsf_metadata { border: solid 2px #0000BB; background-color: #440077; } -->
    169 
    170         <!-- .gsf_choose_metadata { border: solid 1px #000000; background-color: #223344; } -->
    171     </style>
    172 
    173     <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/base/jquery-ui.css"/>
    174 
    175     <table width="100%" border="1">
    176 
    177     <td width="75%">
    178 
    179     <button id="updateFormatStatement" type="button" onclick="updateFormatStatement()">Update Format Statement</button>
    180     <button id="saveFormatStatement" type="button" onclick="saveFormatStatement()">Save Format Statement</button>
    181 
    182     <div id="formatStatement">
    183         <div id="formatRoot">
    184    
    185     <xsl:call-template name="xml-to-gui">
    186         <xsl:with-param name="node-set" select="//format"/> <!-- [@type='browse']"/>  -->
    187         <xsl:with-param name="metadataSets" select="//metadataSetList"/>
    188     </xsl:call-template>
    189         </div>
    190     </div>
    191     </td>   
    192 
    193 
    194     <td width="25%" valign="top">
    195         <h2> Elements to add </h2>
    196         <!-- <div class="header element_type_gsf_template css_gsf_template" title="gsf:template">TEMPLATE</div> -->
    197         <div class="draggable_gsf_template css_gsf_template block" title="gsf:template"><table class="header"><tbody><tr><td class="header">MATCH=<input type="text" name="rawtextinput" size="10"/></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table><table border="1"><tr class="tr"><td class="droppable" width="10px"></td></tr></table></div><br/>
    198 
    199         <div class="draggable_gsf_choose_metadata css_gsf_choose_metadata block" title="gsf:choose-metadata"><table class="header"><tbody><tr><td class="header">CHOOSE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick" title="Click me to expand">[-]</a></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
    200 
    201         <div class="draggable_gsf_metadata css_gsf_metadata block" title="gsf:metadata"><table class="header"><tbody><tr><td class="header"><xsl:call-template name="meta-to-combo">
    202                         <xsl:with-param name="metadataSets" select="//metadataSetList"/>
    203                         <xsl:with-param name="current" select="ex.Title"/>
    204                      </xsl:call-template></td><td class="header"><a href="#" class="remove ui-icon ui-icon-closethick" title="Click me to remove"/></td></tr></tbody></table></div>
    205 
    206         <div class="draggable_gsf_link css_gsf_link block" title="gsf:link"><table class="header"><tbody><tr><td class="header">LINK<select>
    207                             <option value = "document" selected = "document">Document</option>
    208                             <option value = "classifier">Classifier</option>
    209                             <option value = "source">Source</option>
    210                             <option value = "horizontal">Horizontal</option>
    211                 </select></td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
    212 
    213         <div class="draggable_gsf_switch css_gsf_switch block" title="gsf:switch"><table class="header"><tbody><tr><td class="header">SWITCH</td><td><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
    214 
    215         <div class="draggable_gsf_when css_gsf_when block" title="gsf:when"><table class="header"><tbody><tr><td class="header">WHEN<xsl:value-of select="@test"/></td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
    216 
    217         <div class="draggable_gsf_otherwise css_gsf_otherwise block" title="gsf:otherwise"><table class="header"><tbody><tr><td class="header">OTHERWISE</td><td class="header"><a href="#" class="minmax ui-icon ui-icon-minusthick">[-]</a></td><td><a href="#" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
    218 
    219         <div class="draggable_gsf_icon css_gsf_icon block" title="gsf:icon"><table class="header"><tbody><tr><td class="header">ICON<select><option value = "document" selected = "document">Document</option><option value = "classifier">Classifier</option><option value = "source">Source</option></select></td><td><a href="#" class="remove ui-icon ui-icon-closethick">[x]</a></td></tr></tbody></table></div>
    220         <br/>
    221         <div class="draggable_gsf_text css_text" title="text"><table class="header"><tbody><tr><td class="header"><input type="text" name="rawtextinput" size="10" value=""/></td><td class="header"><a href="[myhref]" class="ui-icon ui-icon-closethick"/></td></tr></tbody></table></div>
    222         <div class="draggable_table css_table" title="gsf:table">NEW TABLE</div>
    223         <div class="draggable_tr css_tr" title="gsf:row">NEW TABLE ROW</div>
    224         <div class="draggable_td css_td" title="gsf:column">NEW TABLE COLUMN</div>
    225 
    226     </td>
    227     </table>
    228 
    229     <!--
    230     <div id="format">
    231         <p>
    232           <b>Format string here</b>
    233           <i>
    234               <xsl:value-of select="$fmt1"/>
    235           </i>
    236         </p>
    237     </div> -->
    238     <!--    <p>
    239           <i>
    240               <xsl:value-of select="$meta"/>
    241           </i>
    242         </p>
    243       </div> -->
    244       </xsl:if>
    245 
    246 <!-- *************************************************************************************** -->
    247 <!--<H2>Preview</H2>
    248 
    249                     <div id="my_categories"><xsl:text> </xsl:text></div>
    250 
    251                     <iframe name="preview" id="iframe" width="98%" height="300">Your browser does not support iframes</iframe>
    252 
    253                     <xsl:variable name="preview"> -->
    254                     <!-- <button type="button" onclick="loadXMLDoc()">Change Content</button> -->
    25558                    <div id="gs_content">
    25659                        <!--
     
    26164
    26265                    </div>
    263    <!--                 </xsl:variable>
    264 
    265                     <script type="text/javascript">
    266                         preview_html = <xsl:text disable-output-escaping="yes">'</xsl:text><xsl:copy-of select="$preview"/><xsl:text disable-output-escaping="yes">';</xsl:text>
    267                     </script>
    268 
    269                     <div id="result">
    270                     Here
    271                     </div>-->
     66                   
     67                    <!--<xsl:call-template name="formatmanagerpost"/>-->
    27268
    27369                    <div id="gs_footer">
     
    28076                    <div class="corner" id="cornerBottomRight"><xsl:text> </xsl:text></div>
    28177
    282                 </div></div></div></div>
     78                </div>
    28379
    28480            </body>
    28581        </html>
    28682    </xsl:template>
    287 
    28883</xsl:stylesheet>
    28984
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/berry.xsl

    r20465 r23813  
    1010    <!-- use the 'main' layout -->
    1111    <xsl:include href="layouts/main.xsl"/>
    12 
     12   
    1313    <!-- set page title -->
    1414    <xsl:template name="pageTitle"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/></xsl:template>
    1515
    1616    <!-- set page breadcrumbs -->
    17     <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
    1818
    1919    <!-- the page content -->
     
    2424            var doc;
    2525            var docList = new Array();
    26             <xsl:for-each select="/page/pageResponse/collection/item">
    27                 <xsl:text disable-output-escaping="yes">
    28             doc = new Array();</xsl:text>
     26            <xsl:for-each select="/page/pageResponse/berryList/item">
     27                <xsl:text disable-output-escaping="yes">doc = new Array();</xsl:text>
    2928                <xsl:for-each select="@*">
    30                     <xsl:text disable-output-escaping="yes">
    31             doc["</xsl:text><xsl:value-of select="name()" /><xsl:text disable-output-escaping="yes">"]='</xsl:text><xsl:value-of select="." /><xsl:text disable-output-escaping="yes">';</xsl:text>
     29                    <xsl:text disable-output-escaping="yes">doc["</xsl:text>
     30                    <xsl:value-of select="name()" />
     31                    <xsl:text disable-output-escaping="yes">"]='</xsl:text>
     32                    <xsl:value-of select="." />
     33                    <xsl:text disable-output-escaping="yes">';</xsl:text>
    3234                </xsl:for-each>
    33                 <xsl:text disable-output-escaping="yes">
    34             docList[</xsl:text>
     35                <xsl:text disable-output-escaping="yes">docList[</xsl:text>
    3536                <xsl:value-of select="position()-1"/>
    36                 <xsl:text>] = doc;
    37 </xsl:text>
     37                <xsl:text>] = doc;</xsl:text>
    3838            </xsl:for-each>
    3939        </script>
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl

    r20477 r23813  
    2121
    2222        <!-- show the classifiers if more than one (title, subject, etc.) -->
    23         <xsl:if test="service/classifierList/classifier[2]">
     23        <!--<xsl:if test="service/classifierList/classifier[2]">
    2424            <div id="classifierList" class="navList">
    2525                <ul>
     
    3030                <div class="clear"><xsl:text> </xsl:text></div>
    3131            </div>
    32         </xsl:if>
     32        </xsl:if>-->
    3333
    3434        <!-- this right sidebar -->
    35         <div id="rightSidebar">
    36             <!-- show the berry basket if it's turned on -->
    37             <gslib:berryBasket/>
    38             <xsl:text> </xsl:text>
    39         </div>
     35        <xsl:if test="$berryBasketOn">
     36            <div id="rightSidebar">
     37                <!-- show the berry basket if it's turned on -->
     38                <gslib:berryBasket/>
     39                <xsl:text> </xsl:text>
     40            </div>
     41        </xsl:if>
    4042   
    4143        <!--
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl

    r22785 r23813  
    1919
    2020    <!-- set page breadcrumbs -->
    21     <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     21    <xsl:template name="breadcrumbs">
     22        <gslib:siteLink/><gslib:rightArrow/>
     23        <gslib:collectionNameLinked/><gslib:rightArrow/>
     24        <a>
     25            <xsl:attribute name="href">
     26                <xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="/page/pageResponse/document/documentNode[1]/@nodeID"/>&amp;dt=<xsl:value-of select="/page/pageResponse/document/documentNode/@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>
     27            </xsl:attribute>
     28            <xsl:variable name="documentTitleVar">
     29                <gslib:documentTitle/>
     30            </xsl:variable>
     31            Document
     32        </a>
     33    </xsl:template>
    2234
    2335    <!-- the page content -->
     
    4557
    4658        <!-- display the document -->
    47                 <xsl:choose>
    48 
     59        <xsl:choose>
    4960            <xsl:when test="@external != ''">
    5061                <xsl:call-template name="externalPage">
     
    132143
    133144    </xsl:template>
    134   <xsl:template name="externalPage">
    135     <xsl:param name="external"/>
    136     <xsl:variable name="go_forward_link"><a><xsl:attribute name="href"><xsl:value-of select="$external"/></xsl:attribute><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/></a></xsl:variable>
    137     <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
    138     <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
    139     </p>
    140   </xsl:template>
    141 
     145   
     146    <xsl:template name="externalPage">
     147        <xsl:param name="external"/>
     148        <xsl:variable name="go_forward_link">
     149            <a>
     150                <xsl:attribute name="href">
     151                    <xsl:value-of select="$external"/>
     152                </xsl:attribute>
     153                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/>
     154            </a>
     155        </xsl:variable>
     156        <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
     157        <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/></p>
     158    </xsl:template>
    142159
    143160    <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/help.xsl

    r19988 r23813  
    1515
    1616    <!-- set page breadcrumbs -->
    17     <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     17    <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/> <gslib:collectionNameLinked/><gslib:rightArrow/></xsl:template>
    1818
    1919    <!-- the page content -->
    2020    <xsl:template match="page">
    21         Help text goes here
     21        <xsl:call-template name="helpTopics"/>
     22        <xsl:call-template name="findingInformationHelp"/>
     23        <xsl:call-template name="readingDocsHelp"/>
     24        <xsl:call-template name="searchingHelp"/>
     25        <xsl:call-template name="preferencesHelp"/>
     26    </xsl:template>
     27   
     28    <xsl:template name="helpTopics">
     29       
     30    </xsl:template>
     31
     32    <xsl:template name="findingInformationHelp">
     33        <xsl:variable name="searchEnabled">
     34            <xsl:choose>
     35                <xsl:when test="/page/pageResponse/collection[@name=$collName]/serviceList/service[@type='query']">1</xsl:when>
     36                <xsl:otherwise>0</xsl:otherwise>
     37            </xsl:choose>
     38        </xsl:variable>
     39       
     40        <xsl:variable name="numClassifiers">
     41            <xsl:value-of select="count(/page/pageResponse/collection[@name=$collName]/serviceList/service[@name = 'ClassifierBrowse']/classifierList/classifier)"/>
     42        </xsl:variable>
     43
     44        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.findinginformationtitle')"/>
     45        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.findinginformation', $searchEnabled + $numClassifiers)"/>
     46       
     47        <!-- using actual <ul> and <li> tags here would cause the XML parser to break -->
     48        <xsl:text disable-output-escaping="yes">&lt;ul&gt;</xsl:text>
     49        <xsl:if test="$searchEnabled = 1">
     50            <xsl:text disable-output-escaping="yes">&lt;li&gt;</xsl:text>
     51            <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchdesc')"/>
     52            <xsl:text disable-output-escaping="yes">&lt;/li&gt;</xsl:text>
     53        </xsl:if>
     54       
     55        <xsl:for-each select="/page/pageResponse/collection[@name=$collName]/serviceList/service[@name = 'ClassifierBrowse']/classifierList/classifier">
     56            <xsl:text disable-output-escaping="yes">&lt;li&gt;</xsl:text>
     57            <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.browsedesc', ./displayItem[@name = 'name'])"/>
     58            <xsl:text disable-output-escaping="yes">&lt;/li&gt;</xsl:text>
     59        </xsl:for-each>
     60        <xsl:text disable-output-escaping="yes">&lt;/ul&gt;</xsl:text>
     61    </xsl:template>
     62   
     63    <xsl:template name="readingDocsHelp">
     64        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.readingdocstitle')"/>
     65        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.readingdocs')"/>
     66       
     67        <table>
     68            <tr>
     69                <td colspan="2"><img src="interfaces/oran/images/bookshelf.png"/></td>
     70                <td><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.openbookshelf')"/></td>
     71            </tr>
     72            <tr>
     73                <td><img src="interfaces/oran/images/previous.png"/></td>
     74                <td><img src="interfaces/oran/images/next.png"/></td>
     75                <td><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.sectionarrows')"/></td>
     76            </tr>
     77        </table>
     78    </xsl:template>
     79   
     80    <xsl:template name="searchingHelp">
     81        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchingtitle')"/>
     82        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searching')"/>
     83       
     84        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.querytermstitle')"/>
     85        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.queryterms')"/>
     86       
     87        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.querytypetitle')"/>
     88        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.querytype')"/>
     89       
     90        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.queryscopetitle')"/>
     91        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.queryscope')"/>
     92    </xsl:template>
     93   
     94    <xsl:template name="preferencesHelp">
     95        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.changingpreferencestitle')"/>
     96        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.changingpreferences')"/>
     97       
     98        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.collectionpreferencestitle')"/>
     99        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.collectionpreferences')"/>
     100       
     101        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.languagepreferencestitle')"/>
     102        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.languagepreferences')"/>
     103       
     104        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.presentationpreferencestitle')"/>
     105        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.presentationpreferences')"/>
     106       
     107        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchpreferencestitle')"/>
     108        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchpreferences1')"/>
     109        <xsl:if test="/page/pageResponse/collection[@name=$collName and (@type='mgpp' or @type='mg')]">
     110            <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.mgsearchpreferences')"/>
     111        </xsl:if>
     112        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, 'help.searchpreferences2')"/>
    22113    </xsl:template>
    23114</xsl:stylesheet>
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/pref.xsl

    r20405 r23813  
    1919    <!-- the page content -->
    2020    <xsl:template match="/page">
     21   
     22        <!--
     23        Add some javascript to the page that notices when a preference is changed
     24        so that, if the user tries to navigate away from the page without clicking
     25        the "Set preferences" button, it asks them if they want their preferences
     26        saved or not
     27        -->
     28        <script type="text/javascript"><xsl:text disable-output-escaping="yes">
     29            var modified = false;
     30                   
     31            function assembleURLFromForm(formElem)
     32            {
     33                var url = "dev";
     34                var selectNodes = formElem.getElementsByTagName("select");
     35                var inputNodes = formElem.getElementsByTagName("input");
     36
     37                for (var i = 0; i &lt; selectNodes.length; i++)
     38                {
     39                    var current = selectNodes[i];
     40                    url += (url == "dev") ? "?" : "&amp;";
     41                    url += current.name + "=";
     42                    url += current.options[current.selectedIndex].text;
     43                }
     44               
     45                for (var i = 0; i &lt; inputNodes.length; i++)
     46                {
     47                    var current = inputNodes[i];
     48                    if (current.type == "hidden" || current.type == "text")
     49                    {
     50                        url += (url == "dev") ? "?" : "&amp;";
     51                        url += current.name + "=";
     52                        url += current.value;
     53                    }
     54                }
     55                return url;
     56            }
     57                   
     58            function checkModified(e)
     59            {
     60                if (modified)
     61                {
     62                    var ok = confirm("Would you like to save your preferences?");
     63                   
     64                    if (ok)
     65                    {
     66                        var formElem = document.getElementById("prefform");
     67                        formElem.submit();
     68                        var xmlhttp;
     69                        if (window.XMLHttpRequest)
     70                        {
     71                            xmlhttp=new XMLHttpRequest();
     72                        }
     73                        else
     74                        {
     75                            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     76                        }
     77                        //assembleURLFromForm(formElem);
     78                        xmlhttp.open("GET",assembleURLFromForm(formElem),false);
     79                        xmlhttp.send();
     80                    }
     81                }
     82            }
     83           
     84            function changed()
     85            {
     86                modified = true;
     87            }
     88           
     89            function pageLoad()
     90            {
     91                var formElem = document.getElementById("prefform");
     92           
     93                var selectNodes = formElem.getElementsByTagName("select");
     94                var inputNodes = formElem.getElementsByTagName("input");
     95
     96                YAHOO.util.Event.addListener(selectNodes, 'change', changed);
     97               
     98                for(var i = 0; i &lt; inputNodes.length; i++)
     99                {
     100                    current = inputNodes[i];
     101                    if(current.getAttribute("type") == null)
     102                    {
     103                        YAHOO.util.Event.on(current, 'keyup', changed);
     104                    }
     105                }
     106            }
     107           
     108            YAHOO.util.Event.addListener(window, 'load', pageLoad);
     109            YAHOO.util.Event.addListener(window, 'beforeunload', checkModified);
     110        </xsl:text></script>
    21111
    22112        <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     
    24114
    25115        <div id="queryform">
    26             <form name="PrefForm" method="get" action="{$library_name}">
     116            <form name="PrefForm" method="get" action="{$library_name}" id="prefform">
    27117
    28118                <input type='hidden' name='a' value='p'/>
     
    89179                <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></h3>
    90180                <div id="searchprefs">
    91                     <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>
     181                    <xsl:variable name="hits">
     182                        <xsl:choose>
     183                            <xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']">
     184                                <xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/>
     185                            </xsl:when>
     186                            <xsl:otherwise>
     187                                20
     188                            </xsl:otherwise>
     189                        </xsl:choose>
     190                    </xsl:variable>
    92191                    <div class="paramLabel">
    93192                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/>
     
    95194                    <div class="paramValue">
    96195                        <select name="hitsPerPage">
    97                             <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
    98                             <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
    99                             <option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
    100                             <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>
    101                         </select>
    102                     </div>
     196                            <option value="20">
     197                                <xsl:if test="$hits=20">
     198                                    <xsl:attribute name="selected" />
     199                                </xsl:if>
     200                                20
     201                            </option>
     202                            <option value="50">
     203                                <xsl:if test="$hits=50">
     204                                    <xsl:attribute name="selected" />
     205                                </xsl:if>
     206                                50
     207                            </option>
     208                            <option value="100">
     209                                <xsl:if test="$hits=100">
     210                                    <xsl:attribute name="selected" />
     211                                </xsl:if>
     212                                100
     213                            </option>
     214                            <option value="-1">
     215                                <xsl:if test="$hits=-1">
     216                                    <xsl:attribute name="selected" />
     217                                </xsl:if>
     218                                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/>
     219                            </option>
     220                        </select>
     221                    </div>
     222                   
     223                    <br class="clear"/>
     224                   
     225                    <xsl:variable name="mdocs">
     226                        <xsl:choose>
     227                            <xsl:when test="/page/pageRequest/paramList/param[@name='maxDocs']">
     228                                <xsl:value-of select="/page/pageRequest/paramList/param[@name='maxDocs']/@value"/>
     229                            </xsl:when>
     230                            <xsl:otherwise>100</xsl:otherwise>
     231                        </xsl:choose>
     232                    </xsl:variable>
     233                    <div class="paramLabel">
     234                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.maxDocs')"/>
     235                    </div>
     236                    <div class="paramValue">
     237                        <input name="maxDocs" size="3" value="{$mdocs}" />
     238                    </div>
     239                   
    103240                    <br class="clear"/>
    104241                </div>
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/query.xsl

    r20465 r23813  
    3636                            <xsl:for-each select="paramList/param">
    3737                                <xsl:choose>
     38                                    <xsl:when test="@name='case' or @name='stem' or @name='accent'">
     39                                    </xsl:when>
    3840                                    <xsl:when test="@type='multi'">
    3941                                        <xsl:apply-templates select="."><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates>
    4042                                    </xsl:when>
     43                                    <xsl:when test="@name = 'sortBy' or @name = 'maxDocs'"></xsl:when>
    4144                                    <xsl:otherwise>
    4245                                        <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable>
     
    115118    </xsl:template>
    116119
    117     <!-- invisible params - used by other stuff. in the query form, we set to teh default -->
     120    <!-- invisible params - used by other stuff. in the query form, we set to the default -->
    118121    <xsl:template match="param[@type='invisible']">
    119122        <xsl:param name="ns">s1.</xsl:param>
  • main/trunk/greenstone3/web/interfaces/oran/transform/util.xsl

    r22458 r23813  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <xsl:stylesheet version="1.0"
    3     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    4     xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
    5     xmlns:gslib="http://www.greenstone.org/XSL/Library"
    6     xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
    7     xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil"
    8     exclude-result-prefixes="util gslib gsf xslt">
    9 
    10     <!-- some global parameters - these are set by whoever is invoking the transformation -->
     2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslt="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/XSL/Library" xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:util="http://org.greenstone.gsdl3.util.XSLTUtil" version="1.0" exclude-result-prefixes="util gslib gsf xslt">
     3  <!-- some global parameters - these are set by whoever is invoking the transformation -->
    114  <xsl:param name="interface_name"/>
    125  <xsl:param name="library_name"/>
    13 
    146  <xsl:include href="xml-to-string.xsl"/>
    15 
    167  <!-- every pages ....................................................................... -->
    17     <xsl:template name="siteName"><xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/></xsl:template>
    18     <xsl:template name="siteLink"><a href="./{$library_name}"><xsl:call-template name="siteName"/><xsl:text> </xsl:text></a></xsl:template>
    19 
    20     <xsl:variable name="a"><xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>     </xsl:variable>
    21     <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
    22 
    23     <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable>
    24     <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
    25 
    26     <!-- template to get the name of the current collection -->
    27     <xsl:template name="collectionName">
    28         <xsl:choose>
    29             <xsl:when test="/page/pageResponse/collection"><xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/></xsl:when>
    30             <xsl:otherwise>All Collections</xsl:otherwise>
    31         </xsl:choose>
    32     </xsl:template>
    33 
    34     <xsl:template name="collectionNameShort">
    35         <xsl:value-of select="/page/pageResponse/collection/@name"/>
    36     </xsl:template>
    37 
    38     <xsl:template name="collectionNameLinked">
    39         <xsl:if test="/page/pageResponse/collection">
    40             <a>
    41                 <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&amp;sa=about&amp;c=<xsl:call-template name="collectionNameShort"/></xsl:attribute>
    42                 <xsl:call-template name="collectionName"/>
    43             </a>
    44         </xsl:if>
    45     </xsl:template>
    46 
    47     <!-- text to get the name of the current service ("Browse","Search" etc) -->
    48     <xsl:template name="serviceName">
    49         <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
    50     </xsl:template>
    51 
    52     <xsl:template name="textDirectionAttribute">
    53         <xsl:attribute name="dir">
    54             <xsl:choose>
    55                 <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>
    56                 <xsl:otherwise>ltr</xsl:otherwise>
    57             </xsl:choose>
    58         </xsl:attribute>
    59     </xsl:template>
    60 
    61     <xsl:template name="actionClass">
    62         <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>
    63     </xsl:template>
    64 
    65     <!-- username, if logged in -->
    66     <!--
     8  <xsl:template name="siteName">
     9    <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='siteName']"/>
     10  </xsl:template>
     11  <xsl:template name="siteLink">
     12    <a href="./{$library_name}">
     13      <xsl:call-template name="siteName"/>
     14      <xsl:text> </xsl:text>
     15    </a>
     16  </xsl:template>
     17  <xsl:variable name="a">
     18    <xsl:value-of select="/page/pageRequest/paramList/param[@name='a']/@value"/>
     19  </xsl:variable>
     20  <xsl:variable name="collections" select="/page/pageResponse/collectionList/collection"/>
     21  <xsl:variable name="berrybasketswitch">
     22    <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/>
     23  </xsl:variable>
     24  <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/>
     25  <!-- template to get the name of the current collection -->
     26  <xsl:template name="collectionName">
     27    <xsl:choose>
     28      <xsl:when test="/page/pageResponse/collection">
     29        <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
     30      </xsl:when>
     31      <xsl:otherwise>All Collections</xsl:otherwise>
     32    </xsl:choose>
     33  </xsl:template>
     34  <xsl:template name="collectionNameShort">
     35    <xsl:value-of select="/page/pageResponse/collection/@name"/>
     36  </xsl:template>
     37  <xsl:template name="collectionNameLinked">
     38    <xsl:if test="/page/pageResponse/collection">
     39      <a>
     40        <xsl:attribute name="href">./<xsl:value-of select="$library_name"/>?a=p&amp;sa=about&amp;c=<xsl:call-template name="collectionNameShort"/></xsl:attribute>
     41        <xsl:call-template name="collectionName"/>
     42      </a>
     43    </xsl:if>
     44  </xsl:template>
     45  <!-- text to get the name of the current service ("Browse","Search" etc) -->
     46  <xsl:template name="serviceName">
     47    <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
     48  </xsl:template>
     49  <xsl:template name="textDirectionAttribute">
     50    <xsl:attribute name="dir">
     51      <xsl:choose>
     52        <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>
     53        <xsl:otherwise>ltr</xsl:otherwise>
     54      </xsl:choose>
     55    </xsl:attribute>
     56  </xsl:template>
     57  <xsl:template name="actionClass">
     58    <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>
     59  </xsl:template>
     60  <!-- username, if logged in -->
     61  <!--
    6762    <xsl:template name="username">
    6863        <xsl:if test="$un_s!=''">
     
    7368    </xsl:template>
    7469    -->
    75 
    76     <xsl:template name="defaultDividerBar">
    77    <xsl:param name='text'/>
    78       <xsl:choose>
     70  <xsl:template name="defaultDividerBar">
     71    <xsl:param name="text"/>
     72    <xsl:choose>
    7973      <xsl:when test="$text">
    80      <div class="divbar"><xsl:value-of select="$text"/></div>
     74        <div class="divbar">
     75          <xsl:value-of select="$text"/>
     76        </div>
    8177      </xsl:when>
    8278      <xsl:otherwise>
    83      <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
     79        <div class="divbar">
     80          <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
     81        </div>
    8482      </xsl:otherwise>
    8583    </xsl:choose>
    8684  </xsl:template>
    87 
    88 
    89     <xsl:template match="error">
     85  <xsl:template match="error">
    9086    Error: <xsl:value-of select="."/>
    9187  </xsl:template>
    92 
    93 
    94 <xsl:template name="displayErrorsIfAny">
    95       <xsl:if test="descendant::error">
     88  <xsl:template name="displayErrorsIfAny">
     89    <xsl:if test="descendant::error">
    9690      <script language="Javascript">
    97     <xsl:text disable-output-escaping="yes">
     91        <xsl:text disable-output-escaping="yes">
    9892      function removeAllChildren(node) {
    9993        while (node.hasChildNodes()) {
     
    107101          hide_link = document.getElementById("hide");
    108102          removeAllChildren(hide_link);
    109           hide_link.appendChild(document.createTextNode("</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/><xsl:text disable-output-escaping="yes">"));
     103          hide_link.appendChild(document.createTextNode("</xsl:text>
     104        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'hide_error')"/>
     105        <xsl:text disable-output-escaping="yes">"));
    110106        } else {
    111107          obj.style.display = "none";
    112108          hide_link = document.getElementById("hide");
    113109          removeAllChildren(hide_link);
    114           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">"));
     110          hide_link.appendChild(document.createTextNode("</xsl:text>
     111        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/>
     112        <xsl:text disable-output-escaping="yes">"));
    115113        }
    116114      }
    117115    </xsl:text>
    118116      </script>
    119       <p align='right'><a id="hide" href="javascript:toggleHideError(error);"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/></a></p>
     117      <p align="right">
     118        <a id="hide" href="javascript:toggleHideError(error);">
     119          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'show_error')"/>
     120        </a>
     121      </p>
    120122      <div id="error" style="display: none;">
    121     <xsl:apply-templates select="descendant::error"/>
     123        <xsl:apply-templates select="descendant::error"/>
    122124      </div>
    123125    </xsl:if>
    124 </xsl:template>
    125 
    126 
    127     <xsl:template name="noTextBar">
    128         <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
    129     </xsl:template>
    130    
    131    
    132     <xsl:template name="poweredByGS3TextBar">
    133         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
    134     </xsl:template>
    135 
    136     <xsl:template name="rightArrow"><xsl:text disable-output-escaping="yes"> &amp;raquo; </xsl:text></xsl:template>
    137 
    138 
    139 
    140     <!-- site home ....................................................................... -->
    141 
    142 <xsl:template name="siteHomePageTitle">
    143  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    144 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/><xsl:text> </xsl:text>
    145 </xsl:template>
    146 
    147 
    148     <xsl:template name="selectACollectionTextBar">
    149      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
    150   </xsl:template>
    151     <xsl:template name="crossCollectionQuickSearchForm">
    152         <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
    153     </xsl:template>
    154    
    155     <xsl:template match="service[@name='TextQuery']">
    156         <form name="QuickSearch" method="get" action="{$library_name}">
    157             <input type="hidden" name="a" value="q"/>
    158             <input type="hidden" name="rt" value="rd"/>
    159             <input type="hidden" name="s" value="{@name}"/>
    160             <input type="hidden" name="s1.collection" value="all"/>
    161             <input type="text" name="s1.query" size="20"/>
    162             <input type="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/></xsl:attribute></input>
    163         </form>
    164     </xsl:template>
    165 
    166     <xsl:template name="collectionLinkWithImage">
    167         <xsl:choose>
    168             <xsl:when test="displayItem[@name='icon']">
    169                 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
    170                     <img class="collectionLinkImage">
    171                         <xsl:attribute name="alt"></xsl:attribute>
    172                         <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute>
    173                     </img>
    174 <!--
     126  </xsl:template>
     127  <xsl:template name="noTextBar">
     128    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
     129  </xsl:template>
     130  <xsl:template name="poweredByGS3TextBar">
     131    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/>
     132  </xsl:template>
     133  <xsl:template name="rightArrow">
     134    <xsl:text disable-output-escaping="yes"> &amp;raquo; </xsl:text>
     135  </xsl:template>
     136  <!-- site home ....................................................................... -->
     137  <xsl:template name="siteHomePageTitle">
     138    <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     139    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
     140    <xsl:text> </xsl:text>
     141  </xsl:template>
     142  <xsl:template name="selectACollectionTextBar">
     143    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/>
     144  </xsl:template>
     145  <xsl:template name="crossCollectionQuickSearchForm">
     146    <xsl:apply-templates select="serviceList/service[@name='TextQuery']"/>
     147  </xsl:template>
     148  <xsl:template match="service[@name='TextQuery']">
     149    <form name="QuickSearch" method="get" action="{$library_name}">
     150      <input type="hidden" name="a" value="q"/>
     151      <input type="hidden" name="rt" value="rd"/>
     152      <input type="hidden" name="s" value="{@name}"/>
     153      <input type="hidden" name="s1.collection" value="all"/>
     154      <input type="text" name="s1.query" size="20"/>
     155      <input type="submit">
     156        <xsl:attribute name="value">
     157          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.quick_search')"/>
     158        </xsl:attribute>
     159      </input>
     160    </form>
     161  </xsl:template>
     162  <xsl:template name="collectionLinkWithImage">
     163    <xsl:choose>
     164      <xsl:when test="displayItem[@name='icon']">
     165        <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
     166          <img class="collectionLinkImage">
     167            <xsl:attribute name="alt"/>
     168            <xsl:attribute name="src">sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/></xsl:attribute>
     169          </img>
     170          <!--
    175171                    <div class="collectionLink">
    176172                        <xsl:attribute name="style">background-image: url(/sites/localsite/collect/<xsl:value-of select="@name"/>/images/<xsl:value-of select="displayItem[@name='icon']"/>);</xsl:attribute>
     
    178174                    </div>
    179175-->
    180                 </a>
     176        </a>
     177      </xsl:when>
     178      <xsl:otherwise>
     179        <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
     180          <div class="collectionLink">
     181            <xsl:value-of select="displayItem[@name='name']"/>
     182          </div>
     183        </a>
     184      </xsl:otherwise>
     185    </xsl:choose>
     186  </xsl:template>
     187  <xsl:template name="serviceClusterList">
     188    <xsl:apply-templates select="serviceClusterList"/>
     189  </xsl:template>
     190  <xsl:template match="serviceClusterList">
     191    <xsl:for-each select="serviceCluster">
     192      <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
     193        <xsl:value-of select="@name"/>
     194        <xsl:value-of select="displayItem[@name='name']"/>
     195      </a>
     196    </xsl:for-each>
     197  </xsl:template>
     198  <xsl:template name="serviceLink">
     199    <div class="paramLabel">
     200      <a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}">
     201        <xsl:value-of select="displayItem[@name='name']"/>
     202      </a>
     203    </div>
     204    <div class="paramValue">
     205      <xsl:value-of select="displayItem[@name='description']"/>
     206    </div>
     207    <br class="clear"/>
     208  </xsl:template>
     209  <xsl:template name="authenticationLink">
     210    <xsl:for-each select="serviceList/service[@type='authen']">
     211      <li>
     212        <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=">
     213          <xsl:value-of select="displayItem[@name='name']"/>
     214        </a>
     215        <xsl:value-of select="displayItem[@name='description']"/>
     216      </li>
     217    </xsl:for-each>
     218  </xsl:template>
     219  <xsl:template name="libraryInterfaceLink">
     220    <li>
     221      <a href="{$library_name}?a=p&amp;sa=gli4gs3">
     222        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/>
     223      </a>
     224    </li>
     225  </xsl:template>
     226  <xsl:template name="greenstoneLogoAlternateText">
     227    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
     228  </xsl:template>
     229  <!-- about page - collection home ....................................................................... -->
     230  <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     231  <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     232  <xsl:param name="pageType"/>
     233  <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
     234  <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
     235  <xsl:template name="aboutCollectionPageTitle">
     236    <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     237    <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/>
     238    <xsl:text> </xsl:text>
     239  </xsl:template>
     240  <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
     241    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
     242      <xsl:choose>
     243        <xsl:when test="$this-element/displayItem[@name='icon']">
     244          <img border="0">
     245            <xsl:attribute name="src"><xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/></xsl:attribute>
     246            <xsl:attribute name="alt">
     247              <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     248            </xsl:attribute>
     249            <xsl:attribute name="title">
     250              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
     251            </xsl:attribute>
     252          </img>
     253        </xsl:when>
     254        <xsl:otherwise>
     255          <xsl:value-of select="$this-element/displayItem[@name='name']"/>
     256        </xsl:otherwise>
     257      </xsl:choose>
     258    </a>
     259  </xsl:template>
     260  <xsl:template name="homeButtonTop">
     261    <a href="{$library_name}?a=p&amp;sa=home">
     262      <xsl:attribute name="title">
     263        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/>
     264      </xsl:attribute>
     265      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
     266    </a>
     267  </xsl:template>
     268  <xsl:template name="helpButtonTop">
     269    <xsl:choose>
     270      <xsl:when test="$pageType='help'">
     271        <li>
     272          <a>
     273            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
     274          </a>
     275        </li>
     276      </xsl:when>
     277      <xsl:otherwise>
     278        <li>
     279          <a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}">
     280            <xsl:attribute name="title">
     281              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/>
     282            </xsl:attribute>
     283            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
     284          </a>
     285        </li>
     286      </xsl:otherwise>
     287    </xsl:choose>
     288  </xsl:template>
     289  <xsl:template name="preferencesButtonTop">
     290    <xsl:choose>
     291      <xsl:when test="$pageType='pref'">
     292        <li>
     293          <a>
     294            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     295          </a>
     296        </li>
     297      </xsl:when>
     298      <xsl:otherwise>
     299        <li>
     300          <a href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}">
     301            <xsl:attribute name="title">
     302              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/>
     303            </xsl:attribute>
     304            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     305          </a>
     306        </li>
     307      </xsl:otherwise>
     308    </xsl:choose>
     309  </xsl:template>
     310  <xsl:template name="servicesNavigationBar">
     311    <xsl:for-each select="$this-element/serviceList/service">
     312      <xsl:variable name="action">
     313        <xsl:choose>
     314          <xsl:when test="@name=$this-service">CURRENT</xsl:when>
     315          <xsl:when test="@type='query'">q</xsl:when>
     316          <xsl:when test="@type='browse'">b</xsl:when>
     317          <xsl:when test="@type='process'">pr</xsl:when>
     318          <xsl:when test="@type='applet'">a</xsl:when>
     319          <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
     320        </xsl:choose>
     321      </xsl:variable>
     322      <xsl:choose>
     323        <xsl:when test="$action='CURRENT'">
     324          <li>
     325            <a>
     326              <xsl:value-of select="displayItem[@name='name']"/>
     327            </a>
     328          </li>
     329        </xsl:when>
     330        <xsl:when test="$action !='DO_NOT_DISPLAY'">
     331          <li>
     332            <a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}">
     333              <xsl:if test="displayItem[@name='description']">
     334                <xsl:attribute name="title">
     335                  <xsl:value-of select="displayItem[@name='description']"/>
     336                </xsl:attribute>
     337              </xsl:if>
     338              <xsl:value-of select="displayItem[@name='name']"/>
     339            </a>
     340          </li>
     341        </xsl:when>
     342      </xsl:choose>
     343    </xsl:for-each>
     344  </xsl:template>
     345  <xsl:template name="collectionDescriptionTextAndServicesLinks">
     346    <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
     347  </xsl:template>
     348  <xsl:template match="collection|serviceCluster">
     349    <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
     350    <xsl:apply-templates select="serviceList">
     351      <xsl:with-param name="collName" select="$collName"/>
     352    </xsl:apply-templates>
     353  </xsl:template>
     354  <xsl:template match="serviceList">   
     355    <xsl:param name="collName"/>
     356    <xsl:if test="service[not(@type = 'query' or @type = 'browse' or @type = 'retrieve')]">
     357        <h3>
     358          <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/>
     359        </h3>
     360        <p>
     361          <xsl:choose>
     362            <xsl:when test="service">
     363              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
    181364            </xsl:when>
    182365            <xsl:otherwise>
    183                 <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}">
    184                     <div class="collectionLink">
    185                         <xsl:value-of select="displayItem[@name='name']"/>
    186                     </div>
    187                 </a>
     366              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
    188367            </xsl:otherwise>
    189         </xsl:choose>
    190     </xsl:template>
    191 
    192 
    193     <xsl:template name="serviceClusterList">
    194         <xsl:apply-templates select="serviceClusterList"/>
    195     </xsl:template>
    196    
    197       <xsl:template match="serviceClusterList">
    198         <xsl:for-each select="serviceCluster">
    199           <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>
    200         </xsl:for-each>
    201       </xsl:template>
    202 
    203    
    204     <xsl:template name="serviceLink">
    205         <div class="paramLabel"><a href="{$library_name}?a=q&amp;rt=d&amp;s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></div>
    206         <div class="paramValue"><xsl:value-of select="displayItem[@name='description']"/></div>
    207         <br class="clear"/>
    208     </xsl:template>
    209 
    210 
    211    <xsl:template name="authenticationLink">
    212    <xsl:for-each select="serviceList/service[@type='authen']">
    213       <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>
    214   </xsl:template>
    215    <xsl:template name="libraryInterfaceLink">
    216    <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>
    217   </xsl:template>
    218 <xsl:template name="greenstoneLogoAlternateText">
    219 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/>
    220 </xsl:template>
    221 
    222 <!-- about page - collection home ....................................................................... -->
    223 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    224 <xsl:param name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    225 <xsl:param name="pageType"/>
    226 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/>
    227 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/>
    228 
    229 
    230 <xsl:template name="aboutCollectionPageTitle">
    231  <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    232 <xsl:value-of select="/page/pageResponse/collection/displayItem[@name='name']"/><xsl:text> </xsl:text>
    233 </xsl:template>
    234 
    235    
    236 <xsl:template name="collectionHomeLinkWithLogoIfAvailable">
    237 <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
    238       <xsl:choose>
    239         <xsl:when test="$this-element/displayItem[@name='icon']">
    240           <img border="0">
    241         <xsl:attribute name="src">
    242           <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/>
    243         </xsl:attribute>   
    244         <xsl:attribute name="alt">
    245           <xsl:value-of select="$this-element/displayItem[@name='name']"/>
    246         </xsl:attribute>
    247         <xsl:attribute name="title">
    248           <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/>
    249         </xsl:attribute>
    250           </img>
    251         </xsl:when>
    252         <xsl:otherwise>
    253           <xsl:value-of select="$this-element/displayItem[@name='name']"/>
    254         </xsl:otherwise>
    255       </xsl:choose>
    256     </a>
    257 </xsl:template>
    258 
    259 
    260 <xsl:template name="homeButtonTop">
    261 <a href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
    262 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/></a>
    263 </xsl:template>
    264 
    265 
    266 <xsl:template name="helpButtonTop">
     368          </xsl:choose>
     369        </p>
     370        <xsl:if test="service">
     371          <div id="servicelist">
     372            <xsl:for-each select="service">
     373              <xsl:sort select="position()" order="descending" data-type="number"/>
     374              <xsl:variable name="action">
     375                <xsl:choose>
     376                  <xsl:when test="@type='query'">q</xsl:when>
     377                  <xsl:when test="@type='browse'">b</xsl:when>
     378                  <xsl:when test="@type='process'">pr</xsl:when>
     379                  <xsl:when test="@type='applet'">a</xsl:when>
     380                  <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
     381                </xsl:choose>
     382              </xsl:variable>
     383              <xsl:if test="$action != 'DO_NOT_DISPLAY'">
     384                <div class="paramLabel">
     385                  <a href="{$library_name}?a={$action}&amp;rt=d&amp;s={@name}&amp;c={$collName}">
     386                    <xsl:value-of select="displayItem[@name='name']"/>
     387                  </a>
     388                </div>
     389                <div class="paramLabel">
     390                  <xsl:value-of select="displayItem[@name='description']"/>
     391                </div>
     392                <br class="clear"/>
     393              </xsl:if>
     394            </xsl:for-each>
     395          </div>
     396        </xsl:if>
     397    </xsl:if>
     398  </xsl:template>
     399  <!-- classifier page ............................................................................ -->
     400  <xsl:template name="collapsedNavigationTab">
     401    <xsl:param name="type"/>
     402    <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/>
     403    <li>
     404      <xsl:if test="$isCurrent">
     405        <xsl:attribute name="class">current</xsl:attribute>
     406      </xsl:if>
     407      <a>
     408        <xsl:if test="service[@name=$type]/displayItem[@name='description']">
     409          <xsl:attribute name="title">
     410            <xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/>
     411          </xsl:attribute>
     412        </xsl:if>
     413        <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=q&amp;rt=d&amp;s=<xsl:value-of select="service[@type=$type]/@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
     414        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/>
     415      </a>
     416    </li>
     417  </xsl:template>
     418  <xsl:template name="navigationTab">
     419    <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
     420    <xsl:variable name="action">
     421      <xsl:choose>
     422        <xsl:when test="@type='query'">q</xsl:when>
     423        <xsl:when test="@type='browse'">b</xsl:when>
     424        <xsl:when test="@type='process'">pr</xsl:when>
     425        <xsl:when test="@type='applet'">a</xsl:when>
     426        <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
     427      </xsl:choose>
     428    </xsl:variable>
     429    <xsl:if test="$action!='DO_NOT_DISPLAY'">
     430      <li>
     431        <xsl:if test="$isCurrent">
     432          <xsl:attribute name="class">current</xsl:attribute>
     433        </xsl:if>
     434        <a>
     435          <xsl:if test="displayItem[@name='description']">
     436            <xsl:attribute name="title">
     437              <xsl:value-of select="displayItem[@name='description']"/>
     438            </xsl:attribute>
     439          </xsl:if>
     440          <xsl:choose>
     441            <xsl:when test="classifierList/classifier/@name">
     442              <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&amp;rt=s&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;cl=<xsl:value-of select="classifierList/classifier/@name"/></xsl:attribute>
     443            </xsl:when>
     444            <xsl:otherwise>
     445              <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&amp;rt=d&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
     446            </xsl:otherwise>
     447          </xsl:choose>
     448          <xsl:value-of select="displayItem[@name='name']"/>
     449        </a>
     450      </li>
     451    </xsl:if>
     452  </xsl:template>
     453  <xsl:template name="classifierLink">
     454    <xsl:if test="@name=/page/pageResponse/classifier/@name">
     455      <xsl:attribute name="class">current</xsl:attribute>
     456    </xsl:if>
     457    <a href="{$library_name}?a=b&amp;rt=r&amp;s={/page/pageResponse/service/@name}&amp;c={/page/pageResponse/collection/@name}&amp;cl={@name}">
     458      <xsl:value-of select="displayItem[@name='description']"/>
     459    </a>
     460  </xsl:template>
     461  <!-- query page ............................................................................ -->
     462  <xsl:template name="indexName">
     463    <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
     464  </xsl:template>
     465  <xsl:template name="queryPageCollectionName">
    267466    <xsl:choose>
    268       <xsl:when test="$pageType='help'">
    269     <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li>
     467      <xsl:when test="/page/pageResponse/collection">
     468        <gslib:aboutCollectionPageTitle/>
    270469      </xsl:when>
    271       <xsl:otherwise>
    272     <li><a href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
    273         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    274       </a></li>
    275       </xsl:otherwise>
     470      <xsl:otherwise>Cross-Collection</xsl:otherwise>
    276471    </xsl:choose>
    277 </xsl:template>
    278 
    279 
    280     <xsl:template name="preferencesButtonTop">
    281         <xsl:choose>
    282             <xsl:when test="$pageType='pref'">
    283                 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li>
    284             </xsl:when>
    285             <xsl:otherwise>
    286                 <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>
    287                     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    288                 </a></li>
    289             </xsl:otherwise>
    290         </xsl:choose>
    291     </xsl:template>
    292 
    293     <xsl:template name="servicesNavigationBar">
    294         <xsl:for-each select="$this-element/serviceList/service">
    295             <xsl:variable name="action"><xsl:choose>
    296                 <xsl:when test="@name=$this-service">CURRENT</xsl:when>
    297                 <xsl:when test="@type='query'">q</xsl:when>
    298                 <xsl:when test="@type='browse'">b</xsl:when>
    299                 <xsl:when test="@type='process'">pr</xsl:when>
    300                 <xsl:when test="@type='applet'">a</xsl:when>
    301                 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
    302             </xsl:choose></xsl:variable>
    303             <xsl:choose>
    304                 <xsl:when test="$action='CURRENT'">
    305                     <li><a><xsl:value-of select="displayItem[@name='name']"/></a></li>
    306                 </xsl:when>
    307                 <xsl:when test="$action !='DO_NOT_DISPLAY'">
    308                     <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>
    309                 </xsl:when>
    310             </xsl:choose>
    311         </xsl:for-each>
    312     </xsl:template>
    313 
    314 
    315     <xsl:template name="collectionDescriptionTextAndServicesLinks">
    316         <xsl:apply-templates select="pageResponse/collection|serviceCluster"/>
    317     </xsl:template>
    318 
    319     <xsl:template match="collection|serviceCluster">
    320         <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/>
    321         <xsl:apply-templates select="serviceList">
    322             <xsl:with-param name="collName" select="$collName"/>
    323         </xsl:apply-templates>
    324     </xsl:template>
    325 
    326 
    327     <xsl:template match="serviceList">
    328         <xsl:param name="collName"/>
    329         <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.services')"/></h3>
    330         <p>
    331             <xsl:choose>
    332                 <xsl:when test="service">
    333                     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.servicehelp')"/>
    334                 </xsl:when>
    335                 <xsl:otherwise>
    336                     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.noservices')"/>
    337                 </xsl:otherwise>
    338             </xsl:choose>
    339         </p>
    340 
    341         <xsl:if test="service">
    342             <div id="servicelist">
    343                 <xsl:for-each select="service">
    344                     <xsl:sort select="position()" order="descending" data-type="number"/>
    345 
    346                     <xsl:variable name="action"><xsl:choose>
    347                         <xsl:when test="@type='query'">q</xsl:when>
    348                         <xsl:when test="@type='browse'">b</xsl:when>
    349                         <xsl:when test="@type='process'">pr</xsl:when>
    350                         <xsl:when test="@type='applet'">a</xsl:when>
    351                         <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
    352                     </xsl:choose></xsl:variable>
    353                     <xsl:if test="$action != 'DO_NOT_DISPLAY'">
    354                         <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>
    355                         <div class="paramLabel"><xsl:value-of select="displayItem[@name='description']"/></div>
    356                         <br class="clear"/>
    357                     </xsl:if>
    358                 </xsl:for-each>
    359             </div>
    360         </xsl:if>
    361     </xsl:template>
    362 
    363 
    364 
    365 <!-- classifier page ............................................................................ -->
    366 
    367 <xsl:template name="collapsedNavigationTab">
    368     <xsl:param name="type"/>
    369     <xsl:variable name="isCurrent" select="/page/pageResponse/service[@type=$type]"/>
    370     <li>
    371         <xsl:if test="$isCurrent">
    372             <xsl:attribute name="class">current</xsl:attribute>
    373         </xsl:if>
    374         <a>
    375             <xsl:if test="service[@name=$type]/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="service[@name=$type]/displayItem[@name='description']"/></xsl:attribute></xsl:if>
    376             <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=q&amp;rt=d&amp;s=<xsl:value-of select="service[@type=$type]/@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
    377             <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $type)"/>
    378         </a>
    379     </li>
    380 </xsl:template>
    381 
    382 <xsl:template name="navigationTab">
    383 
    384     <xsl:variable name="isCurrent" select="@name=/page/pageResponse/service/@name"/>
    385 
    386     <xsl:variable name="action"><xsl:choose>
    387         <xsl:when test="@type='query'">q</xsl:when>
    388         <xsl:when test="@type='browse'">b</xsl:when>
    389         <xsl:when test="@type='process'">pr</xsl:when>
    390         <xsl:when test="@type='applet'">a</xsl:when>
    391         <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise>
    392     </xsl:choose></xsl:variable>
    393 
    394     <xsl:if test="$action!='DO_NOT_DISPLAY'">
    395         <li>
    396             <xsl:if test="$isCurrent">
    397                 <xsl:attribute name="class">current</xsl:attribute>
    398             </xsl:if>
    399             <a>
    400                 <xsl:if test="displayItem[@name='description']">
    401                     <xsl:attribute name='title'><xsl:value-of select="displayItem[@name='description']"/></xsl:attribute>
    402                 </xsl:if>
    403                 <xsl:choose>
    404                     <xsl:when test="classifierList/classifier/@name">
    405                         <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&amp;rt=s&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;cl=<xsl:value-of select="classifierList/classifier/@name"/></xsl:attribute>
    406                     </xsl:when>
    407                     <xsl:otherwise>
    408                         <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=<xsl:value-of select="$action"/>&amp;rt=d&amp;s=<xsl:value-of select="@name"/>&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/></xsl:attribute>
    409                     </xsl:otherwise>
    410                 </xsl:choose>
    411                 <xsl:value-of select="displayItem[@name='name']"/>
    412             </a>
    413         </li>
    414     </xsl:if>
    415 
    416 </xsl:template>
    417 
    418 
    419 <xsl:template name="classifierLink">
    420     <xsl:if test="@name=/page/pageResponse/classifier/@name"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
    421     <a href="{$library_name}?a=b&amp;rt=r&amp;s={/page/pageResponse/service/@name}&amp;c={/page/pageResponse/collection/@name}&amp;cl={@name}">
    422         <xsl:value-of select="displayItem[@name='description']"/>
    423     </a>
    424 </xsl:template>
    425 
    426 <!-- query page ............................................................................ -->
    427 
    428     <xsl:template name="indexName">
    429         <xsl:value-of select="/page/pageResponse/service/displayItem[@name='name']"/>
    430     </xsl:template>
    431 
    432 <xsl:template name="queryPageCollectionName">
    433     <xsl:choose><xsl:when test="/page/pageResponse/collection"><gslib:aboutCollectionPageTitle/></xsl:when><xsl:otherwise>Cross-Collection</xsl:otherwise></xsl:choose>
    434 </xsl:template>
    435 
    436 
    437 
    438 
    439 
    440 <!--
     472  </xsl:template>
     473  <!--
    441474BERRY BASKET TEMPLATES
    442475These get used on many different pages to add the
    443476berry basket function to the site
    444477-->
    445 
    446 <!-- put the drag&drop berry basket on the page -->
    447 <xsl:template name="berryBasket">
    448     <xsl:if test="$berryBasketOn">
    449         <div id="berrybasket" class="hide">
    450             <span>Berry Basket</span>
    451             <span id="berryBasketExpandCollapseLinks" style="display: none;">
    452                 <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
    453                 <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
    454             </span>
    455             <div id="baskethandle"><span><xsl:text> </xsl:text></span></div>
    456             <div id ="berries"><span><xsl:text> </xsl:text></span></div>
    457         </div>
    458     </xsl:if>
    459 </xsl:template>
    460 
    461 <!-- include the required javascript and css for berry baskets -->
    462 <xsl:template name="berryBasketHeadTags">
    463     <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script>
    464     <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script>
    465     <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script>
    466     <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script>
    467     <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script>
    468     <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script>
    469     <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script>
    470     <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script>
    471     <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
    472 </xsl:template>
    473 
    474 <!--
     478  <!-- put the drag&drop berry basket on the page -->
     479  <xsl:template name="berryBasket">
     480    <xsl:if test="$berryBasketOn">
     481      <div id="berrybasket" class="hide">
     482        <span>Berry Basket</span>
     483        <span id="berryBasketExpandCollapseLinks" style="display: none;">
     484          <a id="berryBasketExpandLink" href="javascript:showBasket()">Expand</a>
     485          <a id="berryBasketCollapseLink" style="display: none;" href="javascript:hideBasket()">Collapse</a>
     486        </span>
     487        <div id="baskethandle">
     488          <span>
     489            <xsl:text> </xsl:text>
     490          </span>
     491        </div>
     492        <div id="berries">
     493          <span>
     494            <xsl:text> </xsl:text>
     495          </span>
     496        </div>
     497      </div>
     498    </xsl:if>
     499  </xsl:template>
     500  <!-- include the required javascript and css for berry baskets -->
     501  <xsl:template name="berryBasketHeadTags">
     502    <script type="text/javascript" src="interfaces/{$interface_name}/js/YAHOO.js"><xsl:text> </xsl:text></script>
     503    <script type="text/javascript" src="interfaces/{$interface_name}/js/event.js"><xsl:text> </xsl:text></script>
     504    <script type="text/javascript" src="interfaces/{$interface_name}/js/connection.js"><xsl:text> </xsl:text></script>
     505    <script type="text/javascript" src="interfaces/{$interface_name}/js/dom.js"><xsl:text> </xsl:text></script>
     506    <script type="text/javascript" src="interfaces/{$interface_name}/js/dragdrop.js"><xsl:text> </xsl:text></script>
     507    <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDPlayer.js"><xsl:text> </xsl:text></script>
     508    <script type="text/javascript" src="interfaces/{$interface_name}/js/ygDDOnTop.js"><xsl:text> </xsl:text></script>
     509    <script type="text/javascript" src="interfaces/{$interface_name}/js/berrybasket.js"><xsl:text> </xsl:text></script>
     510    <link rel="stylesheet" href="interfaces/{$interface_name}/style/berry.css" type="text/css"/>
     511  </xsl:template>
     512  <!--
    475513create a little berry which can be drag&dropped onto the berry basket
    476514used on classifier and search result pages
    477515-->
    478 <xsl:template name="documentBerryForClassifierOrSearchPage">
    479     <xsl:if test="$berryBasketOn">
    480         <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
    481             <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
    482         </img>
    483     </xsl:if>
    484 </xsl:template>
    485 
    486 <!--
     516  <xsl:template name="documentBerryForClassifierOrSearchPage">
     517    <xsl:if test="$berryBasketOn">
     518      <img class="pick" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0">
     519        <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute>
     520      </img>
     521    </xsl:if>
     522  </xsl:template>
     523  <!--
    487524create little berrys which can be drag&dropped onto the berry basket
    488525used on the document page
    489526-->
    490 <xsl:template name="documentBerryForDocumentPage">
    491     <xsl:variable name="selectedNode"><xsl:value-of select="/page/pageResponse/document/@selectedNode"/></xsl:variable>
    492     <xsl:variable name="rootNode"><xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/></xsl:variable>
    493 
    494     <xsl:if test="$berryBasketOn"> 
    495         <div id="documentberries">
    496             <img class='pick' id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
    497             <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
    498 
    499             <xsl:if test="$selectedNode != $rootNode">
    500                 <img class='pick'  id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
    501                 <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
    502             </xsl:if>
    503         </div>
    504     </xsl:if>
    505 </xsl:template>
    506 
    507 
    508 <!-- document page -->
    509 <xsl:template name="documentTitle">
    510     <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
    511 </xsl:template>
    512 
    513 
    514 <xsl:template name="coverImage">
    515     <img><xsl:attribute name='src'><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute></img>
    516 </xsl:template>
    517 
    518 <xsl:template name="previousNextButtons">
    519     <!-- prev -->
    520     <a>
    521         <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="@selectedNode"/>.pp&amp;sib=1&amp;p.s=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.a"]/@value'/></xsl:attribute>
    522         <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
    523     </a>
    524 
    525     <!-- next -->
    526     <a>
    527         <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="@selectedNode"/>.np&amp;sib=1&amp;p.s=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='/page/pageRequest/paramList/param[@name="p.a"]/@value'/></xsl:attribute>
    528         <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
    529     </a>
    530 
    531 </xsl:template>
    532 
    533 
     527  <xsl:template name="documentBerryForDocumentPage">
     528    <xsl:variable name="selectedNode">
     529      <xsl:value-of select="/page/pageResponse/document/@selectedNode"/>
     530    </xsl:variable>
     531    <xsl:variable name="rootNode">
     532      <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/>
     533    </xsl:variable>
     534    <xsl:if test="$berryBasketOn">
     535      <div id="documentberries">
     536        <img class="pick" id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
     537        <span id="{/page/pageResponse/collection/@name}:{$rootNode}:root" class="documentberry">the whole document</span>
     538        <xsl:if test="$selectedNode != $rootNode">
     539          <img class="pick" id="{/page/pageResponse/collection/@name}:{$selectedNode}" src="interfaces/{$interface_name}/images/berry.png" alt="in basket" width="15" height="15" border="0"/>
     540          <span id="{/page/pageResponse/collection/@name}:{$selectedNode}:section" class="documentberry">the current section</span>
     541        </xsl:if>
     542      </div>
     543    </xsl:if>
     544  </xsl:template>
     545  <!-- document page -->
     546  <xsl:template name="documentTitle">
     547    <xsl:value-of select="/page/pageResponse/document/documentNode/metadataList/metadata[@name='Title']"/>
     548  </xsl:template>
     549  <xsl:template name="coverImage">
     550    <img>
     551      <xsl:attribute name="src"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg</xsl:attribute>
     552    </img>
     553  </xsl:template>
     554  <xsl:template name="previousNextButtons">
     555    <!-- prev -->
     556    <a>
     557      <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="@selectedNode"/>.pp&amp;sib=1&amp;p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.s&quot;]/@value"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.sa&quot;]/@value"/>&amp;p.a=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.a&quot;]/@value"/></xsl:attribute>
     558      <img class="lessarrow" src="interfaces/{$interface_name}/images/previous.png"/>
     559    </a>
     560    <!-- next -->
     561    <a>
     562      <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="@selectedNode"/>.np&amp;sib=1&amp;p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.s&quot;]/@value"/>&amp;p.sa=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.sa&quot;]/@value"/>&amp;p.a=<xsl:value-of select="/page/pageRequest/paramList/param[@name=&quot;p.a&quot;]/@value"/></xsl:attribute>
     563      <img class="morearrow" src="interfaces/{$interface_name}/images/next.png"/>
     564    </a>
     565  </xsl:template>
    534566</xsl:stylesheet>
Note: See TracChangeset for help on using the changeset viewer.