Changeset 18316 for greenstone3/trunk/web
- Timestamp:
- 2009-01-06T14:26:10+13:00 (15 years ago)
- Location:
- greenstone3/trunk/web/interfaces/default/transform
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
greenstone3/trunk/web/interfaces/default/transform/about.xsl
r17017 r18316 12 12 <xsl:output method="html"/> 13 13 14 14 <!-- the main page layout template is here --> 15 15 <xsl:template match="page"> 16 17 <head>18 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>21 22 23 24 </head>25 26 27 28 29 30 31 16 <html> 17 <head> 18 <title> 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 21 </title> 22 <xsl:call-template name="globalStyle"/> 23 <xsl:call-template name="pageStyle"/> 24 </head> 25 <body> 26 <div id="globalwrapper"> 27 <xsl:call-template name="response" /> 28 <xsl:call-template name="greenstoneFooter"/> 29 </div> 30 </body> 31 </html> 32 32 </xsl:template> 33 33 … … 40 40 41 41 <xsl:template match="pageResponse"> 42 42 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 43 43 <xsl:apply-templates select="collection|serviceCluster"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates> 44 44 </xsl:template> 45 45 46 46 <xsl:template match="collection|serviceCluster"> … … 53 53 </xsl:call-template> 54 54 <div id="content"> 55 56 57 58 55 <xsl:value-of select="displayItem[@name='description']" disable-output-escaping="yes"/> 56 <xsl:apply-templates select="serviceList"> 57 <xsl:with-param name="collName" select="$collName"/> 58 </xsl:apply-templates> 59 59 </div> 60 60 </xsl:template> … … 74 74 75 75 <xsl:if test="service"> 76 <ul id="servicelist">77 78 76 <ul id="servicelist"> 77 <xsl:for-each select="service"> 78 <xsl:variable name="action"><xsl:choose> 79 79 <xsl:when test="@type='query'">q</xsl:when> 80 80 <xsl:when test="@type='browse'">b</xsl:when> … … 83 83 <xsl:otherwise>DO_NOT_DISPLAY</xsl:otherwise> 84 84 </xsl:choose></xsl:variable> 85 86 85 <xsl:if test="$action !='DO_NOT_DISPLAY'"> 86 <li><a href="{$library_name}?a={$action}&rt=d&s={@name}&c={$collName}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> 87 87 </xsl:if> 88 88 </xsl:for-each> 89 89 </ul> 90 90 </xsl:if> 91 91 </xsl:template> 92 92 -
greenstone3/trunk/web/interfaces/default/transform/applet.xsl
r17017 r18316 12 12 <xsl:output method="html"/> 13 13 14 14 <!-- the main page layout template is here --> 15 15 <xsl:template match="page"> 16 17 <head>18 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>21 22 23 24 </head>25 26 27 28 29 30 31 16 <html> 17 <head> 18 <title> 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 21 </title> 22 <xsl:call-template name="globalStyle"/> 23 <xsl:call-template name="pageStyle"/> 24 </head> 25 <body> 26 <div id="globalwrapper"> 27 <xsl:call-template name="response" /> 28 <xsl:call-template name="greenstoneFooter"/> 29 </div> 30 </body> 31 </html> 32 32 </xsl:template> 33 33 … … 41 41 <xsl:template match="pageResponse"> 42 42 <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable> 43 44 45 43 <xsl:call-template name="standardPageBanner"> 44 <xsl:with-param name="collName" select="$collName"/> 45 </xsl:call-template> 46 46 47 47 <xsl:call-template name="navigationBar"> … … 51 51 <xsl:copy-of select="service/applet"/> 52 52 </div> 53 53 </xsl:template> 54 54 </xsl:stylesheet> 55 55 -
greenstone3/trunk/web/interfaces/default/transform/authen.xsl
r17017 r18316 15 15 <!-- the main page layout template is here --> 16 16 <xsl:template match="page"> 17 18 <head>19 20 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->21 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>22 23 24 25 </head>26 27 28 29 30 31 32 17 <html> 18 <head> 19 <title> 20 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 21 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 22 </title> 23 <xsl:call-template name="globalStyle"/> 24 <xsl:call-template name="pageStyle"/> 25 </head> 26 <body> 27 <div id="globalwrapper"> 28 <xsl:call-template name="response" /> 29 <xsl:call-template name="greenstoneFooter"/> 30 </div> 31 </body> 32 </html> 33 33 </xsl:template> 34 34 … … 66 66 <td><xsl:if test="$un_s!=''"> 67 67 <xsl:if test="$asn!='' and $asn!='0'"> 68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/> : <xsl:value-of select="$un_s"/>68 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/> : <xsl:value-of select="$un_s"/> 69 69 </xsl:if> 70 70 </xsl:if></td> … … 83 83 <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''"> 84 84 <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.aup=ListUsers&s1.asn={$asn}&s1.uan=1&s1.un={$un_s}&s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a> 85 86 87 <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>88 89 85 </xsl:when> 86 <xsl:otherwise> 87 <a href="{$library_name}?a=g&rt=r&sa=authen&s=Authentication&s1.asn=&s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a> 88 </xsl:otherwise> 89 </xsl:choose></li> 90 90 91 91 <!--add a new user--> … … 100 100 </xsl:choose> 101 101 </li> 102 102 103 103 <!-- change password--> 104 104 <li> … … 138 138 <xsl:otherwise> 139 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 140 <p align="left"> 141 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p> 142 <xsl:if test="$err='un-pw-err'"> 143 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p> 144 </xsl:if> 145 <xsl:if test="$err='no-permission' and $info='Login'"> 146 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p> 147 </xsl:if> 148 <xsl:if test="$err='as-false'"> 149 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p> 150 </xsl:if> 151 <xsl:call-template name="login"> 152 <xsl:with-param name="sub_action" select="$sub_action"/> 153 <xsl:with-param name="authen_service" select="$authen_service"/> 154 <xsl:with-param name="pro_action" select="$pro_action"/> 155 </xsl:call-template> 156 156 157 157 </xsl:otherwise> 158 </xsl:choose>158 </xsl:choose> 159 159 </xsl:if> 160 160 … … 179 179 <xsl:if test="$pro_action='AddUser'"> 180 180 <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'"> 181 181 <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p> 182 182 </xsl:if> 183 183 … … 185 185 <p align="left"> 186 186 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/> 187 </p>187 </p> 188 188 <xsl:if test="$err='no-permission'"> 189 189 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p> … … 204 204 <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p> 205 205 </xsl:if> 206 <xsl:if test="$err='un-exist'">206 <xsl:if test="$err='un-exist'"> 207 207 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p> 208 208 </xsl:if> … … 306 306 <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_initial')"/></font></p> 307 307 </xsl:if> 308 308 <xsl:if test="$err='un-exist'"> 309 309 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p> 310 310 </xsl:if> … … 344 344 </xsl:template> 345 345 346 <!--template name="login"-->346 <!--template name="login"--> 347 347 <xsl:template name="login"> 348 348 <xsl:param name="sub_action"/> … … 374 374 <input type="submit" value="submit"></input></td> 375 375 </tr> 376 376 </table> 377 377 </form> 378 378 </div> 379 379 </xsl:template> 380 380 381 <!--template name="listusers"-->381 <!--template name="listusers"--> 382 382 <xsl:template name="listusers" > 383 <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>383 <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2> 384 384 385 385 <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" > … … 392 392 </tr> 393 393 <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode"> 394 395 <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>396 <td id="status" bgcolor="#eeeeee">394 <tr> 395 <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td> 396 <td id="status" bgcolor="#eeeeee"> 397 397 <script type="text/javascript"> 398 398 <xsl:text disable-output-escaping="yes"> 399 399 var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">"; 400 400 if (status=="true"){ 401 401 document.getElementById("status").innerHTML="enabled"; 402 402 } 403 403 if (status=="false"){ 404 404 document.getElementById("status").innerHTML="disabled"; 405 405 } 406 406 </xsl:text> 407 407 </script> 408 408 </td> 409 <td id="group" bgcolor="#eeeeee">410 409 <td id="group" bgcolor="#eeeeee"> 410 <script type="text/javascript"> 411 411 <xsl:text disable-output-escaping="yes"> 412 412 var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">"; … … 414 414 var new_groups=""; 415 415 for (j=0; j < split_groups.length ; j++){ 416 417 418 416 new_groups+=split_groups[j]+" <br /> "; 417 } 418 document.getElementById('group').innerHTML=new_groups; 419 419 </xsl:text> 420 420 </script> 421 421 </td> 422 <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>423 <td bgcolor="#eeeeee">422 <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td> 423 <td bgcolor="#eeeeee"> 424 424 <form name="ListUsersForm" method="get" action="{$library_name}"> 425 425 <input type='hidden' name='a' value='g'/> … … 437 437 <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input> 438 438 </form> 439 </td>439 </td> 440 440 </tr> 441 441 </xsl:for-each> 442 442 </table> 443 443 </xsl:template> 444 444 445 <!--template name="modifypassword"-->446 <xsl:template name="modifypassword" >445 <!--template name="modifypassword"--> 446 <xsl:template name="modifypassword" > 447 447 <xsl:param name="sub_action"/> 448 448 <xsl:param name="authen_service"/> … … 464 464 465 465 <table align="center"><tr><td align="right"> 466 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr>466 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.old_password')"/></td><td><input type="password" name="s1.umpw" size="10" value=""/></td></tr> 467 467 <tr><td align="right"> 468 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr>468 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.new_password')"/></td><td><input type="password" name="s1.umpw1" size="10" value=""/></td></tr> 469 469 <tr><td align="right"> 470 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr>470 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.retype_new_password')"/></td><td><input type="password" name="s1.umpw2" size="10" value=""/></td></tr> 471 471 <tr><td></td><td> 472 <input type="submit" value="submit"></input></td>473 474 475 476 477 </xsl:template> 478 479 <!--template name="deleteuser"-->472 <input type="submit" value="submit"></input></td> 473 </tr> 474 </table> 475 </form> 476 </div> 477 </xsl:template> 478 479 <!--template name="deleteuser"--> 480 480 <xsl:template name="deleteuser"> 481 481 <xsl:param name="sub_action"/> … … 502 502 </xsl:template> 503 503 504 <!--template name="edituser"-->504 <!--template name="edituser"--> 505 505 <xsl:template name="edituser" > 506 506 <xsl:param name="sub_action"/> … … 554 554 <td align="right"> <select id="groups" size="0"> 555 555 <script type="text/javascript"> 556 556 <xsl:text disable-output-escaping="yes"> 557 557 var group_arr=Array("administrator","all-collections-editor","personal-collections-editor"); 558 558 var group_string=document.getElementById("group").value; … … 560 560 var find=0; 561 561 for (i=0; i < group_arr.length; i++){ 562 563 564 565 566 567 568 569 570 571 572 573 562 find=0; 563 for (j=0; j < group_arr.length; j++){ 564 if (split_group_string[j]==group_arr[i]){ 565 find=1; 566 } 567 } 568 if (find==0){ 569 op = document.createElement('option'); 570 op.innerHTML = group_arr[i]; 571 op.setAttribute("value", group_arr[i]); 572 document.getElementById("groups").appendChild(op); 573 } 574 574 } 575 575 576 576 </xsl:text> 577 577 </script> … … 590 590 var find=0; 591 591 for (i=0; i < split_group_string.length; i++){ 592 593 594 592 if (split_group_string[i]==group){ 593 find=1; 594 } 595 595 } 596 596 if (find==0){ 597 598 599 600 597 op = document.createElement('option'); 598 op.innerHTML = group; 599 op.setAttribute("value", group); 600 document.getElementById("collects").appendChild(op); 601 601 } 602 602 </xsl:text> 603 603 </script> 604 604 </xsl:for-each> 605 605 </select> 606 606 </td> … … 610 610 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.comment')"/></td><td colspan="2"><div><textarea cols="40" rows="5" name="s1.umc"><xsl:value-of select="$umc_s"/> 611 611 612 </textarea></div></td></tr>612 </textarea></div></td></tr> 613 613 <tr> 614 614 615 <td></td><td>615 <td></td><td> 616 616 <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input> 617 618 619 617 <xsl:if test="$pro_action!='AddUser'"> 618 <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input> 619 </xsl:if> 620 620 </td><td></td></tr> 621 621 </table> … … 625 625 </xsl:template> 626 626 627 <!-- addGroup() javascript -->627 <!-- addGroup() javascript --> 628 628 <xsl:template name="addGroup"> 629 629 <script type="text/javascript"> 630 630 <xsl:text disable-output-escaping="yes"> 631 631 function addGroup(g){ 632 633 634 635 636 if (document.getElementById("editForm")!=null){632 var itemSelected; 633 var splitGroup; 634 var groupExit; 635 636 if (document.getElementById("editForm")!=null){ 637 637 //itemSelected=document.getElementById("editForm").groups.options.selectedIndex; 638 638 itemSelected=document.getElementById(g).options.selectedIndex; 639 639 if (document.getElementById(g).options[itemSelected].text!=""){ 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 }657 }640 if (document.getElementById("group").value==""){ 641 document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text; 642 }else{ 643 splitGroup=document.getElementById("group").value.split(","); 644 for (var i=0; i < splitGroup.length; i++){ 645 if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){ 646 alert(document.getElementById(g).options[itemSelected].text + " has been added."); 647 groupExit=1; 648 break; 649 } 650 } 651 if (groupExit!=1) { 652 document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text; 653 } 654 } 655 document.getElementById(g).options[itemSelected]=new Option("",itemSelected); 656 } 657 } 658 658 } 659 659 </xsl:text> -
greenstone3/trunk/web/interfaces/default/transform/classifier.xsl
r17017 r18316 16 16 <!-- the main page layout template is here --> 17 17 <xsl:template match="page"> 18 19 <head>20 21 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->22 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>23 24 25 26 </head>27 28 29 30 31 32 33 18 <html> 19 <head> 20 <title> 21 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 22 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 23 </title> 24 <xsl:call-template name="globalStyle"/> 25 <xsl:call-template name="pageStyle"/> 26 </head> 27 <body> 28 <div id="globalwrapper"> 29 <xsl:call-template name="response" /> 30 <xsl:call-template name="greenstoneFooter"/> 31 </div> 32 </body> 33 </html> 34 34 </xsl:template> 35 35 … … 42 42 <!-- page specific style goes here --> 43 43 <xsl:template name="pageStyle"> 44 <!--<xsl:if test="$berryBaskets = 'true'">-->45 44 <xsl:if test="$berrybasketswitch = 'on'"> 46 45 <xsl:call-template name="berryStyleSheet"/> … … 60 59 <xsl:with-param name="collName" select="$collName"/> 61 60 </xsl:call-template> 62 61 63 62 <div id="content"> 64 63 <xsl:apply-templates select="service/classifierList"> … … 67 66 </xsl:apply-templates> 68 67 69 <!--<xsl:if test="$berryBaskets = 'true'">--> 70 <xsl:if test="$berrybasketswitch = 'on'"> 71 <xsl:call-template name="berrybasket" /> 72 </xsl:if> 73 <xsl:apply-templates select="classifier"> 74 <xsl:with-param name="collName" select="$collName"/> 75 <xsl:with-param name="serviceName" select="$serviceName"/> 76 </xsl:apply-templates> 68 <xsl:if test="$berrybasketswitch = 'on'"> 69 <xsl:call-template name="berrybasket" /> 70 </xsl:if> 71 <xsl:apply-templates select="classifier"> 72 <xsl:with-param name="collName" select="$collName"/> 73 <xsl:with-param name="serviceName" select="$serviceName"/> 74 </xsl:apply-templates> 77 75 </div> 78 76 </xsl:template> … … 82 80 <xsl:param name="serviceName"/> 83 81 <xsl:variable name="selected" select="/page/pageResponse/classifier/@name"/> 84 <ul id="classifierlist">85 86 87 88 89 90 91 92 93 82 <ul id="classifierlist"> 83 <xsl:for-each select="classifier"> 84 <xsl:choose> 85 <xsl:when test="@name=$selected"> 86 <li id="activeclassifier"><xsl:value-of select="displayItem[@name='name']"/></li> 87 </xsl:when> 88 <xsl:otherwise> 89 <li><a href="{$library_name}?a=b&rt=r&s={$serviceName}&c={$collName}&cl={@name}"><xsl:value-of select="displayItem[@name='name']"/></a></li></xsl:otherwise></xsl:choose> 90 91 </xsl:for-each> 94 92 </ul> 95 93 </xsl:template> 96 94 97 95 </xsl:stylesheet> -
greenstone3/trunk/web/interfaces/default/transform/classifiertools.xsl
r13547 r18316 6 6 extension-element-prefixes="java util" 7 7 exclude-result-prefixes="java util"> 8 8 9 9 <xsl:template match="classifier"> 10 10 <xsl:param name="collName"/> 11 11 <xsl:param name="serviceName"/> 12 12 <div id="classifiers"> 13 <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable>14 <xsl:choose>15 16 <xsl:apply-templates select="." mode="horizontal-at-top">17 <xsl:with-param name="collName" select="$collName"/>18 <xsl:with-param name="serviceName" select="$serviceName"/>19 </xsl:apply-templates>20 21 22 <xsl:apply-templates select="." mode="default">23 <xsl:with-param name="collName" select="$collName"/>24 <xsl:with-param name="serviceName" select="$serviceName"/>25 </xsl:apply-templates>26 27 </xsl:choose>28 </div>13 <xsl:variable name="cl_name"><xsl:value-of select="@name"/></xsl:variable> 14 <xsl:choose> 15 <xsl:when test="/page/pageResponse/service/classifierList/classifier[@name=$cl_name]/@horizontalAtTop"> 16 <xsl:apply-templates select="." mode="horizontal-at-top"> 17 <xsl:with-param name="collName" select="$collName"/> 18 <xsl:with-param name="serviceName" select="$serviceName"/> 19 </xsl:apply-templates> 20 </xsl:when> 21 <xsl:otherwise> 22 <xsl:apply-templates select="." mode="default"> 23 <xsl:with-param name="collName" select="$collName"/> 24 <xsl:with-param name="serviceName" select="$serviceName"/> 25 </xsl:apply-templates> 26 </xsl:otherwise> 27 </xsl:choose> 28 </div> 29 29 </xsl:template> 30 30 … … 35 35 <xsl:choose> 36 36 <xsl:when test="classifierNode"> 37 38 <xsl:for-each select='classifierNode'>39 <xsl:apply-templates select='.' mode="horizontal"><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates>40 </xsl:for-each>37 <ul id="classifiernodelist-horizontal"> 38 <xsl:for-each select='classifierNode'> 39 <xsl:apply-templates select='.' mode="horizontal"><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates> 40 </xsl:for-each> 41 41 </ul> 42 42 <ul id="childrenlist"> 43 43 <li> 44 44 <table><tr> 45 46 47 48 45 <xsl:for-each select='classifierNode'> 46 <xsl:apply-templates select='.' mode='process-all-children'><xsl:with-param name='collName' select='$collName'/><xsl:with-param name='serviceName' select='$serviceName'/></xsl:apply-templates> 47 </xsl:for-each> 48 </tr></table> 49 49 </li> 50 50 </ul> 51 51 </xsl:when> 52 52 <xsl:otherwise> 53 53 <!-- there were no classifier nodes --> … … 55 55 <xsl:for-each select='documentNode'> 56 56 <li><table><tr><xsl:call-template name="documentNodeWrapper"> 57 <xsl:with-param name='collName' select='$collName'/>58 <xsl:with-param name='serviceName' select='$serviceName'/>59 57 <xsl:with-param name='collName' select='$collName'/> 58 <xsl:with-param name='serviceName' select='$serviceName'/> 59 </xsl:call-template></tr></table></li> 60 60 </xsl:for-each> 61 61 </ul> … … 104 104 <xsl:param name="collName"/> 105 105 <xsl:param name="serviceName"/> 106 106 <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&rt=r&s=<xsl:value-of select='$serviceName'/>&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@nodeID'/><xsl:if test="classifierNode|documentNode">.pr</xsl:if></xsl:attribute><xsl:call-template name="bookshelfimg"/></a><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/> 107 107 </xsl:template> 108 108 … … 112 112 <xsl:param name="serviceName"/> 113 113 <li><xsl:choose> 114 115 116 <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&rt=r&s=<xsl:value-of select='$serviceName'/>&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@nodeID'/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></a><xsl:text> </xsl:text></xsl:otherwise>117 </xsl:choose>114 <xsl:when test="classifierNode|documentNode"><b><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/><xsl:text> </xsl:text></b></xsl:when> 115 <xsl:otherwise> 116 <a><xsl:attribute name='href'><xsl:value-of select='$library_name'/>?a=b&rt=r&s=<xsl:value-of select='$serviceName'/>&c=<xsl:value-of select='$collName'/>&cl=<xsl:value-of select='@nodeID'/></xsl:attribute><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></a><xsl:text> </xsl:text></xsl:otherwise> 117 </xsl:choose> 118 118 </li> 119 119 </xsl:template> … … 124 124 <xsl:param name="collName"/> 125 125 <xsl:param name="serviceName"/> 126 127 128 129 130 126 <xsl:call-template name="processNodeChildren"> 127 <xsl:with-param name='collName' select='$collName'/> 128 <xsl:with-param name='serviceName' select='$serviceName'/> 129 </xsl:call-template> 130 </xsl:template> 131 131 132 132 <xsl:template name="processNodeChildren"> … … 135 135 <xsl:for-each select='classifierNode|documentNode'> 136 136 <xsl:choose><xsl:when test="name()='documentNode'"> 137 <li><table><tr>138 139 140 141 142 137 <li><table><tr> 138 <xsl:call-template name="documentNodeWrapper"> 139 <xsl:with-param name='collName' select='$collName'/> 140 <xsl:with-param name='serviceName' select='$serviceName'/> 141 </xsl:call-template> 142 </tr></table> 143 143 </li> 144 144 </xsl:when> 145 145 <xsl:otherwise> 146 146 <li><table><tr> 147 148 149 150 151 147 <xsl:apply-templates select='.'> 148 <xsl:with-param name='collName' select='$collName'/> 149 <xsl:with-param name='serviceName' select='$serviceName'/> 150 </xsl:apply-templates> 151 </tr></table> 152 152 </li> 153 153 <xsl:if test="child::classifierNode or child::documentNode"> 154 154 <!--recurse into the children--> 155 155 <li><ul class="childrenlist"> 156 157 <xsl:with-param name='collName' select='$collName'/>158 <xsl:with-param name='serviceName' select='$serviceName'/>159 160 156 <xsl:apply-templates select='.' mode='process-all-children'> 157 <xsl:with-param name='collName' select='$collName'/> 158 <xsl:with-param name='serviceName' select='$serviceName'/> 159 </xsl:apply-templates> 160 </ul> 161 161 </li> 162 162 </xsl:if> -
greenstone3/trunk/web/interfaces/default/transform/config_format.xsl
r16703 r18316 39 39 <xslt:variable name="bookswitch"><xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xslt:variable> 40 40 <xslt:choose> 41 42 43 44 45 46 41 <xslt:when test="$bookswitch = 'on' or $bookswitch = 'flashxml'"> 42 <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&ed=1&book=on&c=<xslt:value-of select='$collName'/>&d=<xslt:value-of select='@nodeID'/>&dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&sib=1</xslt:if>&p.a=<xslt:value-of select="/page/pageRequest/@action"/>&p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a> 43 </xslt:when> 44 <xslt:otherwise> 45 <a><xslt:attribute name="href"><xslt:value-of select='$library_name'/>?a=d&book=off&c=<xslt:value-of select='$collName'/>&d=<xslt:value-of select='@nodeID'/>&dt=<xslt:value-of select='@docType'/><xslt:if test="@nodeType='leaf'">&sib=1</xslt:if>&p.a=<xslt:value-of select="/page/pageRequest/@action"/>&p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&p.s=<xslt:value-of select="$serviceName"/></xslt:attribute><xsl:apply-templates/></a> 46 </xslt:otherwise> 47 47 </xslt:choose> 48 48 </xsl:otherwise> -
greenstone3/trunk/web/interfaces/default/transform/document.xsl
r18306 r18316 22 22 <xsl:choose> 23 23 <xsl:when test="$bookswitch = 'flashxml' and $a = 'd'"> 24 25 24 <html> 25 <xsl:call-template name="response" /> 26 26 </html> 27 27 </xsl:when> … … 29 29 <xsl:otherwise> 30 30 <html> 31 32 33 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->34 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>35 36 37 38 31 <head> 32 <title> 33 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 34 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 35 </title> 36 <xsl:call-template name="globalStyle"/> 37 <xsl:call-template name="pageStyle"/> 38 </head> 39 39 <body> 40 41 42 43 </div>40 <div id="globalwrapper"> 41 <xsl:call-template name="response" /> 42 <xsl:call-template name="greenstoneFooter"/> 43 </div> 44 44 </body> 45 45 </html> … … 49 49 50 50 51 52 51 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 52 <xsl:variable name="bookswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:variable> 53 53 54 54 <xsl:template name="pageTitle"> … … 68 68 </xsl:text> 69 69 </style> 70 71 <!--<xsl:if test="$berryBaskets = 'true'">-->70 <!--TODO: add berry basket switch--> 71 <!--<xsl:if test="$berryBaskets = 'true'">--> 72 72 <xsl:if test="$berrybasketswitch = 'on'"> 73 <xsl:call-template name="berryStyleSheet"/>74 <xsl:call-template name="js-library"/>73 <xsl:call-template name="berryStyleSheet"/> 74 <xsl:call-template name="js-library"/> 75 75 </xsl:if> 76 76 </xsl:template> … … 81 81 <xsl:when test="$bookswitch = 'on' or $bookswitch = 'off'"> 82 82 <xsl:call-template name="standardPageBanner"> 83 83 <xsl:with-param name="collName" select="$collName"/> 84 84 </xsl:call-template> 85 85 <xsl:call-template name="navigationBar"> 86 86 <xsl:with-param name="collName" select="$collName"/> 87 87 </xsl:call-template> 88 88 89 89 <!--<xsl:if test="$berryBaskets = 'true'">--> 90 90 <xsl:if test="$berrybasketswitch = 'on'"> 91 91 <xsl:call-template name="documentBerryBasket"> 92 93 94 95 92 <xsl:with-param name="collName" select="$collName"/> 93 <xsl:with-param name="selectedNode" select="/page/pageResponse/document/@selectedNode"/> 94 <xsl:with-param name="rootNode" select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/> 95 <xsl:with-param name="docType" select="/page/pageResponse/document/@docType"/> 96 96 </xsl:call-template> 97 97 </xsl:if> 98 98 </xsl:when> 99 </xsl:choose>100 101 <!-- display the document -->99 </xsl:choose> 100 101 <!-- display the document --> 102 102 <xsl:if test="$bookswitch != 'flashxml'"> 103 103 <xsl:text disable-output-escaping="yes"><div id="content"></xsl:text> 104 104 </xsl:if> 105 105 <xsl:apply-templates select="document"> … … 107 107 </xsl:apply-templates> 108 108 <xsl:if test="$bookswitch != 'flashxml'"> 109 110 </xsl:if> 111 </xsl:template> 112 109 <xsl:text disable-output-escaping="yes"></div></xsl:text> 110 </xsl:if> 111 </xsl:template> 112 113 113 <xsl:template match="document"> 114 <xsl:param name="collName"/>115 <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>114 <xsl:param name="collName"/> 115 <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable> 116 116 <xsl:choose> 117 117 <xsl:when test="$external != ''"> 118 119 <xsl:with-param name="external" select="$external"/>120 118 <xsl:call-template name="externalPage"> 119 <xsl:with-param name="external" select="$external"/> 120 </xsl:call-template> 121 121 </xsl:when> 122 122 <xsl:otherwise> 123 123 124 <xsl:if test="$bookswitch = 'flashxml'"> 125 <xsl:call-template name="xmldocumentContentPeeling"> 126 <xsl:with-param name="collName" select="$collName"/> 127 </xsl:call-template> 128 </xsl:if> 129 130 <xsl:if test="$bookswitch = 'off'"> 131 <xsl:call-template name="documentHeading"> 132 <xsl:with-param name="collName" select="$collName"/> 133 </xsl:call-template> 134 135 <xsl:call-template name="documentArrows"> 136 <xsl:with-param name="collName" select="$collName"/> 137 </xsl:call-template> 138 <xsl:call-template name="documentContent"> 139 <xsl:with-param name="collName" select="$collName"/> 140 </xsl:call-template> 141 <xsl:call-template name="documentArrows"> 142 <xsl:with-param name="collName" select="$collName"/> 143 </xsl:call-template> 144 </xsl:if> 145 <xsl:if test="$bookswitch = 'on'"> 146 <xsl:call-template name="documentHeading"> 147 <xsl:with-param name="collName" select="$collName"/> 148 </xsl:call-template> 149 <div id="bookdiv"></div> 150 <script type="text/javascript"> 151 <xsl:text disable-output-escaping="yes"> 152 var doc_url = document.URL; 153 doc_url = doc_url.replace(/(&|\?)book=[a-z]+/gi,''); 154 doc_url += '&book=flashxml'; 155 156 // var src_image = "http://kia.cs.waikato.ac.nz:8080/greenstone3/sites/localsite/collect/gs2mgdemo/index/assoc/HASH49aa.dir/cover.jpg" 157 //var doc_url = "/greenstone3/library?a=d&c=gs2mgdemo&d=HASH49aab56062938fbe2ff7f1&dt=hierarchy&p.a=b&p.s=ClassifierBrowse&ed=1"; 158 159 var flash_plug_html = "" 160 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n'; 161 flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n'; 162 flash_plug_html += ' height="100%" id="Book" swLiveConnect="true" \n'; 163 flash_plug_html += ' width="100%">\n'; 164 flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\n'; 165 flash_plug_html += ' <PARAM name="movie" value="Book.swf'; 166 flash_plug_html += '?src_image=' + escape(img_cover); 167 flash_plug_html += '&doc_url=' + escape(doc_url) 168 flash_plug_html += '" />\n'; 169 flash_plug_html += ' <PARAM name="quality" value="high" />\n'; 170 flash_plug_html += ' <PARAM name="bgcolor" value="#FFFFFF" />\n'; 171 flash_plug_html += ' <EMBED align="middle" \n'; 172 flash_plug_html += ' allowScriptAccess="always" swLiveConnect="true" \n'; 173 flash_plug_html += ' bgcolor="#FFFFFF" height="100%" name="Book" \n'; 174 flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \n'; 175 flash_plug_html += ' quality="high" \n'; 176 flash_plug_html += ' src="Book.swf'; 177 flash_plug_html += '?src_image=' + escape(img_cover); 178 flash_plug_html += '&doc_url=' + escape(doc_url); 179 flash_plug_html += '"\n'; 180 flash_plug_html += ' type="application/x-shockwave-flash" width="100%" />\n'; 181 flash_plug_html += '</OBJECT>\n'; 182 var flash_div = document.getElementById("bookdiv"); 183 flash_div.innerHTML = flash_plug_html; 184 </xsl:text> 185 </script> 186 </xsl:if> 187 </xsl:otherwise> 124 <xsl:if test="$bookswitch = 'flashxml'"> 125 <xsl:call-template name="xmldocumentContentPeeling"> 126 <xsl:with-param name="collName" select="$collName"/> 127 </xsl:call-template> 128 </xsl:if> 129 130 <xsl:if test="$bookswitch = 'off'"> 131 <xsl:call-template name="documentHeading"> 132 <xsl:with-param name="collName" select="$collName"/> 133 </xsl:call-template> 134 135 <xsl:call-template name="documentArrows"> 136 <xsl:with-param name="collName" select="$collName"/> 137 </xsl:call-template> 138 <xsl:call-template name="documentContent"> 139 <xsl:with-param name="collName" select="$collName"/> 140 </xsl:call-template> 141 <xsl:call-template name="documentArrows"> 142 <xsl:with-param name="collName" select="$collName"/> 143 </xsl:call-template> 144 </xsl:if> 145 <xsl:if test="$bookswitch = 'on'"> 146 <xsl:call-template name="documentHeading"> 147 <xsl:with-param name="collName" select="$collName"/> 148 </xsl:call-template> 149 <div id="bookdiv"></div> 150 <script type="text/javascript"> 151 <xsl:text disable-output-escaping="yes"> 152 var doc_url = document.URL; 153 doc_url = doc_url.replace(/(&|\?)book=[a-z]+/gi,''); 154 doc_url += '&book=flashxml'; 155 156 var flash_plug_html = "" 157 flash_plug_html += '<OBJECT align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \n'; 158 flash_plug_html += ' codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" \n'; 159 flash_plug_html += ' height="100%" id="Book" swLiveConnect="true" \n'; 160 flash_plug_html += ' width="100%">\n'; 161 flash_plug_html += ' <PARAM name="allowScriptAccess" value="always" />\n'; 162 flash_plug_html += ' <PARAM name="movie" value="Book.swf'; 163 flash_plug_html += '?src_image=' + escape(img_cover); 164 flash_plug_html += '&doc_url=' + escape(doc_url) 165 flash_plug_html += '" />\n'; 166 flash_plug_html += ' <PARAM name="quality" value="high" />\n'; 167 flash_plug_html += ' <PARAM name="bgcolor" value="#FFFFFF" />\n'; 168 flash_plug_html += ' <EMBED align="middle" \n'; 169 flash_plug_html += ' allowScriptAccess="always" swLiveConnect="true" \n'; 170 flash_plug_html += ' bgcolor="#FFFFFF" height="100%" name="Book" \n'; 171 flash_plug_html += ' pluginspage="http://www.macromedia.com/go/getflashplayer" \n'; 172 flash_plug_html += ' quality="high" \n'; 173 flash_plug_html += ' src="Book.swf'; 174 flash_plug_html += '?src_image=' + escape(img_cover); 175 flash_plug_html += '&doc_url=' + escape(doc_url); 176 flash_plug_html += '"\n'; 177 flash_plug_html += ' type="application/x-shockwave-flash" width="100%" />\n'; 178 flash_plug_html += '</OBJECT>\n'; 179 var flash_div = document.getElementById("bookdiv"); 180 flash_div.innerHTML = flash_plug_html; 181 </xsl:text> 182 </script> 183 </xsl:if> 184 </xsl:otherwise> 188 185 </xsl:choose> 189 </xsl:template>186 </xsl:template> 190 187 191 188 <xsl:template name="documentHeading"> … … 197 194 <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/> 198 195 <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> 199 <div id="documentheading"> 200 <a href="{$library_name}?a={$p.a}&sa={$p.sa}&s={$p.s}&c={$p.c}&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> 201 </xsl:call-template></a> 202 <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose> 203 </div> 204 205 <div id="docheadwrapper"> 206 <div id="documentinfo"> 196 <div id="documentheading"> 197 <a href="{$library_name}?a={$p.a}&sa={$p.sa}&s={$p.s}&c={$p.c}&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> 198 </xsl:call-template></a> 199 <xsl:choose><xsl:when test="@docType='simple'"><xsl:value-of select="metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:when><xsl:otherwise><xsl:value-of select="documentNode/metadataList/metadata[@name='Title']" disable-output-escaping="yes"/></xsl:otherwise></xsl:choose> 200 </div> 207 201 208 <xsl:choose> 209 <xsl:when test="$bookswitch = 'on'"> 210 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 211 <div id="headingimage"> 212 <xsl:call-template name="coverImage"/> 213 </div> 214 </xsl:if> 215 </xsl:when> 216 <xsl:otherwise> 217 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 218 <div id="headingimage"> 219 <xsl:call-template name="coverImage"/> 220 </div> 221 </xsl:if> 222 223 <ul id="docbuttons" > 224 <xsl:call-template name="documentButtons"> 225 <xsl:with-param name="collName" select="$collName"/> 226 </xsl:call-template> 227 </ul> 228 </xsl:otherwise> 229 </xsl:choose> 230 </div> 231 <!--<div><xsl:call-template name="enrichServices"> 232 <xsl:with-param name="collName" select="$collName"/> 233 </xsl:call-template></div>--> 234 <xsl:if test="$bookswitch = 'off'"> 235 <xsl:if test="string($doTOC) != 'false'"> 236 <div id="toc"> 237 <xsl:call-template name="TOC"> 238 <xsl:with-param name="collName" select="$collName"/> 239 </xsl:call-template> 202 <div id="docheadwrapper"> 203 <div id="documentinfo"> 204 205 <xsl:choose> 206 <xsl:when test="$bookswitch = 'on'"> 207 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 208 <div id="headingimage"> 209 <xsl:call-template name="coverImage"/> 210 </div> 211 </xsl:if> 212 </xsl:when> 213 <xsl:otherwise> 214 <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')"> 215 <div id="headingimage"> 216 <xsl:call-template name="coverImage"/> 217 </div> 218 </xsl:if> 219 220 <ul id="docbuttons" > 221 <xsl:call-template name="documentButtons"> 222 <xsl:with-param name="collName" select="$collName"/> 223 </xsl:call-template> 224 </ul> 225 </xsl:otherwise> 226 </xsl:choose> 240 227 </div> 241 </xsl:if> 242 </xsl:if> 243 </div> 244 </xsl:template> 228 <!--<div><xsl:call-template name="enrichServices"> 229 <xsl:with-param name="collName" select="$collName"/> 230 </xsl:call-template></div>--> 231 <xsl:if test="$bookswitch = 'off'"> 232 <xsl:if test="string($doTOC) != 'false'"> 233 <div id="toc"> 234 <xsl:call-template name="TOC"> 235 <xsl:with-param name="collName" select="$collName"/> 236 </xsl:call-template> 237 </div> 238 </xsl:if> 239 </xsl:if> 240 </div> 241 </xsl:template> 245 242 246 243 <xsl:template name="coverImage"> 247 <xsl:choose>248 249 250 251 252 253 254 255 256 244 <xsl:choose> 245 <xsl:when test="$bookswitch = 'on'"> 246 <script type="text/javascript"> 247 <xsl:text disable-output-escaping="yes">var img_cover = '</xsl:text><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>/index/assoc/<xsl:value-of select="metadataList/metadata[@name='archivedir']"/>/cover.jpg<xsl:text disable-output-escaping="yes">';</xsl:text> 248 </script> 249 </xsl:when> 250 <xsl:otherwise> 251 <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> 252 </xsl:otherwise> 253 </xsl:choose> 257 254 </xsl:template> 258 255 … … 264 261 <xsl:variable name="ed" select="/page/pageRequest/paramList/param[@name='ed']/@value"/> 265 262 266 267 268 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">269 <li>263 264 <!-- expand document --> 265 <xsl:if test="@docType = 'hierarchy' or @docType = 'paged'"> 266 <li> 270 267 <xsl:choose><xsl:when test="string($ed)='1'"> 271 272 273 274 275 276 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>277 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>278 </a>279 280 281 282 283 284 285 268 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute> 269 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/> 270 </a> 271 </xsl:when> 272 <xsl:otherwise> 273 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ed=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute> 274 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/> 275 </a> 276 </xsl:otherwise> 277 </xsl:choose> 278 </li> 279 </xsl:if> 280 281 <!-- expand contents --> 282 <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'"> 286 283 <li> 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 284 <xsl:choose><xsl:when test="string($ec)='1'"> 285 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ec=0"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute> 286 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/></a> 287 </xsl:when> 288 <xsl:otherwise> 289 <a href="{$library_name}?a=d&d={$docID}&c={$collName}&sib={$sib}&ec=1"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_tip')"/></xsl:attribute> 290 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_contents_b')"/> 291 </a> 292 </xsl:otherwise> 293 </xsl:choose> 294 </li> 295 </xsl:if> 296 297 <!-- detach page --> 298 <xsl:variable name="paramList" select="/page/pageRequest/paramList"/> 299 <li> 300 <a target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&d=<xsl:value-of select="$docID"/>&c=<xsl:value-of select="$collName"/>&sib=<xsl:value-of select="$sib"/>&dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&p.sa=<xsl:value-of select="$paramList/param[@name='p.sa']/@value"/></xsl:attribute><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_tip')"/></xsl:attribute> 301 <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/> 302 </a></li> 303 </xsl:template> 307 304 308 305 <xsl:template name="TOC"> … … 321 318 </xsl:choose> 322 319 </xsl:template> 323 320 324 321 <xsl:template name="hierarchicalContents"> 325 322 <xsl:param name="collName"/> … … 335 332 <ul id="tocnodes"> 336 333 <li> 337 338 339 340 341 <xsl:if test="string($oc)!='0'">342 343 <xsl:for-each select="documentNode/documentNode[@nodeID]">344 345 334 <xsl:choose><xsl:when test="string($oc)='0'"> 335 <a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=1&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&p.c={$p.c}"><xsl:call-template name="closedfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.open_toc')"/></xsl:with-param></xsl:call-template></a> 336 </xsl:when> 337 <xsl:otherwise><a href="{$library_name}?a=d&c={$collName}&d={$d}&sib={$sib}&oc=0&p.s={$p.s}&p.sa={$p.sa}&p.a={$p.a}&p.c={$p.c}"><xsl:call-template name="openfolderimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.close_toc')"/></xsl:with-param></xsl:call-template></a></xsl:otherwise></xsl:choose><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/> 338 <xsl:if test="string($oc)!='0'"> 339 <ul class="tocnode"> 340 <xsl:for-each select="documentNode/documentNode[@nodeID]"> 341 <xsl:apply-templates select='.'><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/><xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/></xsl:apply-templates> 342 </xsl:for-each> 346 343 </ul> 347 344 </xsl:if> 348 345 </li> 349 346 </ul> … … 360 357 <xsl:param name="p.c"/> 361 358 <!-- Display the appropriate image, depending on the node type --> 362 363 364 365 359 <li> 360 <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&c=<xsl:value-of select='$collName'/>&d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&sib=1<xsl:if test="string($ec) = '1'">&ec=1</xsl:if>&p.a=<xsl:value-of select="$p.a"/>&p.sa=<xsl:value-of select="$p.sa"/>&p.s=<xsl:value-of select="$p.s"/>&p.c=<xsl:value-of select="$p.c"/></xsl:attribute> 361 <xsl:apply-templates select="." mode="displayNodeIcon"/> 362 </a> 366 363 367 364 <!-- Display associated title, bolded if the node has content --> 368 369 370 371 372 373 374 375 376 <!-- Apply recursively to the children of this node -->377 <xsl:if test="documentNode[@nodeID]">378 379 380 381 382 383 384 385 </xsl:if>365 <xsl:choose> 366 <xsl:when test="nodeContent"> 367 <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span> 368 </xsl:when> 369 <xsl:otherwise> 370 <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/> 371 </xsl:otherwise> 372 </xsl:choose> 373 <!-- Apply recursively to the children of this node --> 374 <xsl:if test="documentNode[@nodeID]"> 375 <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]"> 376 <xsl:with-param name="collName" select="$collName"/> 377 <xsl:with-param name="ec" select="$ec"/> 378 <xsl:with-param name="p.a" select="$p.a"/><xsl:with-param name="p.s" select="$p.s"/><xsl:with-param name="p.sa" select="$p.sa"/><xsl:with-param name="p.c" select="$p.c"/> 379 <!--<xsl:with-param name="depth" select="$depth + 1"/>--> 380 </xsl:apply-templates> 381 </ul> 382 </xsl:if> 386 383 </li> 387 384 </xsl:template> … … 389 386 <!-- default content is to print the title and content of any documentNodes that have nodeContent --> 390 387 <xsl:template name="documentContent"> 391 <div class="documenttext">392 <xsl:choose>393 394 395 <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>396 397 </xsl:choose>398 </div>388 <div class="documenttext"> 389 <xsl:choose> 390 <xsl:when test="@docType='simple'"><xsl:apply-templates select="nodeContent"/></xsl:when> 391 <xsl:otherwise> 392 <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/> 393 </xsl:otherwise> 394 </xsl:choose> 395 </div> 399 396 </xsl:template> 400 397 … … 414 411 <xsl:choose> 415 412 <xsl:when test="not(name())"> 416 413 <xsl:value-of select="." disable-output-escaping="yes"/> 417 414 </xsl:when> 418 415 <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise> … … 422 419 423 420 <xsl:template name="xmldocumentContentPeeling"> 424 425 426 427 428 429 430 431 432 433 421 <xsl:choose> 422 <xsl:when test="@docType='simple'"> 423 <xsl:apply-templates select="nodeContent"/> 424 </xsl:when> 425 <xsl:otherwise> 426 <xsl:call-template name="xmlpeelingContents" /> 427 </xsl:otherwise> 428 </xsl:choose> 429 </xsl:template> 430 434 431 <xsl:template name="xmlpeelingContents"> 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 432 <xsl:if test="documentNode"> 433 <xsl:apply-templates select="documentNode" mode="xmlpeeling" /> 434 </xsl:if> 435 </xsl:template> 436 437 <xsl:template match="documentNode" mode="xmlpeeling"> 438 <!-- get title --> 439 <xsl:choose> 440 <xsl:when test="nodeContent"> 441 <xsl:text disable-output-escaping="yes"> 442 <Section> 443 <Description> 444 <Metadata name="Title"> 445 </xsl:text> 446 <xsl:value-of select="normalize-space(metadataList/metadata[@name='Title'])"/> 447 <xsl:text disable-output-escaping="yes"> 448 </Metadata> 449 </Description> 450 </xsl:text> 451 <xsl:value-of select="normalize-space(nodeContent)" disable-output-escaping="yes"/> 452 <xsl:text disable-output-escaping="yes"></Sec></xsl:text> 453 </xsl:when> 454 </xsl:choose> 455 456 <!-- recurse to the children --> 457 <xsl:if test="documentNode"> 458 <xsl:apply-templates select="documentNode" mode="xmlpeeling" /> 459 </xsl:if> 460 461 <!-- end the section --> 462 <xsl:text disable-output-escaping="yes"> 463 </Section> 464 </xsl:text> 465 </xsl:template> 469 466 470 467 <!-- match any file nodes --> … … 495 492 <xsl:variable name="serviceargs"> 496 493 <xsl:for-each select="param">&s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each> 497 </xsl:variable>494 </xsl:variable> 498 495 <a href="{$library_name}?{$actionargs}&c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a> 499 496 </xsl:template> … … 596 593 597 594 <div class="documentarrows"> 598 <xsl:if test="not(string($ed)='1')">599 600 601 602 603 604 605 606 607 </xsl:if>595 <xsl:if test="not(string($ed)='1')"> 596 <xsl:call-template name="documentArrow"> 597 <xsl:with-param name="collName" select="$collName"/> 598 <xsl:with-param name="direction">back</xsl:with-param> 599 </xsl:call-template> 600 <xsl:call-template name="documentArrow"> 601 <xsl:with-param name="collName" select="$collName"/> 602 <xsl:with-param name="direction">forward</xsl:with-param> 603 </xsl:call-template> 604 </xsl:if> 608 605 </div> 609 606 … … 615 612 <xsl:variable name="request-params" select="/page/pageRequest/paramList"/> 616 613 <xsl:if test='$request-params/param[@name="dt"]/@value != "simple"'> 617 <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&sib=1&p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif" /></xsl:otherwise></xsl:choose></a>614 <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&c=<xsl:value-of select="$collName"/>&d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&sib=1&p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose><xsl:when test="$direction='back'"><img class="lessarrow" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow" src="interfaces/default/images/more.gif" /></xsl:otherwise></xsl:choose></a> 618 615 </xsl:if> 619 616 </xsl:template> 620 617 621 618 <xsl:template name="externalPage"> 622 623 619 <xsl:param name="external"/> 620 <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> 624 621 <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2> 625 622 <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/> -
greenstone3/trunk/web/interfaces/default/transform/gli4gs3.xsl
r17017 r18316 12 12 <xsl:output method="html"/> 13 13 14 14 <!-- the main page layout template is here --> 15 15 <xsl:template match="page"> 16 17 <head>18 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>21 22 23 24 </head>25 26 27 28 29 30 31 16 <html> 17 <head> 18 <title> 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 21 </title> 22 <xsl:call-template name="globalStyle"/> 23 <xsl:call-template name="pageStyle"/> 24 </head> 25 <body> 26 <div id="globalwrapper"> 27 <xsl:call-template name="response" /> 28 <xsl:call-template name="greenstoneFooter"/> 29 </div> 30 </body> 31 </html> 32 32 </xsl:template> 33 33 … … 41 41 <xsl:template match="pageResponse"> 42 42 <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable> 43 44 45 43 <xsl:call-template name="standardPageBanner"> 44 <xsl:with-param name="collName" select="$collName"/> 45 </xsl:call-template> 46 46 47 47 <xsl:call-template name="navigationBar"> -
greenstone3/trunk/web/interfaces/default/transform/help.xsl
r17017 r18316 7 7 exclude-result-prefixes="java util"> 8 8 9 9 <!-- style includes global params interface_name, library_name --> 10 10 <xsl:include href="style.xsl"/> 11 11 12 12 <xsl:output method="html"/> 13 13 14 14 <!-- the main page layout template is here --> 15 15 <xsl:template match="page"> 16 17 <head>18 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>21 22 23 24 </head>25 26 27 28 29 30 31 16 <html> 17 <head> 18 <title> 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 21 </title> 22 <xsl:call-template name="globalStyle"/> 23 <xsl:call-template name="pageStyle"/> 24 </head> 25 <body> 26 <div id="globalwrapper"> 27 <xsl:call-template name="response" /> 28 <xsl:call-template name="greenstoneFooter"/> 29 </div> 30 </body> 31 </html> 32 32 </xsl:template> 33 33 … … 52 52 some help text goes here 53 53 </xsl:template> 54 54 55 55 </xsl:stylesheet> -
greenstone3/trunk/web/interfaces/default/transform/home.xsl
r18304 r18316 12 12 <xsl:output method="html"/> 13 13 14 14 <!-- the main page layout template is here --> 15 15 <xsl:template match="page"> 16 17 <head>18 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>21 22 23 24 </head>25 26 27 28 29 30 31 16 <html> 17 <head> 18 <title> 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 21 </title> 22 <xsl:call-template name="globalStyle"/> 23 <xsl:call-template name="pageStyle"/> 24 </head> 25 <body> 26 <div id="globalwrapper"> 27 <xsl:call-template name="response" /> 28 <xsl:call-template name="greenstoneFooter"/> 29 </div> 30 </body> 31 </html> 32 32 </xsl:template> 33 33 … … 49 49 <xsl:template name="pageBanner"> 50 50 <div id="banner"> 51 52 53 54 51 <p> 52 <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute> 53 </img> 54 </p> 55 55 </div> 56 56 <div id="content"> 57 58 59 60 57 <xsl:call-template name="dividerBar"> 58 <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'home.select_a_collection')"/> 59 </xsl:call-template> 60 </div> 61 61 </xsl:template> 62 62 63 63 <xsl:template match="collectionList"> 64 <ul id="collectionlist">65 <xsl:for-each select="collection">66 67 68 69 64 <ul id="collectionlist"> 65 <xsl:for-each select="collection"> 66 <li> 67 68 <xsl:choose> 69 <xsl:when test="displayItem[@name='icon']"> 70 70 <a href="{$library_name}?a=p&sa=about&c={@name}"> 71 71 <img> 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 </xsl:for-each>90 </ul>72 <xsl:attribute name="src"> 73 <xsl:value-of select="metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="displayItem[@name='icon']"/> 74 </xsl:attribute> 75 <xsl:attribute name="alt"> 76 <xsl:value-of select="displayItem[@name='name']"/> 77 </xsl:attribute> 78 </img> 79 </a> 80 </xsl:when> 81 <xsl:otherwise> 82 <a class="noimage" href="{$library_name}?a=p&sa=about&c={@name}"> 83 <xsl:value-of select="displayItem[@name='name']"/> 84 </a> 85 </xsl:otherwise> 86 </xsl:choose> 87 88 </li> 89 </xsl:for-each> 90 </ul> 91 91 </xsl:template> 92 92 … … 113 113 <xsl:call-template name="dividerBar"/> 114 114 <ul id="servicelist"> 115 <xsl:for-each select="service[@type='query']">116 115 <xsl:for-each select="service[@type='query']"> 116 <li><a href="{$library_name}?a=q&rt=d&s={@name}"><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> 117 117 </xsl:for-each> 118 118 <!--uncomment to display an authentication link--> 119 119 <!--<xsl:for-each select="service[@type='authen']"> 120 120 <li><a href="{$library_name}?a=g&rt=r&sa=authen&s={@name}&s1.aup=Login&s1.un=&s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> </xsl:for-each>--> 121 121 <!--uncomment to display a library interface link--> 122 122 <!--<li><a href="{$library_name}?a=p&sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>--> 123 123 </ul> 124 124 </xsl:template> 125 125 </xsl:stylesheet> 126 126 -
greenstone3/trunk/web/interfaces/default/transform/nav.xsl
r8660 r18316 7 7 exclude-result-prefixes="java util"> 8 8 9 9 <!-- style includes global params interface_name, library_name --> 10 10 <xsl:include href="style.xsl"/> 11 11 … … 34 34 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 35 35 <div align="right"> 36 <xsl:call-template name="top-buttons">37 38 </xsl:call-template>39 36 <xsl:call-template name="top-buttons"> 37 <xsl:with-param name="collName" select="$collName"/> 38 </xsl:call-template> 39 </div> 40 40 <xsl:call-template name="navigationBar"> 41 41 <xsl:with-param name="collName" select="$collName"/> -
greenstone3/trunk/web/interfaces/default/transform/pref.xsl
r17017 r18316 7 7 exclude-result-prefixes="java util"> 8 8 9 9 <!-- style includes global params interface_name, library_name --> 10 10 <xsl:include href="style.xsl"/> 11 11 12 12 <xsl:output method="html"/> 13 13 14 14 <!-- the main page layout template is here --> 15 15 <xsl:template match="page"> 16 17 <head>18 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>21 22 23 24 </head>25 26 27 28 29 30 31 16 <html> 17 <head> 18 <title> 19 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 20 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 21 </title> 22 <xsl:call-template name="globalStyle"/> 23 <xsl:call-template name="pageStyle"/> 24 </head> 25 <body> 26 <div id="globalwrapper"> 27 <xsl:call-template name="response" /> 28 <xsl:call-template name="greenstoneFooter"/> 29 </div> 30 </body> 31 </html> 32 32 </xsl:template> 33 33 … … 43 43 <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/> 44 44 45 <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable>46 45 <xsl:variable name="tidyoption"><xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='tidyoption']"/></xsl:variable> 46 47 47 <xsl:call-template name="standardPageBanner"> 48 48 <xsl:with-param name="collName" select="$collName"/> … … 54 54 </xsl:call-template> 55 55 <div id="qureyform"> 56 <form name="PrefForm" method="get" action="{$library_name}">57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 </div>56 <form name="PrefForm" method="get" action="{$library_name}"> 57 <input type='hidden' name='a' value='p'/> 58 <input type='hidden' name='sa' value='pref'/> 59 <input type='hidden' name='c' value="{$collName}"/> 60 <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.prespref')"/></div> 61 <ul id="presprefs"><xsl:call-template name="pres-prefs"/></ul> 62 <ul id="berrybasketprefs" ><xsl:call-template name="berrybasket-prefs"/></ul> 63 64 <xsl:if test="$tidyoption='tidy'"> 65 <ul id="bookprefs"><xsl:call-template name="book-prefs"/></ul> 66 </xsl:if> 67 68 <div class="formheading"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.searchpref')"/></div> 69 <ul id="searchprefs"><xsl:call-template name="search-prefs"/></ul> 70 <input type='submit'><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input> 71 </form> 72 </div> 73 73 </xsl:template> 74 74 75 75 <xsl:template name="pres-prefs"> 76 77 78 79 76 <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> <xsl:call-template name="lang-list"/></li> 77 <li><span class="rightspace"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.encoding')"/></span>x</li> 78 </xsl:template> 79 80 80 <xsl:template name="lang-list"> 81 81 <xsl:variable name="current" select="/page/@lang"/> … … 90 90 <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> 91 91 <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.hitsperpage')"/> 92 93 94 95 96 97 92 <select name="hitsPerPage"> 93 <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option> 94 <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option> 95 <option value="100"><xsl:if test="$hits=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option> 96 <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> 97 </select> 98 98 </li> 99 99 </xsl:template> 100 100 101 <xsl:template name="berrybasket-prefs">102 103 101 <xsl:template name="berrybasket-prefs"> 102 <xsl:variable name="berrybasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='berrybasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable> 103 104 104 <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket')"/> <select name="berrybasket"> 105 105 <option value="on"><xsl:if test="$berrybasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> … … 109 109 </xsl:template> 110 110 111 <xsl:template name="book-prefs">112 113 111 <xsl:template name="book-prefs"> 112 <xsl:variable name="book"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='book']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable> 113 114 114 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.book')"/> <select name="book"> 115 116 117 115 <option value="on"><xsl:if test="$book='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.on')"/></option> 116 <option value="off"><xsl:if test="$book='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.berrybasket.off')"/></option> 117 </select> 118 118 119 119 </xsl:template> -
greenstone3/trunk/web/interfaces/default/transform/process.xsl
r17017 r18316 13 13 <xsl:output method="html"/> 14 14 15 15 <!-- the main page layout template is here --> 16 16 <xsl:template match="page"> 17 18 <head>19 20 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->21 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>22 23 24 25 </head>26 27 28 29 30 31 32 17 <html> 18 <head> 19 <title> 20 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 21 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 22 </title> 23 <xsl:call-template name="globalStyle"/> 24 <xsl:call-template name="pageStyle"/> 25 </head> 26 <body> 27 <div id="globalwrapper"> 28 <xsl:call-template name="response" /> 29 <xsl:call-template name="greenstoneFooter"/> 30 </div> 31 </body> 32 </html> 33 33 </xsl:template> 34 34 -
greenstone3/trunk/web/interfaces/default/transform/query.xsl
r17017 r18316 15 15 <xsl:output method="html"/> 16 16 17 17 <!-- the main page layout template is here --> 18 18 <xsl:template match="page"> 19 20 <head>21 22 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->23 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>24 25 26 27 </head>28 29 30 31 32 33 34 19 <html> 20 <head> 21 <title> 22 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 23 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 24 </title> 25 <xsl:call-template name="globalStyle"/> 26 <xsl:call-template name="pageStyle"/> 27 </head> 28 <body> 29 <div id="globalwrapper"> 30 <xsl:call-template name="response" /> 31 <xsl:call-template name="greenstoneFooter"/> 32 </div> 33 </body> 34 </html> 35 35 </xsl:template> 36 36 37 37 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 38 38 39 39 <xsl:template name="pageTitle"> … … 43 43 <!-- page specific style goes here --> 44 44 <xsl:template name="pageStyle"> 45 <!--<xsl:if test="$berryBaskets = 'true'">-->46 45 <xsl:if test="$berrybasketswitch = 'on'"> 47 46 <xsl:call-template name="berryStyleSheet"/> … … 61 60 </xsl:call-template> 62 61 <div id="content"> 63 <xsl:apply-templates select="service"> 64 <xsl:with-param name="collName" select="$collName"/> 65 </xsl:apply-templates> 66 67 <!--<xsl:if test="$berryBaskets = 'true'">--> 68 <xsl:if test="$berrybasketswitch = 'on'"> 69 <xsl:call-template name="berrybasket"/> 70 </xsl:if> 62 <xsl:apply-templates select="service"> 63 <xsl:with-param name="collName" select="$collName"/> 64 </xsl:apply-templates> 65 66 <xsl:if test="$berrybasketswitch = 'on'"> 67 <xsl:call-template name="berrybasket"/> 68 </xsl:if> 71 69 <xsl:if test="contains($requesttype, 'r')"> 72 73 <xsl:with-param name="collName" select="$collName"/>74 70 <xsl:call-template name="query-response"> 71 <xsl:with-param name="collName" select="$collName"/> 72 </xsl:call-template> 75 73 </xsl:if> 76 74 77 75 </div> 78 76 </xsl:template> 79 77 80 78 … … 90 88 <xsl:if test="documentNodeList"> 91 89 92 <!-- next and prev links at top of results--> 93 90 <!-- next and prev links at top of results--> 94 91 <xsl:call-template name="resultNavigation"> 95 92 <xsl:with-param name="collName" select="$collName"/> 96 93 </xsl:call-template> 97 98 <!-- Display the matching documents -->99 94 95 <!-- Display the matching documents --> 100 96 <xsl:call-template name="resultList"> 101 97 <xsl:with-param name="collName" select="$collName"/> 102 98 </xsl:call-template> 103 99 104 100 <!-- next and prev links at bottom of page --> 105 101 <xsl:call-template name="resultNavigation"> … … 114 110 <xsl:variable name="subaction" select="../pageRequest/@subaction"/> 115 111 <div id="queryform"> 116 <form name="QueryForm" method="get" action="{$library_name}">117 118 119 120 121 122 123 <input type="hidden" name="startPage" value="1"/>124 125 126 127 </form>112 <form name="QueryForm" method="get" action="{$library_name}"> 113 <input type="hidden" name="a" value="q"/> 114 <input type="hidden" name="sa" value="{$subaction}"/> 115 <input type="hidden" name="rt" value="rd"/> 116 <input type="hidden" name="s" value="{@name}"/> 117 <input type="hidden" name="c" value="{$collName}"/> 118 <xsl:if test="not(paramList/param[@name='startPage'])"> 119 <input type="hidden" name="startPage" value="1"/> 120 </xsl:if> 121 <xsl:apply-templates select="paramList"/> 122 <input type="submit"><xsl:attribute name="value"><xsl:value-of select="displayItem[@name='submit']"/></xsl:attribute></input> 123 </form> 128 124 </div> 129 125 </xsl:template> 130 126 131 127 </xsl:stylesheet> 132 128 -
greenstone3/trunk/web/interfaces/default/transform/querytools.xsl
r13505 r18316 10 10 <xsl:template name="resultNavigation"> 11 11 <xsl:param name="collName"/> 12 <div class="resultnavigation"> 13 <!-- hits type --> 14 <xsl:variable name='ht'> 15 <xsl:choose> 16 <xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when> 17 <xsl:otherwise>i</xsl:otherwise> 18 </xsl:choose> 19 </xsl:variable> 20 21 <xsl:variable name="param-list" select="/page/pageRequest/paramList"/> 22 <!-- hits per page --> 23 <xsl:variable name="hpp"> 24 <xsl:choose> 25 <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when> 26 <xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when> 27 <xsl:otherwise>20</xsl:otherwise> 28 </xsl:choose> 29 </xsl:variable> 30 <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata --> 31 <xsl:variable name="td"> 32 <xsl:choose> 33 <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"> 34 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/> 35 </xsl:when> 36 <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"> 37 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/> 38 </xsl:when> 39 <xsl:otherwise> <!-- this is just a fall back - shoudl always have the metadata --> 40 <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/> 41 </xsl:otherwise> 42 </xsl:choose> 43 </xsl:variable> 44 45 <!-- only continue if hpp != -1 and td > hpp --> 46 <xsl:if test="not($hpp=-1) and $td > $hpp"> 47 <!-- start page --> 48 <xsl:variable name="here"> 12 <div class="resultnavigation"> 13 <!-- hits type --> 14 <xsl:variable name='ht'> 49 15 <xsl:choose> 50 <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when> 51 <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when> 52 <xsl:otherwise>1</xsl:otherwise> 16 <xsl:when test="/page/pageResponse/service/paramList/param[@name='hitsPerPage']">s</xsl:when> 17 <xsl:otherwise>i</xsl:otherwise> 53 18 </xsl:choose> 54 19 </xsl:variable> 55 <xsl:variable name="sa" select="/page/pageRequest/@subaction"/> 56 <xsl:variable name="service" select="$param-list/param[@name='s']/@value"/> 57 <xsl:variable name="prev" select="$here - 1"/> 58 <xsl:variable name="next" select="$here + 1"/> 59 <xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable> 60 61 <div> 20 21 <xsl:variable name="param-list" select="/page/pageRequest/paramList"/> 22 <!-- hits per page --> 23 <xsl:variable name="hpp"> 24 <xsl:choose> 25 <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.hitsPerPage']/@value"/></xsl:when> 26 <xsl:when test="$param-list/param[@name='hitsPerPage']"><xsl:value-of select="$param-list/param[@name='hitsPerPage']/@value"/></xsl:when> 27 <xsl:otherwise>20</xsl:otherwise> 28 </xsl:choose> 29 </xsl:variable> 30 <!-- total docs - this may be in numDocsMatched or numDocsReturned metadata --> 31 <xsl:variable name="td"> 32 <xsl:choose> 33 <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"> 34 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsReturned']"/> 35 </xsl:when> 36 <xsl:when test="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"> 37 <xsl:value-of select="/page/pageResponse/metadataList/metadata[@name='numDocsMatched']"/> 38 </xsl:when> 39 <xsl:otherwise> <!-- this is just a fall back - should always have the metadata --> 40 <xsl:value-of select="count(/page/pageResponse/documentNodeList/documentNode)"/> 41 </xsl:otherwise> 42 </xsl:choose> 43 </xsl:variable> 44 45 <!-- only continue if hpp != -1 and td > hpp --> 46 <xsl:if test="not($hpp=-1) and $td > $hpp"> 47 <!-- start page --> 48 <xsl:variable name="here"> 49 <xsl:choose> 50 <xsl:when test="$ht='s'"><xsl:value-of select="$param-list/param[@name='s1.startPage']/@value"/></xsl:when> 51 <xsl:when test="$param-list/param[@name='startPage']"><xsl:value-of select="$param-list/param[@name='startPage']/@value"/></xsl:when> 52 <xsl:otherwise>1</xsl:otherwise> 53 </xsl:choose> 54 </xsl:variable> 55 <xsl:variable name="sa" select="/page/pageRequest/@subaction"/> 56 <xsl:variable name="service" select="$param-list/param[@name='s']/@value"/> 57 <xsl:variable name="prev" select="$here - 1"/> 58 <xsl:variable name="next" select="$here + 1"/> 59 <xsl:variable name="page-param"><xsl:if test="$ht='s'">s1.</xsl:if>startPage</xsl:variable> 60 61 <div> 62 62 <div> 63 64 65 66 67 68 69 63 <xsl:if test="$here > 1"><a href="{$library_name}?a=q&sa={$sa}&c={$collName}&s={$service}&rt=rd&{$page-param}={$prev}"><img src="interfaces/default/images/less.gif" width='30' height='16' border='0' align='top'/><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($prev - 1)*$hpp + 1)"/> - <xsl:value-of select="number(($prev * $hpp))"/></a></xsl:if> 64 65 66 <xsl:if test="(($here * $hpp) + 1) < $td"> 67 <xsl:variable name='m' select="number($next * $hpp)"/> 68 <xsl:variable name='mm'><xsl:choose><xsl:when test="$m < $td"><xsl:value-of select='$m'/></xsl:when><xsl:otherwise><xsl:value-of select='$td'/></xsl:otherwise></xsl:choose></xsl:variable> 69 <a href="{$library_name}?a=q&sa={$sa}&c={$collName}&s={$service}&rt=rd&{$page-param}={$next}"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.matches')"/><xsl:text> </xsl:text><xsl:value-of select="number(($next - 1)*$hpp + 1)"/> - <xsl:value-of select="$mm"/><img src="interfaces/default/images/more.gif" width='30' height='16' border='0' align='top'/></a></xsl:if></div> 70 70 </div> 71 </xsl:if>72 </div>71 </xsl:if> 72 </div> 73 73 </xsl:template> 74 74 75 75 <xsl:template name="matchDocs"> 76 76 <!-- If the number of matching documents is known, display it --> 77 77 <div id="matchdocs"> 78 <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/>79 <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/>80 <xsl:choose>81 82 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/>83 84 85 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/>86 87 88 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/>89 <xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if>90 91 92 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/>93 94 </xsl:choose>95 </div>78 <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']"/> 79 <xsl:variable name="numDocsReturned" select="metadataList/metadata[@name='numDocsReturned']"/> 80 <xsl:choose> 81 <xsl:when test="$numDocsMatched='0' or $numDocsReturned='0'"> 82 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.nodocsmatch')"/> 83 </xsl:when> 84 <xsl:when test="$numDocsMatched='1' or $numDocsReturned='1'"> 85 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.onedocsmatch')"/> 86 </xsl:when> 87 <xsl:when test="$numDocsMatched"> 88 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.manydocsmatch', $numDocsMatched)"/> 89 <xsl:if test="$numDocsReturned"> (<xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.docsreturned', $numDocsReturned)"/>)</xsl:if> 90 </xsl:when> 91 <xsl:when test="$numDocsReturned"> 92 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.atleastdocsmatch', $numDocsReturned)"/> 93 </xsl:when> 94 </xsl:choose> 95 </div> 96 96 </xsl:template> 97 97 98 98 <!-- paging is now done by the query action, so here we just print out all the docs that we have --> 99 99 <xsl:template name="resultList"> 100 100 <xsl:param name="collName"/> 101 101 <ul id="resultlist"> 102 <xsl:for-each select="documentNodeList/documentNode">102 <xsl:for-each select="documentNodeList/documentNode"> 103 103 <li><table> 104 <xsl:call-template name="documentNodeWrapper">105 <xsl:with-param name="collName" select="$collName"/>106 <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/>107 </xsl:call-template>108 104 <xsl:call-template name="documentNodeWrapper"> 105 <xsl:with-param name="collName" select="$collName"/> 106 <xsl:with-param name="serviceName" select="/page/pageResponse/service/@name"/> 107 </xsl:call-template> 108 </table> 109 109 </li> 110 110 </xsl:for-each> … … 118 118 <xsl:variable name="berrybasketswitch"><xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/></xsl:variable> 119 119 <!--<xsl:if test="$berryBaskets = 'true'">--> 120 120 <xsl:if test="$berrybasketswitch = 'on'"> 121 121 <xsl:call-template name="addBerry"> 122 122 <xsl:with-param name="collName" select="$collName"/> … … 135 135 <xsl:param name="collName"/> 136 136 <xsl:param name="serviceName"/> 137 138 139 137 <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&c=<xsl:value-of select='$collName'/>&d=<xsl:value-of select='@nodeID'/><xsl:if test="@nodeType='leaf'">&sib=1</xsl:if>&dt=<xsl:value-of select='@docType'/>&p.a=q&&p.sa=<xsl:value-of select="/page/pageRequest/@subaction"/>&p.s=<xsl:value-of select="$serviceName"/></xsl:attribute> 138 <xsl:apply-templates select="." mode="displayNodeIcon"/> 139 </a> 140 140 <span><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span> 141 141 </xsl:template> 142 142 143 143 <xsl:template name="termInfo"> 144 <div class="terminfo">145 <xsl:if test="count(termList/term) > 0">146 144 <div class="terminfo"> 145 <xsl:if test="count(termList/term) > 0"> 146 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'query.wordcount')"/> 147 147 <xsl:for-each select="termList/term"> 148 148 <xsl:if test="position() > 1">, </xsl:if> 149 149 <xsl:value-of select="@name"/>: <xsl:value-of select="@freq"/> 150 150 </xsl:for-each> 151 </xsl:if>152 </div>151 </xsl:if> 152 </div> 153 153 </xsl:template> 154 154 -
greenstone3/trunk/web/interfaces/default/transform/service-params.xsl
r13505 r18316 5 5 extension-element-prefixes="java"> 6 6 7 <!-- handling of the different types of params on a service form7 <!-- handling of the different types of params on a service form 8 8 - these now only output the selection box/text box etc, not the name --> 9 9 … … 19 19 <xsl:otherwise> 20 20 <xsl:variable name="pvalue"><xsl:apply-templates select="." mode="calculate-default"><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></xsl:variable> 21 21 <li><xsl:value-of select="displayItem[@name='name']"/><xsl:apply-templates select="."><xsl:with-param name="default" select="$pvalue"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates></li> 22 22 </xsl:otherwise> 23 23 </xsl:choose> … … 25 25 </ul> 26 26 </xsl:template> 27 27 28 28 <!-- puts all the params into a=p&p=h type form - need to change this if use 29 29 multi params --> … … 111 111 </select> 112 112 </xsl:template> 113 113 114 114 <!-- string params --> 115 115 <xsl:template match="param[@type='string']"> … … 131 131 <xsl:variable name="parent" select="@name"/> 132 132 <table> 133 133 <tr class="queryfieldheading"><xsl:value-of select="displayItem[@name='name']"/> 134 134 <xsl:for-each select="param"> 135 135 <td class="queryfieldname"><xsl:value-of select="displayItem[@name='name']"/></td> 136 136 </xsl:for-each> 137 137 </tr> 138 138 139 139 <xsl:apply-templates select="." mode="contents"><xsl:with-param name="occurs" select="@occurs"/><xsl:with-param name="ns" select="$ns"/></xsl:apply-templates> 140 140 </table> 141 141 </xsl:template> … … 170 170 <!-- 171 171 <xsl:template match="paramList"> 172 <p/><table width="537">173 <xsl:choose>174 <xsl:when test='count(param)>4'>175 <xsl:for-each select="param[position() mod 2 = 1]">176 <tr><xsl:apply-templates select="."/>177 <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr>178 </xsl:for-each>179 </xsl:when>180 181 <xsl:for-each select="param">182 <tr><xsl:apply-templates select='.'/></tr>183 </xsl:for-each>184 </xsl:otherwise>185 </xsl:choose>186 </table>187 </xsl:template>172 <p/><table width="537"> 173 <xsl:choose> 174 <xsl:when test='count(param)>4'> 175 <xsl:for-each select="param[position() mod 2 = 1]"> 176 <tr><xsl:apply-templates select="."/> 177 <xsl:if test="following-sibling::param[1]"><xsl:apply-templates select='following-sibling::param[1]'/></xsl:if></tr> 178 </xsl:for-each> 179 </xsl:when> 180 <xsl:otherwise> 181 <xsl:for-each select="param"> 182 <tr><xsl:apply-templates select='.'/></tr> 183 </xsl:for-each> 184 </xsl:otherwise> 185 </xsl:choose> 186 </table> 187 </xsl:template> 188 188 --> -
greenstone3/trunk/web/interfaces/default/transform/style.xsl
r18305 r18316 10 10 <xsl:param name="interface_name"/> 11 11 <xsl:param name="library_name"/> 12 12 <!-- global style info goes here --> 13 13 <xsl:template name="globalStyle"> 14 14 <link rel="stylesheet" href="interfaces/default/style/core.css" type="text/css"/> 15 15 </xsl:template> 16 16 17 18 19 <xsl:template name="response"> 20 <xsl:apply-templates select="pageResponse"/> 21 <xsl:if test="descendant::error"> 22 <script language="Javascript"> 23 <xsl:text disable-output-escaping="yes"> 24 function removeAllChildren(node) { 25 while (node.hasChildNodes()) { 26 node.removeChild(node.firstChild); 27 } 28 } 29 30 function toggleHideError(obj) { 31 if (obj.style.display == "none") { 32 obj.style.display = ""; 33 hide_link = document.getElementById("hide"); 34 removeAllChildren(hide_link); 35 hide_link.appendChild(document.createTextNode("Hide Error")); 36 } else { 37 obj.style.display = "none"; 38 hide_link = document.getElementById("hide"); 39 removeAllChildren(hide_link); 40 hide_link.appendChild(document.createTextNode("Show Error")); 41 42 } 43 } 44 </xsl:text> 45 </script> 46 <p align='right'><a id="hide" href="javascript:toggleHideError(error);">Show Error</a></p> 47 <div id="error" style="display: none;"> 48 <xsl:apply-templates select="descendant::error"/> 49 </div> 50 </xsl:if> 51 </xsl:template> 17 <xsl:template name="response"> 18 <xsl:apply-templates select="pageResponse"/> 19 <xsl:if test="descendant::error"> 20 <script language="Javascript"> 21 <xsl:text disable-output-escaping="yes"> 22 function removeAllChildren(node) { 23 while (node.hasChildNodes()) { 24 node.removeChild(node.firstChild); 25 } 26 } 27 28 function toggleHideError(obj) { 29 if (obj.style.display == "none") { 30 obj.style.display = ""; 31 hide_link = document.getElementById("hide"); 32 removeAllChildren(hide_link); 33 hide_link.appendChild(document.createTextNode("Hide Error")); 34 } else { 35 obj.style.display = "none"; 36 hide_link = document.getElementById("hide"); 37 removeAllChildren(hide_link); 38 hide_link.appendChild(document.createTextNode("Show Error")); 39 } 40 } 41 </xsl:text> 42 </script> 43 <p align='right'><a id="hide" href="javascript:toggleHideError(error);">Show Error</a></p> 44 <div id="error" style="display: none;"> 45 <xsl:apply-templates select="descendant::error"/> 46 </div> 47 </xsl:if> 48 </xsl:template> 52 49 53 50 <xsl:template name="greenstoneFooter"> 54 55 56 57 58 51 <div id="footer"> 52 <xsl:call-template name="dividerBar"> 53 <xsl:with-param name="text" select="util:getInterfaceText($interface_name, /page/@lang, 'gs3power')"/> 54 </xsl:call-template> 55 </div> 59 56 </xsl:template> 60 57 … … 68 65 <xsl:variable name="this-element" select="/page/pageResponse/collection|/page/pageResponse/serviceCluster"/> 69 66 <div id="banner"> 70 <p>71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 67 <p> 68 <a href="{$library_name}?a=p&sa=about&c={$collName}"> 69 <xsl:choose> 70 <xsl:when test="$this-element/displayItem[@name='icon']"> 71 <img border="0"> 72 <xsl:attribute name="src"> 73 <xsl:value-of select="$this-element/metadataList/metadata[@name='httpPath']"/>/images/<xsl:value-of select="$this-element/displayItem[@name='icon']"/> 74 </xsl:attribute> 75 <xsl:attribute name="alt"> 76 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 77 </xsl:attribute> 78 <xsl:attribute name="title"> 79 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'aboutpage')"/> 80 </xsl:attribute> 81 </img> 82 </xsl:when> 83 <xsl:otherwise> 84 <xsl:value-of select="$this-element/displayItem[@name='name']"/> 85 </xsl:otherwise> 86 </xsl:choose> 87 </a> 88 </p> 89 <ul id="bannerlist"> 90 <xsl:call-template name="top-buttons"> 91 <xsl:with-param name="collName" select="$collName"/> 92 <xsl:with-param name="pageType" select="$pageType"/> 93 </xsl:call-template> 94 </ul> 98 95 </div> 99 96 </xsl:template> 100 97 101 98 <xsl:template name="top-buttons"> 102 99 <xsl:param name="collName"/> 103 100 <xsl:param name="pageType"/> 104 <li><a href="{$library_name}?a=p&sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute> 105 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/> 101 <li><a href="{$library_name}?a=p&sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute> 102 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/> 103 </a></li> 104 <xsl:choose> 105 <xsl:when test="$pageType='help'"> 106 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li> 107 </xsl:when> 108 <xsl:otherwise> 109 <li><a href="{$library_name}?a=p&sa=help&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 110 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 106 111 </a></li> 107 <xsl:choose> 108 <xsl:when test="$pageType='help'"> 109 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/></a></li> 110 </xsl:when> 111 <xsl:otherwise> 112 <li><a href="{$library_name}?a=p&sa=help&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute> 113 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/> 114 </a></li> 115 </xsl:otherwise> 116 </xsl:choose> 117 <xsl:choose> 118 <xsl:when test="$pageType='pref'"> 119 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li> 120 </xsl:when> 121 <xsl:otherwise> 122 <li><a href="{$library_name}?a=p&sa=pref&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 123 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 124 </a></li> 125 </xsl:otherwise> 126 </xsl:choose> 112 </xsl:otherwise> 113 </xsl:choose> 114 <xsl:choose> 115 <xsl:when test="$pageType='pref'"> 116 <li><a><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/></a></li> 117 </xsl:when> 118 <xsl:otherwise> 119 <li><a href="{$library_name}?a=p&sa=pref&c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute> 120 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/> 121 </a></li> 122 </xsl:otherwise> 123 </xsl:choose> 127 124 </xsl:template> 128 125 … … 132 129 <xsl:variable name="this-service" select="/page/pageResponse/service/@name"/> 133 130 <xsl:choose> 134 <xsl:when test="$this-element/serviceList/service">135 136 131 <xsl:when test="$this-element/serviceList/service"> 132 <div id="navbar"> 133 <ul id="navbarlist"> 137 134 <xsl:for-each select="$this-element/serviceList/service"> 138 135 <xsl:variable name="action"><xsl:choose> … … 153 150 </xsl:choose> 154 151 </xsl:for-each> 155 156 152 </ul> 153 </div> 157 154 </xsl:when> 158 155 <xsl:otherwise> 159 156 <xsl:call-template name="dividerBar"> 160 157 <xsl:with-param name="text" select="' '"/> 161 158 </xsl:call-template> 162 159 </xsl:otherwise> … … 166 163 167 164 <xsl:template name="dividerBar"> 168 <xsl:param name='text'/>169 165 <xsl:param name='text'/> 166 <xsl:choose> 170 167 <xsl:when test="$text"> 171 172 </xsl:when> 173 <xsl:otherwise> 174 168 <div class="divbar"><xsl:value-of select="$text"/></div> 169 </xsl:when> 170 <xsl:otherwise> 171 <div class="divbar"><xsl:text disable-output-escaping="yes">&nbsp;</xsl:text></div> 175 172 </xsl:otherwise> 176 173 </xsl:choose> … … 179 176 <!-- Display the appropriate image, depending on the node type --> 180 177 <xsl:template match="documentNode" mode="displayNodeIcon"> 181 178 182 179 <!-- Root node: book icon (open or closed) --> 183 180 <xsl:choose> -
greenstone3/trunk/web/interfaces/default/transform/system.xsl
r17017 r18316 10 10 <!-- the main page layout template is here --> 11 11 <xsl:template match="page"> 12 13 <head>14 15 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->16 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>17 18 19 20 </head>21 22 23 24 25 26 27 12 <html> 13 <head> 14 <title> 15 <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title--> 16 <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text> 17 </title> 18 <xsl:call-template name="globalStyle"/> 19 <xsl:call-template name="pageStyle"/> 20 </head> 21 <body> 22 <div id="globalwrapper"> 23 <xsl:call-template name="response" /> 24 <xsl:call-template name="greenstoneFooter"/> 25 </div> 26 </body> 27 </html> 28 28 </xsl:template> 29 29 30 30 <xsl:template name="pageTitle"> 31 31 <xsl:value-of select="java:org.greenstone.gsdl3.util.XSLTUtil.getInterfaceText($interface_name, /page/@lang, 'gsdl')"/> 32 32 </xsl:template> 33 33 34 34 <!-- page specific style goes here --> 35 35 <xsl:template name="pageStyle"/> 36 36 37 37 <xsl:template match="pageResponse"> 38 38 <xsl:value-of select="status"/>
Note:
See TracChangeset
for help on using the changeset viewer.