Changeset 18318 for greenstone3


Ignore:
Timestamp:
2009-01-06T14:52:16+13:00 (15 years ago)
Author:
kjdon
Message:

made the indentation nice

Location:
greenstone3/trunk/web/interfaces/gs2/transform
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • greenstone3/trunk/web/interfaces/gs2/transform/about.xsl

    r17019 r18318  
    1414  <xsl:output method="html"/> 
    1515 
    16     <!-- the main page layout template is here -->
     16  <!-- the main page layout template is here -->
    1717  <xsl:template match="page">
    1818    <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>
     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>
    2727      <body class="bgimage">
    2828    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2929    <div id="page">
    30        <xsl:apply-templates select="pageResponse"/>
    31        <xsl:call-template name="greenstoneFooter"/>                   
     30      <xsl:apply-templates select="pageResponse"/>
     31      <xsl:call-template name="greenstoneFooter"/>                     
    3232    </div>
    3333      </body>
     
    4545  <xsl:template match="pageResponse">
    4646    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    47       <xsl:apply-templates select="collection"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
     47    <xsl:apply-templates select="collection"><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
    4848
    4949  </xsl:template>
     
    5959    </xsl:call-template>
    6060    <div class="document">
    61     <xsl:if test="/page/pageRequest/paramList/param[@name='ct']/@value = 0">
    62     <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
    63       <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
    64     <xsl:call-template name="dividerBar"/>
    65     </xsl:if>
     61      <xsl:if test="/page/pageRequest/paramList/param[@name='ct']/@value = 0">
     62    <xsl:apply-templates select="serviceList/service[@name='TextQuery']">
     63      <xsl:with-param name="collName" select="$collName"/></xsl:apply-templates>
     64    <xsl:call-template name="dividerBar"/>
     65      </xsl:if>
    6666    </div>
    6767    <div>
    68     <xsl:if test="displayItem[@name='description']">
    69     <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.aboutcoll')"/></h3>
    70     <p><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/></p>
    71     </xsl:if>
    72     <xsl:apply-templates select="." mode="simplehelp"/>
     68      <xsl:if test="displayItem[@name='description']">
     69    <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.aboutcoll')"/></h3>
     70    <p><xsl:value-of select="displayItem[@name='description']" disable-output-escaping='yes'/></p>
     71      </xsl:if>
     72      <xsl:apply-templates select="." mode="simplehelp"/>
    7373    </div> 
    7474  </xsl:template>
  • greenstone3/trunk/web/interfaces/gs2/transform/applet.xsl

    r17019 r18318  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    1616    <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>
     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>
    2525      <body class="bgimage">
    2626    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2727    <div id="page">
    28        <xsl:apply-templates select="pageResponse"/>
    29        <xsl:call-template name="greenstoneFooter"/>                   
     28      <xsl:apply-templates select="pageResponse"/>
     29      <xsl:call-template name="greenstoneFooter"/>                     
    3030    </div>
    3131      </body>
     
    4848      </xsl:call-template>
    4949      <p/>
    50     <xsl:call-template name="navigationBar">
    51       <xsl:with-param name="collName" select="$collName"/>
    52     </xsl:call-template>     
    53 <!--      <xsl:call-template name="dividerBar">
    54     <xsl:with-param name="text" select="service/displayItem[@name='name']"/>
    55       </xsl:call-template>-->
     50      <xsl:call-template name="navigationBar">
     51    <xsl:with-param name="collName" select="$collName"/>
     52      </xsl:call-template>     
     53      <!--      <xsl:call-template name="dividerBar">
     54      <xsl:with-param name="text" select="service/displayItem[@name='name']"/>
     55    </xsl:call-template>-->
    5656      <p/>
    5757      <xsl:copy-of select="service/applet"/>
  • greenstone3/trunk/web/interfaces/gs2/transform/authen.xsl

    r17019 r18318  
    1313  <xsl:output method="html"/> 
    1414 
    15     <!-- the main page layout template is here -->
     15  <!-- the main page layout template is here -->
    1616  <xsl:template match="page">
    1717    <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>
     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>
    2626      <body class="bgimage">
    2727    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2828    <div id="page">
    29        <xsl:apply-templates select="pageResponse"/>
    30        <xsl:call-template name="greenstoneFooter"/>                   
     29      <xsl:apply-templates select="pageResponse"/>
     30      <xsl:call-template name="greenstoneFooter"/>                     
    3131    </div>
    3232      </body>
     
    4040  </xsl:template>
    4141
    42  <xsl:template name="pageStyle"/>
     42  <xsl:template name="pageStyle"/>
    4343
    4444  <xsl:template match="page">
     
    6767        <td><xsl:if test="$un_s!=''">
    6868            <xsl:if test="$asn!='' and $asn!='0'">
    69             <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
     69              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.username')"/>  :  <xsl:value-of select="$un_s"/>
    7070            </xsl:if>
    7171          </xsl:if></td>
     
    7575
    7676      <div id="navbar">
    77          
     77       
    7878        <ul id="navbarlist">
    7979          <!--greenstone home-->
     
    8585          <xsl:when test="$asn!='' and $asn!='0' and $un_s!=''">
    8686            <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.aup=ListUsers&amp;s1.asn={$asn}&amp;s1.uan=1&amp;s1.un={$un_s}&amp;s1.pw="><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
    87         </xsl:when>
    88           <xsl:otherwise>
    89         <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
    90           </xsl:otherwise>
    91         </xsl:choose></li>
     87          </xsl:when>
     88          <xsl:otherwise>
     89            <a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s=Authentication&amp;s1.asn=&amp;s1.aup=Login"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_users')"/></a>
     90          </xsl:otherwise>
     91        </xsl:choose></li>
    9292         
    9393          <!--add a new user-->
     
    102102        </xsl:choose>
    103103          </li>
    104          
     104          
    105105          <!-- change password-->
    106106          <li>
     
    140140              <xsl:otherwise>
    141141
    142               <p align="left">
    143                 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
    144               <xsl:if test="$err='un-pw-err'">
    145                 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
    146               </xsl:if>
    147               <xsl:if test="$err='no-permission' and $info='Login'">
    148                 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
    149               </xsl:if>
    150              <xsl:if test="$err='as-false'">
    151                 <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
    152               </xsl:if>
    153               <xsl:call-template name="login">
    154                 <xsl:with-param name="sub_action" select="$sub_action"/>
    155                 <xsl:with-param name="authen_service" select="$authen_service"/>
    156                 <xsl:with-param name="pro_action" select="$pro_action"/>   
    157               </xsl:call-template>
     142            <p align="left">
     143              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_3')"/><br/></p>
     144            <xsl:if test="$err='un-pw-err'">
     145              <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.wrong_password_warning')"/></font></p>
     146            </xsl:if>
     147            <xsl:if test="$err='no-permission' and $info='Login'">
     148              <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
     149            </xsl:if>
     150            <xsl:if test="$err='as-false'">
     151              <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.account_status_false')"/></font></p>
     152            </xsl:if>
     153            <xsl:call-template name="login">
     154              <xsl:with-param name="sub_action" select="$sub_action"/>
     155              <xsl:with-param name="authen_service" select="$authen_service"/>
     156              <xsl:with-param name="pro_action" select="$pro_action"/> 
     157            </xsl:call-template>
    158158
    159159              </xsl:otherwise>
    160            </xsl:choose>
     160            </xsl:choose>
    161161          </xsl:if>
    162162
     
    181181          <xsl:if test="$pro_action='AddUser'">
    182182            <xsl:if test="$err!='' and $err!='no-permission' and $err!='un-exist' and $err!='un-err' and $err!='pw-err'">
    183             <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
     183              <p align="left"><font color='red'><xsl:value-of select="$err" /></font></p>
    184184            </xsl:if>
    185185
     
    187187              <p align="left">
    188188            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.login_descibe_line_2')"/><br/>
    189         </p>
     189              </p>
    190190              <xsl:if test="$err='no-permission'">
    191191            <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.no_permission')"/></font></p>
     
    206206            <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.unsername_err')"/></font></p>
    207207              </xsl:if>
    208             <xsl:if test="$err='un-exist'">
     208              <xsl:if test="$err='un-exist'">
    209209            <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
    210210              </xsl:if>
     
    308308            <p align="left"><font color="red"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.password_initial')"/></font></p>
    309309              </xsl:if>
    310                <xsl:if test="$err='un-exist'">
     310              <xsl:if test="$err='un-exist'">
    311311            <p align="left"><font color='red'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.user_has_existed')"/></font></p>
    312312              </xsl:if>
     
    346346  </xsl:template>
    347347 
    348  <!--template name="login"-->
     348  <!--template name="login"-->
    349349  <xsl:template name="login">
    350350    <xsl:param name="sub_action"/>
     
    376376          <input type="submit" value="submit"></input></td>
    377377      </tr>
    378       </table>
     378    </table>
    379379      </form>
    380380    </div>
    381381  </xsl:template>
    382382
    383  <!--template name="listusers"-->
     383  <!--template name="listusers"-->
    384384  <xsl:template name="listusers" >
    385    <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
     385    <h2 align="left"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'authen.list_of_current_users_title')"/></h2>
    386386
    387387    <table id='mainTable' align="left" border="0" cellspacing="1" cellpadding="3" width="100%" >
     
    394394      </tr>
    395395      <xsl:for-each select="/page/pageResponse/authenticationNode/service/userNodeList/userNode">
    396       <tr>
    397     <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
    398     <td id="status" bgcolor="#eeeeee">
     396    <tr>
     397      <td bgcolor="#eeeeee"><xsl:value-of select="@umun"/></td>
     398      <td id="status" bgcolor="#eeeeee">
    399399        <script type="text/javascript">
    400400          <xsl:text disable-output-escaping="yes">
    401401        var status="</xsl:text><xsl:value-of select="@umas"/><xsl:text disable-output-escaping="yes">";
    402402        if (status=="true"){
    403            document.getElementById("status").innerHTML="enabled";
     403          document.getElementById("status").innerHTML="enabled";
    404404        }
    405405        if (status=="false"){
    406            document.getElementById("status").innerHTML="disabled";
     406          document.getElementById("status").innerHTML="disabled";
    407407        }
    408408          </xsl:text>       
    409409        </script>
    410410      </td>
    411     <td id="group" bgcolor="#eeeeee">
    412          <script type="text/javascript">
     411      <td id="group" bgcolor="#eeeeee">
     412        <script type="text/javascript">
    413413          <xsl:text disable-output-escaping="yes">
    414414        var groups="</xsl:text><xsl:value-of select="@umgp"/><xsl:text disable-output-escaping="yes">";
     
    416416        var new_groups="";
    417417        for (j=0; j &lt; split_groups.length ; j++){
    418                    new_groups+=split_groups[j]+" &lt;br /&gt; ";
    419            }
    420           document.getElementById('group').innerHTML=new_groups;
     418          new_groups+=split_groups[j]+" &lt;br /&gt; ";
     419        }
     420        document.getElementById('group').innerHTML=new_groups;
    421421          </xsl:text>       
    422422        </script>
    423423      </td>
    424     <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
    425     <td bgcolor="#eeeeee">
     424      <td bgcolor="#eeeeee"><xsl:value-of select="@umc"/></td>
     425      <td bgcolor="#eeeeee">
    426426        <form name="ListUsersForm" method="get" action="{$library_name}">
    427427          <input type='hidden' name='a' value='g'/>
     
    439439          <input type="submit"><xsl:attribute name="name">s1.aup</xsl:attribute><xsl:attribute name="value">DeleteUser</xsl:attribute></input>
    440440        </form>
    441     </td>
     441      </td>
    442442    </tr>
    443        </xsl:for-each>
     443      </xsl:for-each>
    444444    </table>
    445445  </xsl:template>
    446446
    447  <!--template name="modifypassword"-->
    448  <xsl:template name="modifypassword" >
     447  <!--template name="modifypassword"-->
     448  <xsl:template name="modifypassword" >
    449449    <xsl:param name="sub_action"/>
    450450    <xsl:param name="authen_service"/>
     
    466466   
    467467    <table align="center"><tr><td align="right">
    468     <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>
     468          <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>
    469469      <tr><td align="right">
    470     <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>
     470          <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>
    471471      <tr><td align="right">
    472     <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>
     472          <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>
    473473      <tr><td></td><td>
    474     <input type="submit" value="submit"></input></td>
    475         </tr>
    476       </table>
    477     </form>
    478       </div>
    479   </xsl:template>
    480 
    481 <!--template name="deleteuser"-->
     474          <input type="submit" value="submit"></input></td>
     475      </tr>
     476    </table>
     477      </form>
     478    </div>
     479  </xsl:template>
     480
     481  <!--template name="deleteuser"-->
    482482  <xsl:template name="deleteuser">
    483483    <xsl:param name="sub_action"/>
     
    504504  </xsl:template>
    505505 
    506 <!--template name="edituser"-->
     506  <!--template name="edituser"-->
    507507  <xsl:template name="edituser" >
    508508    <xsl:param name="sub_action"/>
     
    556556        <td  align="right"> <select id="groups" size="0">
    557557        <script type="text/javascript">
    558             <xsl:text disable-output-escaping="yes">
     558          <xsl:text disable-output-escaping="yes">
    559559            var group_arr=Array("administrator","all-collections-editor","personal-collections-editor");
    560560            var group_string=document.getElementById("group").value;
     
    562562            var find=0;
    563563            for (i=0; i &lt; group_arr.length; i++){
    564                  find=0;
    565                  for (j=0; j &lt; group_arr.length; j++){
    566                     if (split_group_string[j]==group_arr[i]){
    567                        find=1;
    568                             }
    569                  }
    570                      if (find==0){
    571                      op = document.createElement('option');
    572                      op.innerHTML = group_arr[i];
    573                      op.setAttribute("value", group_arr[i]);
    574                      document.getElementById("groups").appendChild(op);
    575                          }
     564              find=0;
     565              for (j=0; j &lt; group_arr.length; j++){
     566                if (split_group_string[j]==group_arr[i]){
     567                  find=1;
     568                }
     569              }
     570              if (find==0){
     571                op = document.createElement('option');
     572                op.innerHTML = group_arr[i];
     573                op.setAttribute("value", group_arr[i]);
     574                document.getElementById("groups").appendChild(op);
     575              }
    576576                }
    577            
     577            
    578578          </xsl:text>       
    579579        </script>
     
    592592              var find=0;
    593593              for (i=0; i &lt; split_group_string.length; i++){
    594                   if (split_group_string[i]==group){
    595                       find=1;
    596                   }
     594                if (split_group_string[i]==group){
     595                  find=1;
     596                }
    597597              }
    598598              if (find==0){
    599                   op = document.createElement('option');
    600                   op.innerHTML = group;
    601                   op.setAttribute("value", group);
    602                   document.getElementById("collects").appendChild(op);
     599                op = document.createElement('option');
     600                op.innerHTML = group;
     601                op.setAttribute("value", group);
     602                document.getElementById("collects").appendChild(op);
    603603              }
    604604            </xsl:text>     
    605605          </script>
    606          </xsl:for-each>
     606        </xsl:for-each>
    607607          </select>
    608608        </td>
     
    612612          <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"/>
    613613
    614 </textarea></div></td></tr>
     614        </textarea></div></td></tr>
    615615      <tr>
    616616
    617 <td></td><td>
     617        <td></td><td>
    618618          <input type="submit" value="submit"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
    619            <xsl:if test="$pro_action!='AddUser'">
    620           <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
    621         </xsl:if>
     619          <xsl:if test="$pro_action!='AddUser'">
     620        <input type="submit" value="cancel"><xsl:attribute name="name">s1.cm</xsl:attribute></input>
     621          </xsl:if>
    622622        </td><td></td></tr>
    623623    </table>
     
    627627  </xsl:template>
    628628
    629 <!-- addGroup() javascript -->
     629  <!-- addGroup() javascript -->
    630630  <xsl:template name="addGroup">
    631631    <script type="text/javascript">
    632632      <xsl:text disable-output-escaping="yes">
    633633    function addGroup(g){
    634         var itemSelected;
    635         var splitGroup;
    636         var groupExit;
    637 
    638     if (document.getElementById("editForm")!=null){
     634      var itemSelected;
     635      var splitGroup;
     636      var groupExit;
     637
     638      if (document.getElementById("editForm")!=null){
    639639        //itemSelected=document.getElementById("editForm").groups.options.selectedIndex;
    640640        itemSelected=document.getElementById(g).options.selectedIndex;
    641641        if (document.getElementById(g).options[itemSelected].text!=""){
    642            if (document.getElementById("group").value==""){
    643                document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
    644            }else{
    645                splitGroup=document.getElementById("group").value.split(",");
    646                for (var i=0; i &lt; splitGroup.length; i++){
    647                   if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
    648                       alert(document.getElementById(g).options[itemSelected].text + " has been added.");
    649                       groupExit=1;
    650                       break;
    651                   }
    652                }
    653                if (groupExit!=1) {
    654                   document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
    655                }
    656            }
    657            document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
    658        }
    659     }
     642          if (document.getElementById("group").value==""){
     643            document.getElementById("group").value=document.getElementById("group").value+document.getElementById(g).options[itemSelected].text;
     644          }else{
     645            splitGroup=document.getElementById("group").value.split(",");
     646            for (var i=0; i &lt; splitGroup.length; i++){
     647              if (splitGroup[i]==document.getElementById(g).options[itemSelected].text){
     648                alert(document.getElementById(g).options[itemSelected].text + " has been added.");
     649                groupExit=1;
     650                break;
     651              }
     652            }
     653            if (groupExit!=1) {
     654              document.getElementById("group").value=document.getElementById("group").value+","+document.getElementById(g).options[itemSelected].text;
     655            }
     656          }
     657          document.getElementById(g).options[itemSelected]=new Option("",itemSelected);
     658        }
     659      }
    660660    }
    661661      </xsl:text>
  • greenstone3/trunk/web/interfaces/gs2/transform/classifier.xsl

    r17019 r18318  
    1616  <xsl:template match="page">
    1717    <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>
     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>
    2626      <body class="bgimage">
    2727    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2828    <div id="page">
    29        <xsl:apply-templates select="pageResponse"/>
    30        <xsl:call-template name="greenstoneFooter"/>                   
     29      <xsl:apply-templates select="pageResponse"/>
     30      <xsl:call-template name="greenstoneFooter"/>                     
    3131    </div>
    3232      </body>
     
    5353      </xsl:choose>
    5454    </xsl:variable>
    55       <xsl:call-template name="standardPageBanner">
    56     <xsl:with-param name="collName" select="$collName"/>
    57     <xsl:with-param name="pageType">browse</xsl:with-param>
    58     <xsl:with-param name="clTop" select="$clTop"/>
    59       </xsl:call-template>
    60       <xsl:call-template name="navigationBar">
    61     <xsl:with-param name="collName" select="$collName"/>
    62     <xsl:with-param name="clTop" select="$clTop"/>
    63       </xsl:call-template>     
    64       <div class="document">
     55    <xsl:call-template name="standardPageBanner">
     56      <xsl:with-param name="collName" select="$collName"/>
     57      <xsl:with-param name="pageType">browse</xsl:with-param>
     58      <xsl:with-param name="clTop" select="$clTop"/>
     59    </xsl:call-template>
     60    <xsl:call-template name="navigationBar">
     61      <xsl:with-param name="collName" select="$collName"/>
     62      <xsl:with-param name="clTop" select="$clTop"/>
     63    </xsl:call-template>     
     64    <div class="document">
    6565      <xsl:apply-templates select="classifier">
    6666    <xsl:with-param name="collName" select="$collName"/>
    6767    <xsl:with-param name="serviceName" select="$serviceName"/>
    6868      </xsl:apply-templates>
    69       </div>
     69    </div>
    7070  </xsl:template>
    7171 
  • greenstone3/trunk/web/interfaces/gs2/transform/document.xsl

    r18315 r18318  
    1313  <xsl:output method="html"/>
    1414 
    15  
    16 
    1715  <!-- the main page layout template is here -->
    1816  <!-- override the one in style so we can display the doc over the whole page and get rid of the green bar down the side -->
    1917  <xsl:template match="page" priority='2'>
    2018    <html>
    21     <head>
    22       <title>
    23     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    24     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    25       </title>
    26       <xsl:call-template name="globalStyle"/>
    27       <xsl:call-template name="pageStyle"/>
    28     </head>
     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>
    2927      <body>
    3028        <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    3129        <div id="page">
    32            <xsl:apply-templates select="pageResponse"/>
    33        <xsl:call-template name="greenstoneFooter"/>
     30      <xsl:apply-templates select="pageResponse"/>
     31      <xsl:call-template name="greenstoneFooter"/>
    3432    </div> 
    35        </body>
     33      </body>
    3634    </html>
    3735  </xsl:template>
     
    6462    </xsl:call-template>
    6563    <div class="document">     
    66     <!-- display the document -->
    67     <xsl:apply-templates select="document">
    68       <xsl:with-param name="collName" select="$collName"/>
    69     </xsl:apply-templates>
    70    </div>
    71   </xsl:template>
     64      <!-- display the document -->
     65      <xsl:apply-templates select="document">
     66    <xsl:with-param name="collName" select="$collName"/>
     67      </xsl:apply-templates>
     68    </div>
     69  </xsl:template>
     70 
     71  <xsl:template match="document">
     72    <xsl:param name="collName"/>
     73
     74    <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
     75    <xsl:choose><xsl:when test="$external != ''">
     76    <xsl:call-template name="externalPage">
     77      <xsl:with-param name="external" select="$external"/>
     78    </xsl:call-template>
     79      </xsl:when>
     80      <xsl:otherwise>
    7281   
    73   <xsl:template match="document">
    74     <xsl:param name="collName"/>
    75 
    76     <xsl:variable name="external"><xsl:value-of select="/page/pageResponse/document/@external"/></xsl:variable>
    77     <xsl:choose><xsl:when test="$external != ''">
    78         <xsl:call-template name="externalPage">
    79           <xsl:with-param name="external" select="$external"/>
    80         </xsl:call-template>
    81       </xsl:when>
    82       <xsl:otherwise>
    83        
    8482    <xsl:call-template name="documentHeading">
    85       <xsl:with-param name="collName" select="$collName"/>
    86     </xsl:call-template>
    87    
    88     <xsl:call-template name="documentArrows">
    89       <xsl:with-param name="collName" select="$collName"/>
    90     </xsl:call-template>         
    91     <xsl:call-template name="documentContent">
    92       <xsl:with-param name="collName" select="$collName"/>
    93     </xsl:call-template>
    94     <xsl:call-template name="documentArrows">
    95       <xsl:with-param name="collName" select="$collName"/>
    96     </xsl:call-template>
    97     <br/>
     83      <xsl:with-param name="collName" select="$collName"/>
     84    </xsl:call-template>
     85   
     86    <xsl:call-template name="documentArrows">
     87      <xsl:with-param name="collName" select="$collName"/>
     88    </xsl:call-template>         
     89    <xsl:call-template name="documentContent">
     90      <xsl:with-param name="collName" select="$collName"/>
     91    </xsl:call-template>
     92    <xsl:call-template name="documentArrows">
     93      <xsl:with-param name="collName" select="$collName"/>
     94    </xsl:call-template>
     95    <br/>
    9896      </xsl:otherwise></xsl:choose>
    9997  </xsl:template>
     
    107105   
    108106    <div class="documentarrows">
    109     <xsl:if test="not(string($ed)='1')">
    110        <xsl:call-template name="documentArrow">
    111         <xsl:with-param name="collName" select="$collName"/>
    112         <xsl:with-param name="direction" select="$firstDir"/>
    113         <xsl:with-param name="pageDir" select="$dir"/>
    114      </xsl:call-template>
    115     <xsl:call-template name="documentArrow">
    116       <xsl:with-param name="collName" select="$collName"/>
    117       <xsl:with-param name="direction" select="$secondDir"/>
    118       <xsl:with-param name="pageDir" select="$dir"/>
    119     </xsl:call-template>
    120     </xsl:if>
     107      <xsl:if test="not(string($ed)='1')">
     108    <xsl:call-template name="documentArrow">
     109      <xsl:with-param name="collName" select="$collName"/>
     110      <xsl:with-param name="direction" select="$firstDir"/>
     111      <xsl:with-param name="pageDir" select="$dir"/>
     112    </xsl:call-template>
     113    <xsl:call-template name="documentArrow">
     114      <xsl:with-param name="collName" select="$collName"/>
     115      <xsl:with-param name="direction" select="$secondDir"/>
     116      <xsl:with-param name="pageDir" select="$dir"/>
     117    </xsl:call-template>
     118      </xsl:if>
    121119    </div>   
    122120  </xsl:template>
     
    126124    <xsl:param name="direction"/>
    127125    <xsl:param name="pageDir"/>
    128        
     126   
    129127    <xsl:variable name="disp">
    130         <xsl:choose>
    131             <xsl:when test="$direction ='back' and nodeStructureInfo/info[@name='siblingPosition']/@value = -1">n</xsl:when>
    132             <xsl:when test="$direction ='forward' and nodeStructureInfo/info[@name='siblingPosition']/@value = nodeStructureInfo/info[@name='numSiblings']/@value">n</xsl:when>         
    133             <xsl:otherwise>y</xsl:otherwise>
    134         </xsl:choose>
     128      <xsl:choose>
     129    <xsl:when test="$direction ='back' and nodeStructureInfo/info[@name='siblingPosition']/@value = -1">n</xsl:when>
     130    <xsl:when test="$direction ='forward' and nodeStructureInfo/info[@name='siblingPosition']/@value = nodeStructureInfo/info[@name='numSiblings']/@value">n</xsl:when>         
     131    <xsl:otherwise>y</xsl:otherwise>
     132      </xsl:choose>
    135133    </xsl:variable>
    136134
    137135    <xsl:variable name="request-params" select="/page/pageRequest/paramList"/>
    138136    <xsl:if test='$request-params/param[@name="dt"]/@value != "simple" and $disp = "y"'> 
    139     <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose>
    140     <xsl:when test="$direction='back'"><img class="lessarrow{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
     137      <a><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;c=<xsl:value-of select="$collName"/>&amp;d=<xsl:value-of select="@selectedNode"/><xsl:choose><xsl:when test="$direction='back'">.pp</xsl:when><xsl:otherwise>.np</xsl:otherwise></xsl:choose>&amp;sib=1&amp;p.s=<xsl:value-of select='$request-params/param[@name="p.s"]/@value'/>&amp;p.sa=<xsl:value-of select='$request-params/param[@name="p.sa"]/@value'/>&amp;p.a=<xsl:value-of select='$request-params/param[@name="p.a"]/@value'/></xsl:attribute><xsl:choose>
     138      <xsl:when test="$direction='back'"><img class="lessarrow{$pageDir}" src="interfaces/default/images/less.gif" /></xsl:when><xsl:otherwise><img class="morearrow{$pageDir}" src="interfaces/default/images/more.gif"  /></xsl:otherwise></xsl:choose></a>
    141139    </xsl:if>
    142140  </xsl:template>
    143          
     141 
    144142
    145143  <xsl:template name="documentHeading">
     
    152150    <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>
    153151    <div id="documentheading">
    154       <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
    155       </xsl:call-template></a>
    156          <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>
    157   </div>
    158 
    159  <div id="docheadwrapper">
    160   <div id="documentinfo">
     152      <a href="{$library_name}?a={$p.a}&amp;sa={$p.sa}&amp;s={$p.s}&amp;c={$p.c}&amp;rt=rd"><xsl:call-template name="openbookimg"><xsl:with-param name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'close_book')"/></xsl:with-param>
     153    </xsl:call-template></a>
     154      <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>
     155    </div>
     156
     157    <div id="docheadwrapper">
     158      <div id="documentinfo">
    161159        <xsl:if test="string($doCoverImage) != 'false' and (@docType='paged' or @docType='hierarchy')">
    162160          <div id="headingimage">
    163              <xsl:call-template name="coverImage"/>
     161        <xsl:call-template name="coverImage"/>
    164162          </div>
    165163        </xsl:if>
    166      
     164   
    167165        <ul id="docbuttons" >
    168          <xsl:call-template name="documentButtons">
    169        <xsl:with-param name="collName" select="$collName"/>
    170          </xsl:call-template>
    171        </ul>
    172   </div>
    173    
     166      <xsl:call-template name="documentButtons">
     167        <xsl:with-param name="collName" select="$collName"/>
     168      </xsl:call-template>
     169    </ul>
     170      </div>
     171     
    174172      <!--<div><xsl:call-template name="enrichServices">
     173      <xsl:with-param name="collName" select="$collName"/>
     174    </xsl:call-template></div>-->
     175     
     176      <xsl:if test="string($doTOC) != 'false'">
     177    <div id="toc">
     178      <xsl:call-template name="TOC">
    175179        <xsl:with-param name="collName" select="$collName"/>
    176       </xsl:call-template></div>-->
    177  
    178     <xsl:if test="string($doTOC) != 'false'">
    179        <div id="toc">
    180      <xsl:call-template name="TOC">
    181        <xsl:with-param name="collName" select="$collName"/>
    182      </xsl:call-template>
    183       </div>
    184     </xsl:if>
     180      </xsl:call-template>
     181    </div>
     182      </xsl:if>
    185183    </div>
    186    </xsl:template>
     184  </xsl:template>
    187185
    188186  <xsl:template name="coverImage">
     
    202200    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    203201    <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>
    204      
    205       <!-- expand document -->
    206       <!-- this doesn't work with MG so comment it out for now -->     
    207       <!--<xsl:if test="@docType = 'hierarchy' or @docType = 'paged'">-->
    208       <!-- shouldn't appear for paged document -->
    209       <xsl:if test="@docType = 'hierarchy'">
     202   
     203    <!-- expand document -->
     204    <xsl:if test="@docType = 'hierarchy'">
    210205      <div class="button">
    211206        <span class="button">
    212207      <xsl:choose><xsl:when test="string($ed)='1'">
    213208          <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_tip')"/></xsl:attribute>
    214           <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
     209        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_doc_b')"/>
    215210          </a>
    216211        </xsl:when>
    217212        <xsl:otherwise>
    218             <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
    219        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
     213          <a href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ed=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_tip')"/></xsl:attribute>
     214        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc_b')"/>
    220215          </a>
    221216        </xsl:otherwise>
    222217      </xsl:choose>
    223          </span>
    224     </div>
    225       </xsl:if>
    226      
    227       <!-- expand contents -->
    228       <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
     218    </span>
     219      </div>
     220    </xsl:if>
     221   
     222    <!-- expand contents -->
     223    <xsl:if test="@docType = 'hierarchy' and string(/page/pageResponse/format/gsf:option[@name='documentTOC']/@value) != 'false'">
    229224      <div class="button">
    230225        <span class="button">
    231226      <xsl:choose><xsl:when test="string($ec)='1'">
    232227          <a  href="{$library_name}?a=d&amp;d={$docID}&amp;c={$collName}&amp;sib={$sib}&amp;ec=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_tip')"/></xsl:attribute>
    233          <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/>
     228        <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.contract_contents_b')"/>
    234229          </a>
    235230        </xsl:when>
     
    240235        </xsl:otherwise>
    241236      </xsl:choose>
    242      </span>
    243     </div>
    244       </xsl:if>
    245       <!-- detach page -->
    246       <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
    247       <div class="button">
    248         <span class="button">
    249       <a  target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;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>
    250         <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
    251       </a>
    252          </span>
     237    </span>
    253238      </div>
    254    </xsl:template>
     239    </xsl:if>
     240    <!-- detach page -->
     241    <xsl:variable name="paramList" select="/page/pageRequest/paramList"/>
     242    <div class="button">
     243      <span class="button">
     244    <a  target="_blank"><xsl:attribute name="href"><xsl:value-of select="$library_name"/>?a=d&amp;d=<xsl:value-of select="$docID"/>&amp;c=<xsl:value-of select="$collName"/>&amp;sib=<xsl:value-of select="$sib"/>&amp;dt=<xsl:value-of select="$paramList/param[@name='dt']/@value"/>&amp;ec=<xsl:value-of select="$paramList/param[@name='ec']/@value"/>&amp;et=<xsl:value-of select="$paramList/param[@name='et']/@value"/>&amp;p.a=<xsl:value-of select="$paramList/param[@name='p.a']/@value"/>&amp;p.s=<xsl:value-of select="$paramList/param[@name='p.s']/@value"/>&amp;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>
     245      <xsl:value-of disable-output-escaping='yes' select="util:getInterfaceText($interface_name, /page/@lang, 'doc.detach_page_b')"/>
     246    </a>
     247      </span>
     248    </div>
     249  </xsl:template>
    255250
    256251  <xsl:template name="TOC">
     
    269264    </xsl:choose>
    270265  </xsl:template>
    271    
     266 
    272267  <xsl:template name="hierarchicalContents">
    273268    <xsl:param name="collName"/>
     
    284279   
    285280    <xsl:if test="documentNode[@nodeID]">
    286     <ul id="tocnodes">
     281      <ul id="tocnodes">
    287282    <li>
    288         <xsl:choose><xsl:when test="string($oc)='0'">
    289         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;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>
    290           </xsl:when>
    291           <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;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>
     283      <xsl:choose><xsl:when test="string($oc)='0'">
     284          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=1&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;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>
     285        </xsl:when>
     286        <xsl:otherwise><a href="{$library_name}?a=d&amp;c={$collName}&amp;d={$d}&amp;sib={$sib}&amp;oc=0&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;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>
    292287      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.table_of_contents')"/>
    293     <xsl:if test="string($oc)!='0'">
    294       <ul class="tocnode">
    295         <xsl:for-each select="documentNode/documentNode[@nodeID]">
    296           <xsl:apply-templates select='.'>
     288      <xsl:if test="string($oc)!='0'">
     289        <ul class="tocnode">
     290          <xsl:for-each select="documentNode/documentNode[@nodeID]">
     291        <xsl:apply-templates select='.'>
    297292          <xsl:with-param name="collName" select="$collName"/><xsl:with-param name="ec" select="$ec"/>
    298293         
     
    304299         
    305300        </xsl:apply-templates>
    306         </xsl:for-each>
    307          </ul>
     301          </xsl:for-each>
     302        </ul>
    308303      </xsl:if>
    309  </li>
     304    </li>
    310305      </ul>
    311306    </xsl:if>
     
    323318    <xsl:param name="p.c"/>
    324319    <!-- Display the appropriate image, depending on the node type -->
    325        
    326      <li>
    327     <!--
    328     <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
    329     -->
     320   
     321    <li>
     322      <!--
     323      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if><xsl:if test="@nodeType='leaf'">&amp;sib=1</xsl:if><xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if></xsl:attribute>
     324      -->   
     325     
     326      <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
    330327   
    331     <a><xsl:attribute name="href"><xsl:value-of select='$library_name'/>?a=d&amp;c=<xsl:value-of select='$collName'/>&amp;d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&amp;sib=1<xsl:if test="string($ec) = '1'">&amp;ec=1</xsl:if>&amp;p.a=<xsl:value-of select="$p.a"/>&amp;p.sa=<xsl:value-of select="$p.sa"/>&amp;p.s=<xsl:value-of select="$p.s"/>&amp;p.c=<xsl:value-of select="$p.c"/></xsl:attribute>
    332    
    333       <xsl:apply-templates select="." mode="displayNodeIcon"/>
    334     </a>
     328    <xsl:apply-templates select="." mode="displayNodeIcon"/>
     329      </a>
    335330     
    336331      <!-- Display associated title, bolded if the node has content -->
    337     <xsl:choose>
    338       <xsl:when test="nodeContent">
    339          <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
    340       </xsl:when>
    341       <xsl:otherwise>
    342         <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
    343       </xsl:otherwise>
    344     </xsl:choose>
    345 
    346     <!-- Apply recursively to the children of this node -->
    347     <xsl:if test="documentNode[@nodeID]">
    348      
    349          <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
    350           <xsl:with-param name="collName" select="$collName"/>
    351           <xsl:with-param name="ec" select="$ec"/>
    352          
    353           <!-- added parameters -->
    354           <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"/>
    355           <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
    356         </xsl:apply-templates>
    357        </ul>
     332      <xsl:choose>
     333    <xsl:when test="nodeContent">
     334      <span class="bold"><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></span>
     335    </xsl:when>
     336    <xsl:otherwise>
     337      <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/>
     338    </xsl:otherwise>
     339      </xsl:choose>
     340
     341      <!-- Apply recursively to the children of this node -->
     342      <xsl:if test="documentNode[@nodeID]">
     343   
     344    <ul class="tocnode"> <xsl:apply-templates select="documentNode[@nodeID]">
     345        <xsl:with-param name="collName" select="$collName"/>
     346        <xsl:with-param name="ec" select="$ec"/>
     347       
     348        <!-- added parameters -->
     349        <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"/>
     350        <!--<xsl:with-param name="depth" select="$depth + 1"/>-->
     351      </xsl:apply-templates>
     352    </ul>
    358353      </xsl:if>
    359354    </li>
     
    380375      </xsl:if>
    381376      <xsl:apply-templates select="nodeContent"/>
    382       </xsl:if>
     377    </xsl:if>
    383378   
    384379  </xsl:template>
     
    422417    <xsl:variable name="serviceargs">
    423418      <xsl:for-each select="param">&amp;s1.<xsl:value-of select="@name"/>=<xsl:value-of select="@value"/></xsl:for-each>
    424   </xsl:variable>
     419    </xsl:variable>
    425420    <a href="{$library_name}?{$actionargs}&amp;c={$collName}{$serviceargs}"><xsl:value-of disable-output-escaping="yes" select="."/></a>
    426421  </xsl:template>
     
    439434    <!-- parameters for the bookicon to work properly -->
    440435    <xsl:variable name="p.s" select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>
    441     <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
    442     <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
    443     <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>
     436    <xsl:variable name="p.sa" select="/page/pageRequest/paramList/param[@name='p.sa']/@value"/>
     437    <xsl:variable name="p.a" select="/page/pageRequest/paramList/param[@name='p.a']/@value"/>
     438    <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>
    444439
    445440    <xsl:choose>
    446     <xsl:when test="$pos=-1"><!-- a doc -->
    447       <tr valign="top">
    448         <td align="left">
    449         </td>
    450         <td align="center"><center>
    451         <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
    452           </center></td>
    453         <td align="right">
    454           <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
    455         </td>
    456       </tr>
    457     </xsl:when>
    458    
    459     <xsl:otherwise> <!-- an internal node -->     
    460       <tr valign="top">
    461         <td align="left">
    462           <xsl:if test=" not ( $pos = 1 )">
    463         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
    464           </xsl:if>
    465         </td>
    466         <td align="center"><center>
    467         <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
    468           </center></td>
    469         <td align="right">
    470           <xsl:if test=" not($pos = $length)">
    471         <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
    472           </xsl:if>
    473         </td>
    474       </tr>
    475     </xsl:otherwise>
    476       </xsl:choose>
    477       <tr valign="middle">
    478     <td align='center' valign='top' colspan='3'>
    479       <form name="GotoForm" method="get" action="{$library_name}">
    480         <input type='hidden' name='a' value='d'/>
    481         <input type='hidden' name='c' value='{$collName}'/>
    482         <!--<input type='hidden' name='d' value='{@selectedNode}'/>-->
    483         <input type='hidden' name='d'>
    484             <xsl:attribute name='value'>
    485                 <xsl:if test="contains(@selectedNode, '.')"><xsl:value-of select="@selectedNode"/></xsl:if>
    486                 <xsl:if test="not(contains(@selectedNode, '.'))"><xsl:value-of select="@selectedNode"/>.0</xsl:if>
    487             </xsl:attribute>
    488         </input>               
    489        
    490         <input type='hidden' name='p.s' value='{$p.s}'/>
    491         <input type='hidden' name='p.sa' value='{$p.sa}'/>
    492         <input type='hidden' name='p.a' value='{$p.a}'/>
    493         <input type='hidden' name='p.c' value='{$p.c}'/>   
    494        
    495         <input type="text" name="gp" size="3" maxlength="4"/>
    496         <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
    497       </form>
    498     </td>
    499       </tr>
    500    </xsl:template>
     441      <xsl:when test="$pos=-1"><!-- a doc -->
     442    <tr valign="top">
     443      <td align="left">
     444      </td>
     445      <td align="center"><center>
     446          <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pages', $children)"/></b>
     447        </center></td>
     448      <td align="right">
     449        <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.fc&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
     450      </td>
     451    </tr>
     452      </xsl:when>
     453     
     454      <xsl:otherwise> <!-- an internal node -->   
     455    <tr valign="top">
     456      <td align="left">
     457        <xsl:if test=" not ( $pos = 1 )">
     458          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ps&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/less.gif" border="0" align="absbottom" /></a>
     459        </xsl:if>
     460      </td>
     461      <td align="center"><center>
     462          <b><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.pageof', concat($pos, ';', $length))"/></b>
     463        </center></td>
     464      <td align="right">
     465        <xsl:if test=" not($pos = $length)">
     466          <a href="{$library_name}?a=d&amp;c={$collName}&amp;d={@selectedNode}.ns&amp;p.s={$p.s}&amp;p.sa={$p.sa}&amp;p.a={$p.a}&amp;p.c={$p.c}"><img src="interfaces/default/images/more.gif" border="0" align="absbottom" /></a>
     467        </xsl:if>
     468      </td>
     469    </tr>
     470      </xsl:otherwise>
     471    </xsl:choose>
     472    <tr valign="middle">
     473      <td align='center' valign='top' colspan='3'>
     474    <form name="GotoForm" method="get" action="{$library_name}">
     475      <input type='hidden' name='a' value='d'/>
     476      <input type='hidden' name='c' value='{$collName}'/>
     477      <!--<input type='hidden' name='d' value='{@selectedNode}'/>-->
     478      <input type='hidden' name='d'>
     479        <xsl:attribute name='value'>
     480          <xsl:if test="contains(@selectedNode, '.')"><xsl:value-of select="@selectedNode"/></xsl:if>
     481          <xsl:if test="not(contains(@selectedNode, '.'))"><xsl:value-of select="@selectedNode"/>.0</xsl:if>
     482        </xsl:attribute>
     483      </input>             
     484     
     485      <input type='hidden' name='p.s' value='{$p.s}'/>
     486      <input type='hidden' name='p.sa' value='{$p.sa}'/>
     487      <input type='hidden' name='p.a' value='{$p.a}'/>
     488      <input type='hidden' name='p.c' value='{$p.c}'/>   
     489     
     490      <input type="text" name="gp" size="3" maxlength="4"/>
     491      <input type="submit"><xsl:attribute name='value'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.gotopage')"/></xsl:attribute></input>
     492    </form>
     493      </td>
     494    </tr>
     495  </xsl:template>
    501496 
    502497  <xsl:template name="enrichServices">
     
    535530
    536531  <xsl:template name="externalPage">
    537      <xsl:param name="external"/>
    538      <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>
     532    <xsl:param name="external"/>
     533    <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>
    539534    <h2><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'external.title')"/></h2>
    540535    <p><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'external.text', $go_forward_link)" disable-output-escaping="yes"/>
  • greenstone3/trunk/web/interfaces/gs2/transform/gli4gs3.xsl

    r17019 r18318  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    1616    <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>
     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>
    2525      <body class="bgimage">
    2626    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2727    <div id="page">
    28        <xsl:apply-templates select="pageResponse"/>
    29        <xsl:call-template name="greenstoneFooter"/>                   
     28      <xsl:apply-templates select="pageResponse"/>
     29      <xsl:call-template name="greenstoneFooter"/>                     
    3030    </div>
    3131      </body>
     
    4343    <xsl:variable name="collName"><xsl:value-of select="../pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    4444   
    45    <!-- <xsl:call-template name="navigationBar">
    46       <xsl:with-param name="collName" select="$collName"/>
    47     </xsl:call-template>-->     
     45    <!-- <xsl:call-template name="navigationBar">
     46    <xsl:with-param name="collName" select="$collName"/>
     47  </xsl:call-template>-->     
    4848    <div >
    4949      <xsl:copy-of select="Applet"/>
  • greenstone3/trunk/web/interfaces/gs2/transform/help-common.xsl

    r16877 r18318  
    1515    <xsl:variable name="numoptions" select="count(serviceList/service[@name='ClassifierBrowse']/classifierList[position() mod 2 = 1]/classifier)"/>
    1616    <div class="simplehelp">
    17     <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.simplehelpheading', $longCollName)"/></h3>
    18     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.numbrowseoptions', $numoptions+$has_search+$has_phrase)"/>
    19     <ul>
     17      <h3><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.simplehelpheading', $longCollName)"/></h3>
     18      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.numbrowseoptions', $numoptions+$has_search+$has_phrase)"/>
     19      <ul>
     20    <xsl:if test="$has_search =1">
     21      <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchshort')" disable-output-escaping='yes'/></li>
     22    </xsl:if>
     23    <xsl:for-each select="serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
     24      <xsl:variable name="title">help.<xsl:value-of select="@content"/>short</xsl:variable>
     25      <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/></li>
     26    </xsl:for-each>
     27    <xsl:if test="$has_phrase =1">
     28      <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraseshort')" disable-output-escaping='yes'/></li>
     29    </xsl:if>
     30      </ul>
    2031      <xsl:if test="$has_search =1">
    21     <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchshort')" disable-output-escaping='yes'/></li>
     32    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchlong')" disable-output-escaping='yes'/>
    2233      </xsl:if>
    2334      <xsl:for-each select="serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
    24     <xsl:variable name="title">help.<xsl:value-of select="@content"/>short</xsl:variable>
    25     <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/></li>
     35    <xsl:variable name="title">help.<xsl:value-of select="@content"/>long</xsl:variable>
     36    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/>
    2637      </xsl:for-each>
    2738      <xsl:if test="$has_phrase =1">
    28     <li><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraseshort')" disable-output-escaping='yes'/></li>
     39    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraselong')" disable-output-escaping='yes'/>
    2940      </xsl:if>
    30     </ul>
    31     <xsl:if test="$has_search =1">
    32       <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Searchlong')" disable-output-escaping='yes'/>
    33     </xsl:if>
    34     <xsl:for-each select="serviceList/service[@name='ClassifierBrowse']/classifierList/classifier">
    35       <xsl:variable name="title">help.<xsl:value-of select="@content"/>long</xsl:variable>
    36       <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, $title)" disable-output-escaping='yes'/>
    37     </xsl:for-each>
    38     <xsl:if test="$has_phrase =1">
    39       <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help.Phraselong')" disable-output-escaping='yes'/>
    40     </xsl:if>
    4141    </div>
    4242  </xsl:template>
    4343 
    44    
     44 
    4545</xsl:stylesheet>
  • greenstone3/trunk/web/interfaces/gs2/transform/help.xsl

    r17019 r18318  
    1414  <xsl:output method="html"/> 
    1515 
    16     <!-- the main page layout template is here -->
     16  <!-- the main page layout template is here -->
    1717  <xsl:template match="page">
    1818    <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>
     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>
    2727      <body class="bgimage">
    2828    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2929    <div id="page">
    30        <xsl:apply-templates select="pageResponse"/>
    31        <xsl:call-template name="greenstoneFooter"/>                   
     30      <xsl:apply-templates select="pageResponse"/>
     31      <xsl:call-template name="greenstoneFooter"/>                     
    3232    </div>
    3333      </body>
  • greenstone3/trunk/web/interfaces/gs2/transform/home.xsl

    r18314 r18318  
    1212  <xsl:output method="html"/> 
    1313 
    14     <!-- the main page layout template is here -->
     14  <!-- the main page layout template is here -->
    1515  <xsl:template match="page">
    1616    <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>
     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>
    2525      <body class="bgimage">
    2626    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2727    <div id="page">
    28        <xsl:apply-templates select="pageResponse"/>
    29        <xsl:call-template name="greenstoneFooter"/>                   
     28      <xsl:apply-templates select="pageResponse"/>
     29      <xsl:call-template name="greenstoneFooter"/>                     
    3030    </div>
    3131      </body>
     
    4747
    4848  <xsl:template name="pageBanner">
    49      <div id="banner">
    50         <div class="collectimage">
    51             <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
    52             </img>
    53       </div>
     49    <div id="banner">
     50      <div class="collectimage">
     51    <img src="interfaces/default/images/gsdlhead.gif"><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'gsdl')"/></xsl:attribute>
     52    </img>
    5453      </div>
    55       <div class="bannerextra"></div>
    56       <div id="content">
    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    </xsl:template>
     54    </div>
     55    <div class="bannerextra"></div>
     56    <div id="content">
     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  </xsl:template>
    6262
    6363  <xsl:template match="collectionList">
     
    6666
    6767      <p>
    68       <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
     68    <a href="{$library_name}?a=p&amp;sa=about&amp;c={@name}&amp;ct={$ct}">
    6969      <img width="150" border="1">
    7070        <xsl:attribute name="src">
     
    8686      <xsl:value-of select="util:getInterfaceText('gs2', /page/@lang, 'home.coll_warning')"/>
    8787    </div> 
    88    </xsl:template>
     88  </xsl:template>
    8989
    90 <xsl:template match="serviceList">
    91    <!--<xsl:call-template name="dividerBar"/>-->
     90  <xsl:template match="serviceList">
     91    <!--<xsl:call-template name="dividerBar"/>-->
    9292    <ul id="servicelist">
    9393      <!--uncomment to display an authentication link-->
     
    9595      <li><a href="{$library_name}?a=g&amp;rt=r&amp;sa=authen&amp;s={@name}&amp;s1.aup=Login&amp;s1.un=&amp;s1.asn="><xsl:value-of select="displayItem[@name='name']"/></a><xsl:value-of select="displayItem[@name='description']"/></li> <br/>     </xsl:for-each>-->
    9696      <!--uncomment to display a library interface link-->
    97      <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>-->
     97      <!--<li><a href="{$library_name}?a=p&amp;sa=gli4gs3"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home.librarian_interface')"/></a></li>-->
    9898    </ul>
    99     </xsl:template>
     99  </xsl:template>
    100100
    101101</xsl:stylesheet> 
  • greenstone3/trunk/web/interfaces/gs2/transform/nav.xsl

    r8661 r18318  
    77  exclude-result-prefixes="java util">
    88 
    9    <!-- style includes global params interface_name, library_name -->
     9  <!-- style includes global params interface_name, library_name -->
    1010  <xsl:include href="style.xsl"/>
    1111
     
    4040    <xsl:variable name="collName" select="/page/pageRequest/paramList/param[@name='c']/@value"/>
    4141    <div align="right">
    42     <xsl:call-template name="top-buttons">
    43       <xsl:with-param name="collName" select="$collName"/>
    44     </xsl:call-template>
    45       </div>
     42      <xsl:call-template name="top-buttons">
     43    <xsl:with-param name="collName" select="$collName"/>
     44      </xsl:call-template>
     45    </div>
    4646    <xsl:call-template name="navigationBar">
    4747      <xsl:with-param name="collName" select="$collName"/>
  • greenstone3/trunk/web/interfaces/gs2/transform/pref.xsl

    r18315 r18318  
    1111  <xsl:output method="html"/> 
    1212 
    13     <!-- the main page layout template is here -->
     13  <!-- the main page layout template is here -->
    1414  <xsl:template match="page">
    1515    <html>
    16     <head>
    17       <title>
    18     <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
    19     <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
    20       </title>
    21       <xsl:call-template name="globalStyle"/>
    22       <xsl:call-template name="pageStyle"/>
    23     </head>
     16      <head>
     17    <title>
     18      <!-- put a space in the title in case the actual value is missing - mozilla will not display a page with no title-->
     19      <xsl:call-template name="pageTitle"/><xsl:text> </xsl:text>
     20    </title>
     21    <xsl:call-template name="globalStyle"/>
     22    <xsl:call-template name="pageStyle"/>
     23      </head>
    2424      <body class="bgimage">
    2525    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2626    <div id="page">
    27        <xsl:apply-templates select="pageResponse"/>
    28        <xsl:call-template name="greenstoneFooter"/>                   
     27      <xsl:apply-templates select="pageResponse"/>
     28      <xsl:call-template name="greenstoneFooter"/>                     
    2929    </div>
    3030      </body>
     
    9595    <xsl:param name="formstatus"/>
    9696    <xsl:param name="advancedstatus"/>
    97        
     97   
    9898    <!-- search type : 0(default, simple); 1(form) -->
    9999    <xsl:variable name="qt"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='qt']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='qt']/@value"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:variable>   
     
    102102    <!-- search mode: text, form, advanced -->
    103103    <xsl:variable name="mode"><xsl:choose><xsl:when test="$qt=0">text</xsl:when><xsl:when test="$queryfmode=0">form</xsl:when><xsl:when test="$queryfmode=1">advanced</xsl:when><xsl:otherwise>text</xsl:otherwise></xsl:choose></xsl:variable>
    104            
     104   
    105105    <table>
    106106      <tr><td> </td><td> </td><td align='right'><input type='submit' name="submit"><xsl:attribute name="value"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.set_prefs')"/></xsl:attribute></input></td></tr>
     
    110110     
    111111      <tr><td valign='baseline' class='col1'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type')"/></td><td class='col2'><input type='radio' name='qfm' value='2' onclick="javascript:changePref(2)"><xsl:if test="$qt=0 or $queryfmode=2"><xsl:attribute name="checked"/></xsl:if></input></td><td class='col3'> <font><xsl:if test="$qt=0 or $queryfmode=2"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_text')"/></font>
    112      
    113       <xsl:if test="$formstatus='y'"><input name="qfm" onclick="javascript:changePref(0)" type="radio" value="0"><xsl:if test="$mode='form'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='form'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_simple_form')"/></font></xsl:if>
    114       
    115       <xsl:if test="$advancedstatus='y'"><input name="qfm" onclick="javascript:changePref(1)" type="radio" value="1" ><xsl:if test="$mode='advanced'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='advanced'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_advanced_form')"/></font></xsl:if>
    116       </td></tr>
     112     
     113      <xsl:if test="$formstatus='y'"><input name="qfm" onclick="javascript:changePref(0)" type="radio" value="0"><xsl:if test="$mode='form'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='form'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_simple_form')"/></font></xsl:if>
     114     
     115      <xsl:if test="$advancedstatus='y'"><input name="qfm" onclick="javascript:changePref(1)" type="radio" value="1" ><xsl:if test="$mode='advanced'"><xsl:attribute name="checked"/></xsl:if></input> <font><xsl:if test="$mode='advanced'"><xsl:attribute name="style">font-weight: bold;</xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.search_type_advanced_form')"/></font></xsl:if>
     116    </td></tr>
    117117     
    118118      <!-- search options -->
     
    135135    <!-- <xsl:if test="$mode='form'"><xsl:apply-templates select="/page/pageResponse//service[@name='FieldQuery']"/></xsl:if> -->   
    136136    <xsl:call-template name="advanced-search-prefs"><xsl:with-param name="display"><xsl:if test="$mode='advanced'">y</xsl:if><xsl:if test="$mode='text' or $mode='form'">n</xsl:if></xsl:with-param></xsl:call-template>
    137      
     137   
    138138    <!-- search type specific options -->
    139139    <xsl:apply-templates select="/page/pageResponse//service[@name='TextQuery']">
     
    157157     
    158158      <tr><td rowspan='2' valign='baseline'><xsl:value-of select="$sortparam/displayItem"/></td><td><input type='radio' name='{$sortvar}' value='{$optionVal}'><xsl:choose><xsl:when test="$cachedValue=$optionVal"><xsl:attribute name="checked"/></xsl:when><xsl:when test="normalize-space($cachedValue)='' and $optionVal=$defaultValue"><xsl:attribute name="checked"/></xsl:when></xsl:choose></input></td>
    159       <td><xsl:value-of select="$sortparam/option[1]/displayItem"/></td></tr>
     159    <td><xsl:value-of select="$sortparam/option[1]/displayItem"/></td></tr>
    160160     
    161161      <xsl:variable name="optionVal" select="$sortparam/option[2]/@name"/>
     
    170170      <xsl:variable name="maxdocs"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name=$maxvar]"><xsl:value-of select="/page/pageRequest/paramList/param[@name=$maxvar]/@value"/></xsl:when><xsl:otherwise>50</xsl:otherwise></xsl:choose></xsl:variable>
    171171      <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>
    172     <xsl:variable name="maxdocs_param"><select name="{$ns}maxDocs">
    173             <option value="50"><xsl:if test="$maxdocs=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
    174             <option value="100"><xsl:if test="$maxdocs=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
    175             <option value="200"><xsl:if test="$maxdocs=200"><xsl:attribute name="selected"></xsl:attribute></xsl:if>200</option>
    176             <option value="-1"><xsl:if test="$maxdocs=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
    177           </select></xsl:variable>
    178     <xsl:variable name="hits_param"><select name="hitsPerPage">
    179             <option value="10"><xsl:if test="$hits=10"><xsl:attribute name="selected"></xsl:attribute></xsl:if>10 </option>
    180             <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
    181             <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
    182             <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>
    183           </select></xsl:variable>
    184     <tr><td colspan='3'><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'pref.hits', $maxdocs_param, $hits_param)" disable-output-escaping="yes"/></td></tr>
     172      <xsl:variable name="maxdocs_param"><select name="{$ns}maxDocs">
     173      <option value="50"><xsl:if test="$maxdocs=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
     174      <option value="100"><xsl:if test="$maxdocs=100"><xsl:attribute name="selected"></xsl:attribute></xsl:if>100</option>
     175      <option value="200"><xsl:if test="$maxdocs=200"><xsl:attribute name="selected"></xsl:attribute></xsl:if>200</option>
     176      <option value="-1"><xsl:if test="$maxdocs=-1"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.all')"/></option>
     177    </select></xsl:variable>
     178      <xsl:variable name="hits_param"><select name="hitsPerPage">
     179      <option value="10"><xsl:if test="$hits=10"><xsl:attribute name="selected"></xsl:attribute></xsl:if>10 </option>
     180      <option value="20"><xsl:if test="$hits=20"><xsl:attribute name="selected"></xsl:attribute></xsl:if>20</option>
     181      <option value="50"><xsl:if test="$hits=50"><xsl:attribute name="selected"></xsl:attribute></xsl:if>50</option>
     182      <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>
     183    </select></xsl:variable>
     184      <tr><td colspan='3'><xsl:value-of select="util:getInterfaceTextWithDOM($interface_name, /page/@lang, 'pref.hits', $maxdocs_param, $hits_param)" disable-output-escaping="yes"/></td></tr>
    185185    </xsl:if>
    186186  </xsl:template>
    187    
     187 
    188188  <xsl:template name="advanced-search-prefs">
    189189    <xsl:param name="display">n</xsl:param>   
     
    191191    <tr id="adv-qnb"><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if>
    192192      <td colspan='2'><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.num_fields')"/></td><td><select name="qfn">
    193       <option value="2"><xsl:if test="$numbox=2"><xsl:attribute name="selected"></xsl:attribute></xsl:if>2</option>
    194       <option value="4"><xsl:if test="$numbox=4"><xsl:attribute name="selected"></xsl:attribute></xsl:if>4</option>
    195       <option value="6"><xsl:if test="$numbox=6"><xsl:attribute name="selected"></xsl:attribute></xsl:if>6</option>
    196       <option value="8"><xsl:if test="$numbox=8"><xsl:attribute name="selected"></xsl:attribute></xsl:if>8</option>
    197     </select></td><td/></tr>
     193      <option value="2"><xsl:if test="$numbox=2"><xsl:attribute name="selected"></xsl:attribute></xsl:if>2</option>
     194      <option value="4"><xsl:if test="$numbox=4"><xsl:attribute name="selected"></xsl:attribute></xsl:if>4</option>
     195      <option value="6"><xsl:if test="$numbox=6"><xsl:attribute name="selected"></xsl:attribute></xsl:if>6</option>
     196      <option value="8"><xsl:if test="$numbox=8"><xsl:attribute name="selected"></xsl:attribute></xsl:if>8</option>
     197    </select></td><td/></tr>
    198198  </xsl:template>
    199199
     
    242242      <xsl:variable name="value" select="@name"/>
    243243      <tr><xsl:attribute name="id"><xsl:value-of select="concat($prefix, '-', $paramIdx, '-', position())"/></xsl:attribute><xsl:if test="$display='n'"><xsl:attribute name="style">display:none</xsl:attribute></xsl:if>
    244       <xsl:if test="position()=1"><td rowspan='{$numOptions}' valign='baseline'><xsl:value-of select="../displayItem"/></td></xsl:if>
    245       <td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked">true</xsl:attribute></xsl:if></input></td>
    246       <td><xsl:value-of select="displayItem"/></td>
     244    <xsl:if test="position()=1"><td rowspan='{$numOptions}' valign='baseline'><xsl:value-of select="../displayItem"/></td></xsl:if>
     245    <td><input type='radio' name='{$cachedName}' value="{$value}"><xsl:if test="$cachedValue=$value"><xsl:attribute name="checked">true</xsl:attribute></xsl:if></input></td>
     246    <td><xsl:value-of select="displayItem"/></td>
    247247      </tr>
    248248    </xsl:for-each>
    249249  </xsl:template>
    250  
     250  
    251251</xsl:stylesheet>
  • greenstone3/trunk/web/interfaces/gs2/transform/query-common.xsl

    r14751 r18318  
    1212    <xsl:variable name="subaction" select="../pageRequest/@subaction"/>
    1313    <div class="queryform">
    14      <p>
    15       <form name="QueryForm" method="get" action="{$library_name}">
    16         <input type="hidden" name="a" value="q"/>
    17         <input type="hidden" name="sa" value="{$subaction}"/>
    18         <input type="hidden" name="rt" value="rd"/>
    19         <input type="hidden" name="s" value="{@name}"/>
    20         <input type="hidden" name="c" value="{$collName}"/>
    21         <input type="hidden" name="startPage" value="1"/>
    22       <xsl:apply-templates select="paramList"/>
    23       </form>
    24      </p>
     14      <p>
     15    <form name="QueryForm" method="get" action="{$library_name}">
     16      <input type="hidden" name="a" value="q"/>
     17      <input type="hidden" name="sa" value="{$subaction}"/>
     18      <input type="hidden" name="rt" value="rd"/>
     19      <input type="hidden" name="s" value="{@name}"/>
     20      <input type="hidden" name="c" value="{$collName}"/>
     21      <input type="hidden" name="startPage" value="1"/>
     22      <xsl:apply-templates select="paramList"/>
     23    </form>
     24      </p>
    2525    </div>
    2626  </xsl:template>
     
    2828  <!-- a special handling of the param list - we override the one in service-params -->
    2929  <xsl:template match="paramList" priority='2'>     
    30     <span class="textselect">
    31         Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='indexSubcollection']"> of <xsl:apply-templates select="param[@name='indexSubcollection']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexSubcollection']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='indexLanguage']"> in <xsl:apply-templates select="param[@name='indexLanguage']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexLanguage']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='level' and not(@type='invisible')]"> at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/>
     30    <span class="textselect">
     31      Search for <xsl:apply-templates select="param[@name='index']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='index']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates><xsl:if test="param[@name='indexSubcollection']"> of <xsl:apply-templates select="param[@name='indexSubcollection']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexSubcollection']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='indexLanguage']"> in <xsl:apply-templates select="param[@name='indexLanguage']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='indexLanguage']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates></xsl:if><xsl:if test="param[@name='level' and not(@type='invisible')]"> at <xsl:apply-templates select="param[@name='level']"><xsl:with-param name="default"><xsl:apply-templates select="param[@name='level']" mode="calculate-default"/></xsl:with-param></xsl:apply-templates> level</xsl:if><xsl:call-template name='query_mode'/>
    3232    </span>
    3333    <span class="querybox">
    34      <xsl:call-template name="query-and-submit"/>
     34      <xsl:call-template name="query-and-submit"/>
    3535    </span>
    3636  </xsl:template>
     
    6868    </xsl:choose>
    6969  </xsl:template>
    70    
     70 
    7171  <xsl:template match="param[@name='matchMode']" mode='query1'>
    72    <xsl:param name='default'/>
     72    <xsl:param name='default'/>
    7373    <xsl:variable name="qfm" select="/page/pageRequest/paramList/param[@name='qfm']/@value"/>
    7474    <xsl:choose>
     
    8989    <xsl:choose>
    9090      <xsl:when test="$qfm=1">
    91          <xsl:apply-templates select="param[@name='complexField']"/>
     91        <xsl:apply-templates select="param[@name='complexField']"/>
    9292      </xsl:when>
    9393      <xsl:otherwise>
    94          <xsl:apply-templates select="param[@name='simpleField']"/>
     94        <xsl:apply-templates select="param[@name='simpleField']"/>
    9595      </xsl:otherwise>
    9696    </xsl:choose>
    97         <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
    98      
     97    <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
     98   
    9999      </xsl:when>
    100100      <xsl:otherwise> <!-- doing text query -->
    101     <xsl:variable name="qb" select="/page/pageRequest/paramList/param[@name='qb']/@value"/>
     101    <xsl:variable name="qb" select="/page/pageRequest/paramList/param[@name='qb']/@value"/>
    102102    <xsl:choose>
    103103      <xsl:when test="$qb=1"><!-- large query box -->
    104            <textarea name="s1.query" cols='63' rows='10'>
    105           <xsl:apply-templates select="param[@name='query']" mode="calculate-default"/><xsl:text> </xsl:text><!-- put a space here just in case there is no value- mozilla craps out if have a <textarea /> element -->
    106         </textarea>
    107        <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
    108        </xsl:when>
     104        <textarea name="s1.query" cols='63' rows='10'>
     105          <xsl:apply-templates select="param[@name='query']" mode="calculate-default"/><xsl:text> </xsl:text><!-- put a space here just in case there is no value- mozilla craps out if have a <textarea /> element -->
     106        </textarea>
     107        <input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input>
     108      </xsl:when>
    109109      <xsl:otherwise>
    110         <xsl:variable name="qs"><xsl:apply-templates select="param[@name='query']" mode="calculate-default"/></xsl:variable>
    111         <nobr><xsl:apply-templates select="param[@name='query']"><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs)"/></xsl:apply-templates><input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input></nobr>
    112        </xsl:otherwise>
     110        <xsl:variable name="qs"><xsl:apply-templates select="param[@name='query']" mode="calculate-default"/></xsl:variable>
     111        <nobr><xsl:apply-templates select="param[@name='query']"><xsl:with-param name="default" select="java:org.greenstone.gsdl3.util.XSLTUtil.tidyWhitespace($qs)"/></xsl:apply-templates><input type="submit"><xsl:attribute name="value"><xsl:value-of select="../displayItem[@name='submit']"/></xsl:attribute></input></nobr>
     112      </xsl:otherwise>
    113113    </xsl:choose>
    114114      </xsl:otherwise>
     
    136136    <xsl:param name="ns">s1.</xsl:param>
    137137    <xsl:param name="pos"/>
    138  <!--   <xsl:variable name="pos" select="@occurs - $occurs"/>-->
     138    <!--   <xsl:variable name="pos" select="@occurs - $occurs"/>-->
    139139    <tr><xsl:for-each select="param">
    140140    <xsl:variable name="pname" select="@name"/>
  • greenstone3/trunk/web/interfaces/gs2/transform/query.xsl

    r17019 r18318  
    1414  <xsl:output method="html"/>
    1515 
    16     <!-- the main page layout template is here -->
     16  <!-- the main page layout template is here -->
    1717  <xsl:template match="page">
    1818    <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>
     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>
    2727      <body class="bgimage">
    2828    <xsl:attribute name="dir"><xsl:call-template name="direction"/></xsl:attribute>
    2929    <div id="page">
    30        <xsl:apply-templates select="pageResponse"/>
    31        <xsl:call-template name="greenstoneFooter"/>                   
     30      <xsl:apply-templates select="pageResponse"/>
     31      <xsl:call-template name="greenstoneFooter"/>                     
    3232    </div>
    3333      </body>
     
    4646    <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
    4747
    48       <xsl:call-template name="standardPageBanner">
    49     <xsl:with-param name="collName" select="$collName"/>
    50     <xsl:with-param name="pageType">search</xsl:with-param>
    51       </xsl:call-template>
    52       <xsl:call-template name="navigationBar">
    53     <xsl:with-param name="collName" select="$collName"/>
    54       </xsl:call-template>     
     48    <xsl:call-template name="standardPageBanner">
     49      <xsl:with-param name="collName" select="$collName"/>
     50      <xsl:with-param name="pageType">search</xsl:with-param>
     51    </xsl:call-template>
     52    <xsl:call-template name="navigationBar">
     53      <xsl:with-param name="collName" select="$collName"/>
     54    </xsl:call-template>     
    5555    <div class="document">
    56      <xsl:apply-templates select="service">
     56      <xsl:apply-templates select="service">
    5757    <xsl:with-param name="collName" select="$collName"/>
    5858      </xsl:apply-templates>
    59     <xsl:if test="documentNodeList">
    60       <xsl:call-template name="query-response">
    61     <xsl:with-param name="collName" select="$collName"/>
    62       </xsl:call-template>
    63     </xsl:if>
    64    </div>
     59      <xsl:if test="documentNodeList">
     60    <xsl:call-template name="query-response">
     61      <xsl:with-param name="collName" select="$collName"/>
     62    </xsl:call-template>
     63      </xsl:if>
     64    </div>
    6565  </xsl:template>
    6666 
     
    8181    <!-- next and prev links at bottom of page -->
    8282    <xsl:call-template name="resultNavigation">
    83         <xsl:with-param name="collName" select="$collName"/>
     83      <xsl:with-param name="collName" select="$collName"/>
    8484    </xsl:call-template>   
    8585  </xsl:template>
  • greenstone3/trunk/web/interfaces/gs2/transform/style.xsl

    r18314 r18318  
    1414  <xsl:template name="globalStyle">
    1515    <link rel="stylesheet" href="interfaces/gs2/style/classic.css" type="text/css"/>
    16      <link rel="stylesheet" href="interfaces/gs2/style/classic2.css" type="text/css"/>
     16    <link rel="stylesheet" href="interfaces/gs2/style/classic2.css" type="text/css"/>
    1717  </xsl:template>
    1818 
     
    4242    <xsl:param name="clTop"/>
    4343    <xsl:variable name="this-element" select="/page/pageResponse/collection"/>
    44      <div id="bannar">
     44    <div id="bannar">
    4545      <div class="pageinfo">
    46           <xsl:call-template name="top-buttons">
    47         <xsl:with-param name="collName" select="$collName"/>
    48         <xsl:with-param name="pageType" select="$pageType"/>
    49       </xsl:call-template>
    50           <xsl:if test="not(/page/pageRequest/@action='d')">
    51     <xsl:variable name="text">
     46    <xsl:call-template name="top-buttons">
     47      <xsl:with-param name="collName" select="$collName"/>
     48      <xsl:with-param name="pageType" select="$pageType"/>
     49    </xsl:call-template>
     50    <xsl:if test="not(/page/pageRequest/@action='d')">
     51      <xsl:variable name="text">
     52        <xsl:choose>
     53          <xsl:when test="$pageType='browse'">
     54        <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier[@name=$clTop]/displayItem[@name='name']"/>
     55          </xsl:when>
     56          <xsl:otherwise>
     57        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, concat($pageType, '_t'))"/>
     58          </xsl:otherwise>
     59        </xsl:choose>
     60      </xsl:variable>
     61      <xsl:if test="$text != '__t_'">
     62        <p class="bannertitle"><xsl:value-of select="$text"/></p>
     63      </xsl:if>
     64    </xsl:if>
     65      </div>
     66
     67      <div class="collectimage">
     68    <a href="{$library_name}?a=p&amp;sa=about&amp;c={$collName}">
    5269      <xsl:choose>
    53         <xsl:when test="$pageType='browse'">
    54           <xsl:value-of select="/page/pageResponse/collection/serviceList/service[@name='ClassifierBrowse']/classifierList/classifier[@name=$clTop]/displayItem[@name='name']"/>
     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>
    5582        </xsl:when>
    5683        <xsl:otherwise>
    57           <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, concat($pageType, '_t'))"/>
     84          <b><xsl:value-of select="$this-element/displayItem[@name='name']"/></b>
    5885        </xsl:otherwise>
    5986      </xsl:choose>
    60     </xsl:variable>
    61             <xsl:if test="$text != '__t_'">
    62         <p class="bannertitle"><xsl:value-of select="$text"/></p>
    63             </xsl:if>
    64       </xsl:if>
    65      </div>
    66 
    67      <div class="collectimage">
    68        <a href="{$library_name}?a=p&amp;sa=about&amp;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         <b><xsl:value-of select="$this-element/displayItem[@name='name']"/></b>
    85           </xsl:otherwise>
    86         </xsl:choose>
    87       </a>
    88        </div>
     87    </a>
    8988      </div>
     89    </div>
    9090    <div class="bannerextra"></div>
    9191  </xsl:template>
     
    9595    <xsl:param name="pageType"/>
    9696    <p class="bannerlinks">
    97           <a class="navlink" href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
    98         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
    99       </a>
    100     <!-- <xsl:choose>
    101     <xsl:when test="$pageType='help'">
    102              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    103         </xsl:when>
     97      <a class="navlink" href="{$library_name}?a=p&amp;sa=home"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_tip')"/></xsl:attribute>
     98    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'home_b')"/>
     99      </a>
     100      <!--<xsl:choose>
     101        <xsl:when test="$pageType='help'">
     102      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
     103    </xsl:when>
    104104    <xsl:otherwise>
    105105      <a class="navlink" href="{$library_name}?a=p&amp;sa=help&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_tip')"/></xsl:attribute>
    106     <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
    107           </a>
    108        </xsl:otherwise>
     106        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'help_b')"/>
     107      </a>
     108    </xsl:otherwise>
    109109      </xsl:choose> -->
    110        <xsl:choose>
    111       <xsl:when test="$pageType='pref'">
    112           <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    113        </xsl:when>
    114       <xsl:otherwise>
    115         <a class="navlink" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
    116         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
    117         </a>
    118        </xsl:otherwise>
    119     </xsl:choose>     
     110      <xsl:choose>
     111    <xsl:when test="$pageType='pref'">
     112      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     113    </xsl:when>
     114    <xsl:otherwise>
     115      <a class="navlink" href="{$library_name}?a=p&amp;sa=pref&amp;c={$collName}"><xsl:attribute name="title"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_tip')"/></xsl:attribute>
     116        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref_b')"/>
     117      </a>
     118    </xsl:otherwise>
     119      </xsl:choose>     
    120120    </p>
    121121  </xsl:template>
     
    133133
    134134    <div class="navbar">
    135        <p class="navbar">
    136      <xsl:choose>
    137      <xsl:when test="not($dir='rtl')">
    138      <xsl:if test="$this-element/serviceList/service[@type='query']">
    139        <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    140      </xsl:if>
    141      </xsl:when>
    142      <xsl:otherwise>
    143       <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
    144       <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    145       </xsl:if>
    146      </xsl:otherwise>
     135      <p class="navbar">
     136    <xsl:choose>
     137      <xsl:when test="not($dir='rtl')">
     138        <xsl:if test="$this-element/serviceList/service[@type='query']">
     139          <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     140        </xsl:if>
     141      </xsl:when>
     142      <xsl:otherwise>
     143        <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
     144          <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     145        </xsl:if>
     146      </xsl:otherwise>
    147147    </xsl:choose>
    148148
     
    154154      </xsl:apply-templates>
    155155    </xsl:for-each>
    156        
     156   
    157157    <xsl:choose>   
    158     <xsl:when test="$dir='rtl'">
    159     <xsl:if test="$this-element/serviceList/service[@type='query']">
    160        <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    161     </xsl:if>
    162     </xsl:when>
    163     <xsl:otherwise>
    164     <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
    165       <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
    166     </xsl:if>
    167     </xsl:otherwise>
     158      <xsl:when test="$dir='rtl'">
     159        <xsl:if test="$this-element/serviceList/service[@type='query']">
     160          <xsl:call-template name="navbar-search"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     161        </xsl:if>
     162      </xsl:when>
     163      <xsl:otherwise>
     164        <xsl:if test="$this-element/serviceList/service[@name='PhindApplet']">
     165          <xsl:call-template name="navbar-phind"><xsl:with-param name="collName" select="$collName"/></xsl:call-template>
     166        </xsl:if>
     167      </xsl:otherwise>
    168168    </xsl:choose>
    169        </p>
    170       </div>
     169      </p>
     170    </div>
    171171  </xsl:template>
    172172
     
    175175    <xsl:choose>
    176176      <xsl:when test="/page/pageRequest/@action='q'">     
    177        <span class="narspace">search</span>
     177    <span class="narspace">search</span>
    178178      </xsl:when>
    179179      <xsl:otherwise>
     
    195195    <xsl:choose>
    196196      <xsl:when test="/page/pageRequest/paramList/param[@name='s']/@value='PhindApplet'">
    197         <span class="narspace">phrases</span>
    198       </xsl:when>
    199       <xsl:otherwise>
    200      <a class="navlink" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if>phrases</a>
     197    <span class="narspace">phrases</span>
     198      </xsl:when>
     199      <xsl:otherwise>
     200    <a class="navlink" href="{$library_name}?a=a&amp;rt=d&amp;s=PhindApplet&amp;c={$collName}"><xsl:if test="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"><xsl:attribute name='title'><xsl:value-of select="/page/pageResponse/collection/service[@name='PhindApplet']/displayItem[@name='description']"/></xsl:attribute></xsl:if>phrases</a>
    201201      </xsl:otherwise>
    202202    </xsl:choose>
     
    208208    <xsl:choose>
    209209      <xsl:when test="/page/pageRequest/@action='b' and $clTop=@name">
    210      <span class="narspace"><xsl:value-of select="displayItem[@name='name']"/></span>
     210    <span class="narspace"><xsl:value-of select="displayItem[@name='name']"/></span>
    211211      </xsl:when>
    212212      <xsl:otherwise>
     
    218218  <xsl:template name="dividerBar">   
    219219    <xsl:param name='text'/>
    220       <xsl:choose>
     220    <xsl:choose>
    221221      <xsl:when test="$text">
    222      <div class="divbar"><p class="navbar"><xsl:value-of select="$text"/></p></div>
    223       </xsl:when>
    224       <xsl:otherwise>
    225      <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
     222    <div class="divbar"><p class="navbar"><xsl:value-of select="$text"/></p></div>
     223      </xsl:when>
     224      <xsl:otherwise>
     225    <div class="divbar"><xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text></div>
    226226      </xsl:otherwise>
    227227    </xsl:choose>
     
    229229 
    230230  <xsl:template name="nzdlPageBanner">
    231        <div><img src="interfaces/nzdl/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></xsl:attribute></img></div>
    232        <!-- end of page banner --> 
     231    <div><img src="interfaces/nzdl/images/nzdl2gr.gif" width="457" height="181" ><xsl:attribute name="alt"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'nzdl')"/></xsl:attribute></img></div>
     232    <!-- end of page banner --> 
    233233  </xsl:template>
    234234
     
    343343      alt='{$alt}' title='{$title}'/>
    344344  </xsl:template>
    345    
     345 
    346346  <xsl:template name="icondoc">
    347347    <xsl:param name="alt">Word</xsl:param>
Note: See TracChangeset for help on using the changeset viewer.