Ignore:
Timestamp:
2011-05-09T14:37:04+12:00 (13 years ago)
Author:
sjm84
Message:

Updating this branch to match the latest Greenstone3 changes

Location:
main/branches/64_bit_Greenstone/greenstone3
Files:
14 edited
11 copied

Legend:

Unmodified
Added
Removed
  • main/branches/64_bit_Greenstone/greenstone3

  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/js/berrybasket.js

    r19854 r24007  
    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/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/js/berrycheckout.js

    r19854 r24007  
    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/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/style/berry.css

    r19855 r24007  
    1111}
    1212
     13#berrybasket_new {
     14    min-height: 22px;
     15    padding: 5px;
     16    /* background: #E0F0E0 url("../images/berrybasket.png") scroll no-repeat 0 0; */
     17    background: transparent url("../images/kete2.png") scroll repeat 0 0;
     18    z-index:10;
     19    /*cursor: pointer;*/
     20    font-size: 80%;
     21    min-height: 2em;
     22    top:120px;
     23    right:0;
     24    position:fixed;
     25    height:500px;
     26    width:9.5%;
     27}
     28
    1329#baskethandle {
    1430    cursor: move;
     
    3955    display:block;
    4056    cursor: pointer;
    41     text-align: right;
     57    text-align: left;
    4258    padding: .5em;
    4359}
     
    142158   font-weight: bold;
    143159   cursor: pointer;
    144    width: 5em;
     160   /*width: 5em;*/
    145161   font-size: 90%;
    146162   margin: 1em 0 0 0;
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/style/core.css

    r22784 r24007  
    1111}
    1212
     13h3 {
     14    margin-top:2px;
     15    margin-bottom:2px;
     16}
     17
     18p {
     19    margin-top:0px;
     20    margin-bottom:0.75em;
     21}
     22
     23.sectionHeader {
     24    margin-top:0px;
     25    margin-bottom:0px;
     26}
     27
     28.headerTD {
     29    vertical-align: middle;
     30}
     31
     32/* Styles for the different depths */
     33.sectionHeaderDepthTitle{
     34    font-size:1.8em;
     35    line-height:1em;
     36    font-weight:bold;
     37}
     38
     39.sectionHeaderDepth1{
     40    font-size:1.6em;
     41    line-height:1em;
     42    font-weight:bold;
     43}
     44
     45.sectionHeaderDepth2{
     46    font-size:1.4em;
     47    line-height:1em;
     48    font-weight:bold;
     49    font-style:italic;
     50}
     51
     52.sectionHeaderDepth3{
     53    font-size:1.2em;
     54    line-height:1em;
     55    font-style:italic;
     56}
     57
     58.sectionHeaderDepth4{
     59    font-size:1em;
     60    line-height:1em;
     61    font-weight:italic;
     62}
     63
     64.sectionNumberSpan{
     65    /*Uncomment this line to disable automatic section numbering*/
     66    /*display:none;*/
     67}
     68
     69.sectionContainer{
     70    padding-top:1em;
     71    padding-bottom:1em;
     72    padding-left:1.5em;
     73}
     74
     75.icon{
     76    background-repeat: no-repeat;
     77    height:16px;
     78    width:16px;
     79    cursor:pointer;
     80}
     81
     82.toggleImageExpand {
     83    background-image: url('../images/expand.png');
     84    background-position: 2px 2px;
     85}
     86
     87.toggleImageCollapse {
     88    background-image: url('../images/collapse.png');
     89    background-position: 2px 2px;
     90}
     91
     92.toggleImagePage {
     93    background-image: url('../images/page.png');
     94    background-position: 2px 2px;
     95}
     96
     97.toggleImageChapter {
     98    background-image: url('../images/chapter.png');
     99}
     100
     101.realisticBookIcon {
     102    background-repeat: no-repeat;
     103    background-image: url('../images/rbook.png');
     104    height: 32px;
     105    width: 32px;
     106}
     107
     108.backToTop {
     109    font-size:0.7em;
     110    padding-left: 2em;
     111    text-align:center;
     112}
     113
    13114#container {
    14115    position: relative;
     
    16117    max-width: 1000px;
    17118    padding: 0;
    18     line-height: 160%;
    19 /*  background: url('../images/layout/containerLeft.png') scroll repeat-y left top;*/
     119    line-height: 120%;
    20120    background-color: #fff;
    21121    border: 1px solid #c8c3b9;
    22122}
    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 */
    35123
    36124#gs_banner {
    37     background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top;
     125    /*background: transparent url('../images/gsdlhead.gif') scroll no-repeat left top;*/
     126    background-color: #008800;
    38127    padding: 10px 20px 30px 20px;
    39128    min-height: 80px;
    40     max-height: 110px;
    41129    position: relative;
    42130}
     
    44132#gs_content {
    45133    padding: 1em;
     134    padding-right: 2em;
    46135    min-height: 300px;
    47136    /* background-color: #ff0; */
    48137}
    49138
     139.termList {
     140    font-size:12px;
     141    line-height:14px;
     142}
     143
     144.noTermHighlight{
     145
     146}
     147
     148.termHighlight{
     149    background:yellow;
     150}
     151
     152.viewOptions {
     153    width: 100%;
     154    text-align:center;
     155    background:#008800;
     156}
     157
     158.viewOptions td {
     159    padding-top:4px;
     160    padding-bottom:4px;
     161}
     162
     163.viewOptions a:link, .viewOptions a:hover, .viewOptions a:active, .viewOptions a:visited {
     164    color:white;
     165    text-decoration:none;
     166}
     167
    50168#rightSidebar {
    51169    border: 1px solid #cdc;
    52     padding: 10px;
    53170    width: 25%;
    54171    min-width: 180px;
     
    58175}
    59176
     177#contentsArea {
     178    padding:10px;
     179}
     180
    60181#quickSearch {
    61182}
     
    68189.collectionLink {
    69190    display: block;
    70     width: 140px;
    71     height: 100px;
    72191    float: left;
    73192    border: 1px solid #888;
     
    108227body.dAction #gs_banner h2 {
    109228    max-width: 600px;
    110     font-size: 100%;
     229    font-size: 100;
     230}
     231
     232#titlearea {
     233    padding-left: 1em;
     234    padding-right: 1em;
     235    height:60px;
     236    background-color: #007200;
     237    width:40%;
     238}
     239
     240#titlesearchcontainer {
     241    width:100%;
     242    margin: 5px 0 5px;
     243}
     244
     245#quicksearcharea {
     246    width:60%;
     247    text-align:right;
     248    padding: 0.4em;
     249    color:white;
     250    background-color:#007200;
     251}
     252
     253#quicksearcharea table{
     254    font-size:10px;
     255    margin:0;
     256    float: right;
     257}
     258
     259#quicksearcharea a{
     260    font-size: 11px;
     261    color:white;
     262    text-transform:lowercase;
     263    padding-left:10px;
    111264}
    112265
    113266#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 
     267    /*margin: 0 0 10px 0;*/
     268    height: 25px;
     269    line-height: 15px;
     270}
    122271
    123272/* css to make the tabs work */
    124273#nav {
    125     position: absolute;
     274    position:absolute;
    126275    width: auto;
    127276    bottom: 0;
    128     right: 0;
     277    left: 0;
    129278    list-style: none;
    130279    margin:0;
    131     padding: 0 15px 0 0;
     280    padding: 0 0 0 20px;
    132281    font-size: 14px;
    133282}
    134283
    135284#nav li {
    136     float: right;
     285    float: left;
    137286    color: #fff;
    138287    background: transparent url('../images/tab-right.png') scroll no-repeat 100% -100px;
    139288    margin: 0 5px 0 0;
    140289    padding: 0 8px 0 0;
    141 }
    142 
    143 #nav a {
     290    text-transform: capitalize;
     291}
     292
     293#nav a{
     294
    144295    display: block;
    145     float: left;
    146 
     296    float:left;
    147297    background: transparent url('../images/tab-left.png') no-repeat scroll 0 -100px;
    148298    margin:0;
    149299    padding: 5px 4px 3px 10px;
    150     font-weight: normal;
     300    font-weight: bold;
    151301    color: #fff;
    152302    text-decoration: none;
     
    164314    list-style: none;
    165315    margin:0;
    166     top: 15px;
     316    top: 7px;
    167317    right: 0;
    168318    padding: 0 15px 0 0;
     
    240390/* style the search and classifier results */
    241391#results {
     392    line-height: 160%;
    242393    margin: 0;
    243394    padding: 0;
     
    654805    margin: 0;
    655806    padding: 0;
    656     font-size: 80%;
     807    font-size: 70%;
    657808}
    658809
     
    684835
    685836#tableOfContents ul {
    686     padding: 0 0 0 20px;
     837    padding: 0 0 0 0;
     838}
     839
     840#tableOfContents ul ul{
     841    padding: 0 0 0 0;
     842}
     843
     844#tableOfContents ul ul ul{
     845    padding: 0 0 0 16px;
    687846}
    688847
     
    698857
    699858table{
    700     border-collapse:collapse;border-spacing:0;
    701 }
    702 
     859    border-collapse:collapse;
     860    border-spacing:0;
     861}
     862
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/formatString.xsl

    r23405 r24007  
    256256        <h2> This should be the format string (unmodified and html version) </h2> -->
    257257        <!-- <xsl:value-of select="/page/pageResponse" disable-output-escaping="yes"/> -->
     258        <format xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat">
    258259        <xsl:call-template name="xml">
    259260            <xsl:with-param name="fmt" select="."/>
    260261        </xsl:call-template><xsl:text> </xsl:text>
     262        </format>
    261263        <!-- <xsl:apply-templates select="/page/pageResponse" mode="xml"/> -->
    262264      <!-- </body>
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/layouts/main.xsl

    r23606 r24007  
    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>
    4842           
    4943            <body><xsl:call-template name="textDirectionAttribute"/><xsl:call-template name="actionClass"/>
    50 
     44               
    5145                <xsl:call-template name="displayErrorsIfAny"/>
    52 
    53                 <div id="container"><div id="container2"><div id="container3"><div id="container4">
     46                <a name="top"><xsl:text> </xsl:text></a>
     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/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/pages/berry.xsl

    r20465 r24007  
    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/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/pages/classifier.xsl

    r20477 r24007  
    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        <!--
     
    6163
    6264            <a>
    63                 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
     65                <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;ed=1</xsl:attribute>
    6466                <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
    6567            </a>
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/pages/document.xsl

    r22785 r24007  
    99    exclude-result-prefixes="java util gsf">
    1010
     11    <!-- use the 'main' layout -->
     12    <xsl:import href="layouts/main.xsl"/>
     13   
    1114    <!-- style includes global params interface_name, library_name -->
    1215    <xsl:include href=".old/berrytools.xsl"/>
    13 
    14     <!-- use the 'main' layout -->
    15     <xsl:include href="layouts/main.xsl"/>
     16    <xsl:include href="document-scripts.xsl"/>
     17   
     18    <xsl:variable name="bookswitch">
     19        <xsl:choose>
     20            <xsl:when test="/page/pageRequest/paramList/param[@name='book']/@value">
     21                <xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/>
     22            </xsl:when>
     23            <xsl:otherwise>off</xsl:otherwise>
     24        </xsl:choose>
     25    </xsl:variable>
    1626
    1727    <!-- set page title -->
     
    1929
    2030    <!-- set page breadcrumbs -->
    21     <xsl:template name="breadcrumbs"><gslib:siteLink/><gslib:rightArrow/></xsl:template>
     31    <xsl:template name="breadcrumbs">
     32        <gslib:siteLink/><gslib:rightArrow/>
     33        <gslib:collectionNameLinked/><gslib:rightArrow/>
     34        <a>
     35            <xsl:attribute name="href">
     36                <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"/>
     37            </xsl:attribute>
     38            <xsl:variable name="documentTitleVar">
     39                <gslib:documentTitle/>
     40            </xsl:variable>
     41            Document
     42        </a>
     43    </xsl:template>
     44   
     45    <xsl:template match="/">
     46        <xsl:choose>
     47            <!-- if this is the realistic books version of the page -->
     48            <xsl:when test="$bookswitch = 'flashxml'">
     49                <html>
     50                    <body>
     51                        <xsl:apply-templates select="/page/pageResponse/document"/>
     52                    </body>
     53                </html>
     54            </xsl:when>
     55            <!-- if this is the regular version of the page -->
     56            <xsl:otherwise>
     57                <xsl:apply-imports/>
     58            </xsl:otherwise>
     59        </xsl:choose>
     60    </xsl:template>
    2261
    2362    <!-- the page content -->
    2463    <xsl:template match="/page/pageResponse/document">
    25 
    26         <!-- show the little berries for this document -->
    27         <xsl:call-template name="documentBerryForDocumentPage"/>
    28 
    29         <!-- the sidebar -->
    30         <div id="rightSidebar">
    31 
    32             <!-- show the berry basket if it's turned on -->
    33             <gslib:berryBasket/>
    34 
    35             <!-- the book's cover image -->
    36             <div id="coverImage"><gslib:coverImage/></div>
    37             <br/>
    38 
    39             <!-- the contents -->
    40             <ul id="tableOfContents">
    41                 <xsl:apply-templates select="documentNode/documentNode"/>
    42             </ul>
    43 
    44         </div>
    45 
     64        <xsl:if test="$bookswitch = 'off'">
     65            <!-- Add the Javascript that adds and removes highlighting ( *** in document-scripts.xsl *** ) -->
     66            <xsl:call-template name="highlightingScript"/>
     67           
     68            <!-- Add the Javascript that expands and collapses sections ( *** in document-scripts.xsl *** ) -->
     69            <xsl:call-template name="expansionScript"/>
     70       
     71            <!-- show the little berries for this document -->
     72            <xsl:call-template name="documentBerryForDocumentPage"/>
     73
     74            <table id="rightSidebar">
     75                <tr><td>
     76                    <xsl:call-template name="viewOptions"/>
     77                </td></tr>
     78                <tr><td>
     79                    <!-- the sidebar -->
     80                    <div id="contentsArea">             
     81                        <!-- show the berry basket if it's turned on -->
     82                        <gslib:berryBasket/>
     83
     84                        <!-- the book's cover image -->
     85                        <div id="coverImage"><gslib:coverImage/></div>
     86
     87                        <!-- the contents -->
     88                        <div id="tableOfContents">
     89                            <xsl:apply-templates select="documentNode" mode="TOC"/>
     90                        </div>
     91                    </div>
     92                </td></tr>
     93            </table>
     94        </xsl:if>
     95       
    4696        <!-- display the document -->
    47                 <xsl:choose>
    48 
     97        <xsl:choose>
    4998            <xsl:when test="@external != ''">
    5099                <xsl:call-template name="externalPage">
     
    52101                </xsl:call-template>
    53102            </xsl:when>
    54 
     103            <xsl:when test="$bookswitch = 'flashxml'">
     104                <xsl:apply-templates mode="flashxml"/>
     105            </xsl:when>
     106            <xsl:when test="$bookswitch = 'on'">
     107                <!-- *** in document-scripts.xsl *** -->
     108                <xsl:call-template name="realisticBooksScript"/>
     109            </xsl:when>
    55110            <xsl:otherwise>
    56                 <!-- document heading -->
    57                 <xsl:variable name="doCoverImage" select="/page/pageResponse/format/gsf:option[@name='coverImages']/@value"/>
    58                 <xsl:variable name="doTOC" select="/page/pageResponse/format/gsf:option[@name='documentTOC']/@value"/>
    59                 <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    60                 <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
    61                 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    62                 <xsl:variable name="p.c"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='p.c']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/></xsl:when><xsl:otherwise><xsl:value-of select="$collName"/></xsl:otherwise></xsl:choose></xsl:variable>
    63 
    64                 <!--
    65                 <div id="documentheading">
    66 
    67                     <!- -<a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param></xsl:call-template></a>- ->
    68 
     111                <div id="gs-document-text" class="documenttext">
     112                    <xsl:apply-templates select="documentNode" mode="document"/>
     113                </div>
     114            </xsl:otherwise>
     115        </xsl:choose>
     116
     117        <div class="clear"><xsl:text> </xsl:text></div>
     118    </xsl:template>
     119   
     120    <!-- Highlight annotations if requested -->
     121    <xsl:template match="annotation">
     122        <xsl:choose>
     123            <xsl:when test="/page/pageRequest/paramList/param[@name='hl' and @value='on']">
     124                <span class="termHighlight"><xsl:value-of select="."/></span>
     125            </xsl:when>
     126            <xsl:otherwise>
     127                <span class="noTermHighlight"><xsl:value-of select="."/></span>
     128            </xsl:otherwise>
     129        </xsl:choose>
     130    </xsl:template>
     131   
     132    <!-- This template is used to display the document content -->
     133    <xsl:template match="documentNode" mode="document">
     134        <a name="{@nodeID}"><xsl:text> </xsl:text></a>
     135        <!-- Section header -->
     136        <table><tr>
     137            <!-- Expand/collapse button -->
     138            <td class="headerTD">
     139                <div id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');">           
     140                    <xsl:attribute name="class">
    69141                    <xsl:choose>
    70                         <xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when>
    71                         <xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise>
     142                        <xsl:when test="nodeContent and not(documentNode)">icon leafNode toggleImageCollapse</xsl:when>
     143                        <xsl:otherwise>icon toggleImageCollapse</xsl:otherwise>
    72144                    </xsl:choose>
    73 
     145                    </xsl:attribute>
    74146                </div>
    75                 -->
    76 
    77                 <div id="gs-document-text" class="documenttext">
    78                     <xsl:for-each select="descendant-or-self::node()/nodeContent">
    79                         <h3><xsl:value-of disable-output-escaping="yes" select="../metadataList/metadata[@name='Title']"/></h3>
    80                         <xsl:for-each select="node()">
     147            </td>
     148           
     149            <!-- Automatic section number -->
     150            <td class="headerTD">
     151                <p>
     152                    <xsl:attribute name="class"><xsl:value-of select="util:hashToDepthClass(@nodeID)"/> sectionHeader</xsl:attribute>
     153                   
     154                    <xsl:if test="util:hashToSectionId(@nodeID)">
     155                        <span class="sectionNumberSpan">
     156                            <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
     157                            <xsl:text> </xsl:text>
     158                        </span>
     159                    </xsl:if>
     160                    <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
     161                </p>
     162            </td>
     163           
     164            <!-- "back to top" link -->
     165            <xsl:if test="util:hashToDepthClass(@nodeID) != 'sectionHeaderDepthTitle'">
     166                <td class="backToTop headerTD">
     167                    <a href="#top">
     168                        <xsl:text disable-output-escaping="yes">&#9650;back to top</xsl:text>
     169                    </a>
     170                </td>
     171            </xsl:if>
     172        </tr></table>
     173       
     174        <!-- Section text -->
     175        <div id="doc{@nodeID}" class="sectionContainer" style="display:block;">     
     176            <xsl:for-each select="nodeContent">
     177                <xsl:for-each select="node()">
     178                    <xsl:choose>
     179                        <xsl:when test="not(name())">
     180                            <xsl:value-of select="." disable-output-escaping="yes"/>
     181                        </xsl:when>
     182                        <xsl:otherwise>
     183                            <xsl:apply-templates select="."/>
     184                        </xsl:otherwise>
     185                    </xsl:choose>
     186                </xsl:for-each>
     187            </xsl:for-each>
     188            <xsl:if test="documentNode">
     189                <xsl:apply-templates select="documentNode" mode="document"/>
     190            </xsl:if>
     191        </div> 
     192
     193    </xsl:template>
     194
     195    <!-- This template is used to display the table of contents -->
     196    <xsl:template match="documentNode" mode="TOC">
     197
     198        <!-- check if this is the currently selected table of contents item -->
     199        <xsl:variable name="isCurrent" select="nodeContent"/>
     200
     201        <!-- formulate the link -->
     202        <xsl:variable name="contentsLink">
     203            <xsl:value-of select='$library_name'/>?a=d&amp;c=<gslib:collectionNameShort/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1
     204        </xsl:variable>
     205
     206        <ul>
     207            <table><tr>
     208                <!-- The expand/collapse button (not displayed for the top level node) -->
     209                <xsl:if test="util:hashToDepthClass(@nodeID) != 'sectionHeaderDepthTitle'">
     210                    <td>
     211                        <xsl:choose>
     212                            <xsl:when test="not(nodeContent and not(documentNode))">
     213                                <div id="ttoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon toggleImageCollapse"/>
     214                            </xsl:when>
     215                            <xsl:otherwise>
     216                                <div class="icon"/>
     217                            </xsl:otherwise>
     218                        </xsl:choose>
     219                    </td>
     220                </xsl:if>
     221               
     222                <!-- The chapter/page icon -->
     223                <td>
     224                    <div>
     225                        <xsl:attribute name="class">
    81226                            <xsl:choose>
    82                                 <xsl:when test="not(name())">
    83                                     <xsl:value-of select="." disable-output-escaping="yes"/>
     227                                <xsl:when test="nodeContent and not(documentNode)">
     228                                    icon leafNode toggleImagePage
    84229                                </xsl:when>
    85230                                <xsl:otherwise>
    86                                     <xsl:apply-templates select="."/>
     231                                    icon toggleImageChapter
    87232                                </xsl:otherwise>
    88233                            </xsl:choose>
    89                         </xsl:for-each>
    90                     </xsl:for-each>
    91                 </div>
    92 
    93                 <gslib:previousNextButtons/>
    94 
    95             </xsl:otherwise>
    96         </xsl:choose>
    97 
    98         <div class="clear"><xsl:text> </xsl:text></div>
    99 
    100     </xsl:template>
    101 
    102     <xsl:template match="documentNode">
    103 
    104         <!-- check if this is the currently selected table of contents item -->
    105         <xsl:variable name="isCurrent" select="nodeContent"/>
    106 
    107         <!-- formulate the link -->
    108         <xsl:variable name="contentsLink">
    109             <xsl:value-of select='$library_name'/>?a=d&amp;c=<gslib:collectionNameShort/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<!--&amp;<xsl:if test="string($ec) = '1'">ec=1&amp;</xsl:if>
    110             p.a=<xsl:value-of select="$p.a"/>&amp;
    111             p.sa=<xsl:value-of select="$p.sa"/>&amp;
    112             p.s=<xsl:value-of select="$p.s"/>&amp;
    113             p.c=<xsl:value-of select="$p.c"/>-->
     234                        </xsl:attribute>
     235                    </div>
     236                </td>
     237               
     238                <!-- The section name, links to the section in the document -->
     239                <td>               
     240                    <!-- display this item from the table of contents -->
     241                    <xsl:if test="$isCurrent"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
     242                    <a>
     243                        <xsl:attribute name="href">#<xsl:value-of select="@nodeID"/></xsl:attribute>
     244                        <xsl:if test="util:hashToSectionId(@nodeID)">
     245                            <xsl:value-of select="util:hashToSectionId(@nodeID)"/>
     246                            <xsl:text> </xsl:text>
     247                        </xsl:if>
     248                        <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
     249                    </a>
     250                </td>
     251            </tr></table>
     252       
     253            <!-- display any child items -->       
     254            <xsl:if test="documentNode">
     255                <li id="toc{@nodeID}" style="display:block;">
     256                    <xsl:apply-templates select="documentNode" mode="TOC"/>
     257                </li>
     258            </xsl:if>
     259           
     260        </ul>
     261    </xsl:template>
     262   
     263    <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin -->
     264    <xsl:template match="documentNode" mode="flashxml">
     265        <xsl:text disable-output-escaping="yes">
     266            &lt;Section&gt;
     267            &lt;Description&gt;
     268            &lt;Metadata name="Title"&gt;
     269        </xsl:text>
     270        <xsl:value-of select="normalize-space(metadataList/metadata[@name = 'Title'])"/>
     271        <xsl:text disable-output-escaping="yes">
     272            &lt;/Metadata&gt;
     273            &lt;/Description&gt;
     274        </xsl:text>
     275       
     276        <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/>
     277               
     278        <xsl:if test="documentNode">
     279            <xsl:apply-templates select="documentNode" mode="flashxml"/>
     280        </xsl:if>
     281               
     282        <xsl:text disable-output-escaping="yes">
     283            &lt;/Section&gt;
     284        </xsl:text>
     285    </xsl:template>
     286   
     287    <xsl:template name="externalPage">
     288        <xsl:param name="external"/>
     289        <xsl:variable name="go_forward_link">
     290            <a>
     291                <xsl:attribute name="href">
     292                    <xsl:value-of select="$external"/>
     293                </xsl:attribute>
     294                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.go_forward')"/>
     295            </a>
    114296        </xsl:variable>
    115 
    116         <li>
    117             <!-- display this item from the table of contents -->
    118             <xsl:if test="$isCurrent"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
    119             <a>
    120                 <xsl:attribute name="href"><xsl:value-of select="translate( $contentsLink , ' ', '' )"/></xsl:attribute>
    121                 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    122             </a>
    123 
    124             <!-- display any child items -->           
    125             <xsl:if test="documentNode">
    126                 <ul>
    127                     <xsl:apply-templates select="documentNode"/>
    128                 </ul>
    129             </xsl:if>
    130 
    131         </li>
    132 
    133     </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 
     297        <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
     298        <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/></p>
     299    </xsl:template>
    142300
    143301    <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/document"/></xsl:template> <!-- this to be deleted eventually -->
    144 
     302   
     303    <xsl:template name="viewOptions">
     304        <table class="viewOptions"><tr>
     305            <!-- Highlight on/off button -->
     306            <xsl:if test="/page/pageRequest/paramList/param[@name = 'p.a']/@value = 'q'">
     307                <td>
     308                    <a id="highlightOption">
     309                        <xsl:choose>
     310                            <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
     311                                <xsl:attribute name="href">
     312                                    <xsl:text>javascript:removeHighlight();</xsl:text>
     313                                </xsl:attribute>
     314                                <xsl:text>No Highlighting</xsl:text>
     315                            </xsl:when>
     316                            <xsl:otherwise>
     317                                <xsl:attribute name="href">
     318                                    <xsl:text>javascript:addHighlight();</xsl:text>
     319                                </xsl:attribute>
     320                                <xsl:text>Highlighting</xsl:text>
     321                            </xsl:otherwise>
     322                        </xsl:choose>
     323                    </a>
     324                </td>
     325            </xsl:if>
     326           
     327            <!-- Realistic books link -->
     328            <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
     329                <td>
     330                    <a title="Realistic book view" href="{$library_name}?a=d&amp;c={$collName}&amp;d={/page/pageResponse/document/documentNode[1]/@nodeID}&amp;dt={/page/pageResponse/document/documentNode/@docType}&amp;p.a=b&amp;p.s={/page/pageResponse/service/@name}&amp;book=on&amp;ed=1">
     331                        <img src="interfaces/oran/images/rbook.png"/>
     332                    </a>
     333                </td>
     334            </xsl:if>
     335        </tr></table>   
     336    </xsl:template>
    145337</xsl:stylesheet>
    146338
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/pages/help.xsl

    r19988 r24007  
    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/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/pages/pref.xsl

    r20405 r24007  
    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            var bypass = false;
     31                   
     32            function assembleURLFromForm(formElem)
     33            {
     34                var url = "dev";
     35                var selectNodes = formElem.getElementsByTagName("select");
     36                var inputNodes = formElem.getElementsByTagName("input");
     37
     38                for (var i = 0; i &lt; selectNodes.length; i++)
     39                {
     40                    var current = selectNodes[i];
     41                    url += (url == "dev") ? "?" : "&amp;";
     42                    url += current.name + "=";
     43                    url += current.options[current.selectedIndex].text;
     44                }
     45               
     46                for (var i = 0; i &lt; inputNodes.length; i++)
     47                {
     48                    var current = inputNodes[i];
     49                    if (current.type == "hidden" || current.type == "text")
     50                    {
     51                        url += (url == "dev") ? "?" : "&amp;";
     52                        url += current.name + "=";
     53                        url += current.value;
     54                    }
     55                }
     56                return url;
     57            }
     58                   
     59            function checkModified(e)
     60            {
     61                if (modified &amp;&amp; !bypass)
     62                {
     63                    var ok = confirm("Would you like to save your preferences?");
     64                   
     65                    if (ok)
     66                    {
     67                        var formElem = document.getElementById("prefform");
     68                        formElem.submit();
     69                        var xmlhttp;
     70                        if (window.XMLHttpRequest)
     71                        {
     72                            xmlhttp=new XMLHttpRequest();
     73                        }
     74                        else
     75                        {
     76                            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     77                        }
     78
     79                        xmlhttp.open("GET",assembleURLFromForm(formElem),false);
     80                        xmlhttp.send();
     81                    }
     82                }
     83            }
     84           
     85            function changed()
     86            {
     87                modified = true;
     88                bypass = false;
     89            }
     90           
     91            function pageLoad()
     92            {
     93                var formElem = document.getElementById("prefform");
     94           
     95                var selectNodes = formElem.getElementsByTagName("select");
     96                var inputNodes = formElem.getElementsByTagName("input");
     97
     98                YAHOO.util.Event.addListener(selectNodes, 'change', changed);
     99               
     100                for(var i = 0; i &lt; inputNodes.length; i++)
     101                {
     102                    current = inputNodes[i];
     103                    if(current.getAttribute("type") == null)
     104                    {
     105                        YAHOO.util.Event.on(current, 'keyup', changed);
     106                    }
     107                }
     108            }
     109           
     110            YAHOO.util.Event.addListener(window, 'load', pageLoad);
     111            YAHOO.util.Event.addListener(window, 'beforeunload', checkModified);
     112        </xsl:text></script>
    21113
    22114        <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
     
    24116
    25117        <div id="queryform">
    26             <form name="PrefForm" method="get" action="{$library_name}">
     118            <form name="PrefForm" method="get" action="{$library_name}" id="prefform">
    27119
    28120                <input type='hidden' name='a' value='p'/>
     
    89181                <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></h3>
    90182                <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>
     183                    <xsl:variable name="hits">
     184                        <xsl:choose>
     185                            <xsl:when test="/page/pageRequest/paramList/param[@name='hitsPerPage']">
     186                                <xsl:value-of select="/page/pageRequest/paramList/param[@name='hitsPerPage']/@value"/>
     187                            </xsl:when>
     188                            <xsl:otherwise>
     189                                20
     190                            </xsl:otherwise>
     191                        </xsl:choose>
     192                    </xsl:variable>
    92193                    <div class="paramLabel">
    93194                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/>
     
    95196                    <div class="paramValue">
    96197                        <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>
     198                            <option value="20">
     199                                <xsl:if test="$hits=20">
     200                                    <xsl:attribute name="selected" />
     201                                </xsl:if>
     202                                20
     203                            </option>
     204                            <option value="50">
     205                                <xsl:if test="$hits=50">
     206                                    <xsl:attribute name="selected" />
     207                                </xsl:if>
     208                                50
     209                            </option>
     210                            <option value="100">
     211                                <xsl:if test="$hits=100">
     212                                    <xsl:attribute name="selected" />
     213                                </xsl:if>
     214                                100
     215                            </option>
     216                            <option value="-1">
     217                                <xsl:if test="$hits=-1">
     218                                    <xsl:attribute name="selected" />
     219                                </xsl:if>
     220                                <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/>
     221                            </option>
     222                        </select>
     223                    </div>
     224                   
     225                    <br class="clear"/>
     226                   
     227                    <xsl:variable name="mdocs">
     228                        <xsl:choose>
     229                            <xsl:when test="/page/pageRequest/paramList/param[@name='maxDocs']">
     230                                <xsl:value-of select="/page/pageRequest/paramList/param[@name='maxDocs']/@value"/>
     231                            </xsl:when>
     232                            <xsl:otherwise>100</xsl:otherwise>
     233                        </xsl:choose>
     234                    </xsl:variable>
     235                    <div class="paramLabel">
     236                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.maxDocs')"/>
     237                    </div>
     238                    <div class="paramValue">
     239                        <input name="maxDocs" size="3" value="{$mdocs}" />
     240                    </div>
     241                   
    103242                    <br class="clear"/>
    104243                </div>
     
    106245                <br/>
    107246
    108                 <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
     247                <input type='submit' onclick="bypass=true;"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input>
    109248
    110249            </form>
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/pages/query.xsl

    r20465 r24007  
    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>
     
    6467
    6568            <xsl:otherwise>
     69                <p class="termList">
     70                    <xsl:choose>
     71                        <xsl:when test="count(/page/pageResponse/termList/term) &lt; 3">
     72                            <xsl:for-each select="/page/pageResponse/termList/term">
     73                                <span style="font-style:italic;"><xsl:value-of select="@name"/></span> occurs <xsl:value-of select="@freq"/> times in <xsl:value-of select="@numDocsMatch"/> document(s) <br />
     74                            </xsl:for-each>
     75                        </xsl:when>
     76                        <xsl:otherwise>
     77                            <xsl:for-each select="/page/pageResponse/termList/term">
     78                                <span style="font-style:italic;"><xsl:value-of select="@name"/></span> (<xsl:value-of select="@freq"/>);
     79                            </xsl:for-each>
     80                        </xsl:otherwise>
     81                    </xsl:choose>
     82                </p>
    6683               
    6784                <ul id="results">
     
    6986                        <li class="document">
    7087                            <a>
    71                                 <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=b&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/></xsl:attribute>
    72                                 <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
     88                                <xsl:choose>
     89                                    <xsl:when test="/page/pageResponse/collection/@name">
     90                                        <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="/page/pageResponse/collection/@name"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;hl=on&amp;ed=1#<xsl:value-of select="@nodeID"/></xsl:attribute>
     91                                    </xsl:when>
     92                                    <xsl:when test="@collection">
     93                                        <xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="@collection"/>&amp;d=<xsl:value-of select="@nodeID"/>&amp;dt=<xsl:value-of select="@docType"/>&amp;p.a=q&amp;p.s=<xsl:value-of select="/page/pageResponse/service/@name"/>&amp;hl=on&amp;ed=1#<xsl:value-of select="@nodeID"/></xsl:attribute>
     94                                    </xsl:when>
     95                                </xsl:choose>
     96                               
     97                                <xsl:value-of disable-output-escaping="yes"  select="metadataList/metadata[@name='Title']"/>
    7398                            </a>
     99                           
     100                            <!-- If this is results from a cross collection search then add a link to the collection that it is from -->
     101                            <xsl:if test="@collection">
     102                                (<a style="background-image:none; padding:3px;">
     103                                    <xsl:attribute name="href">
     104                                        <xsl:value-of select="$library_name"/>?a=p&amp;sa=about&amp;c=<xsl:value-of select="@collection"/>
     105                                    </xsl:attribute>
     106                                    <xsl:value-of select="@collection"/>
     107                                </a>)
     108                            </xsl:if>
    74109                            <xsl:call-template name="documentBerryForClassifierOrSearchPage"/>
    75110                        </li>
     
    115150    </xsl:template>
    116151
    117     <!-- invisible params - used by other stuff. in the query form, we set to teh default -->
     152    <!-- invisible params - used by other stuff. in the query form, we set to the default -->
    118153    <xsl:template match="param[@type='invisible']">
    119154        <xsl:param name="ns">s1.</xsl:param>
  • main/branches/64_bit_Greenstone/greenstone3/web/interfaces/oran/transform/util.xsl

    r22458 r24007  
    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='assocfilepath']"/>/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.