Changeset 32548

Show
Ignore:
Timestamp:
30.10.2018 10:27:35 (3 weeks ago)
Author:
kjdon
Message:

added a test in lang-param template so that if the languageList is not there for some reason it doesn't make the rest of the page crap out

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/pref.xsl

    r30809 r32548  
    106106 
    107107 
    108                 <xsl:template name="lang-param"> 
    109                     <div class="paramLabel"> 
    110                         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> 
    111                     </div> 
    112                     <div class="paramValue"> 
    113                         <select name="l"> 
    114                             <xsl:for-each select="/page/pageResponse/languageList/language"> 
    115                                 <option value="{@name}"><xsl:if test="@name=/page/@lang"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option> 
    116                             </xsl:for-each> 
    117                         </select> 
    118  
    119                     </div> 
    120       <br class="clear"/> 
    121  
    122 </xsl:template> 
     108    <xsl:template name="lang-param"> 
     109      <xsl:if test="/page/pageResponse/languageList/language"> 
     110    <div class="paramLabel"> 
     111      <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.interfacelang')"/> 
     112    </div> 
     113    <div class="paramValue"> 
     114      <select name="l"> 
     115        <xsl:for-each select="/page/pageResponse/languageList/language"> 
     116          <option value="{@name}"><xsl:if test="@name=/page/@lang"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if><xsl:value-of select="displayItem[@name='name']"/></option> 
     117        </xsl:for-each> 
     118      </select> 
     119       
     120    </div> 
     121    <br class="clear"/> 
     122      </xsl:if> 
     123    </xsl:template> 
    123124                     
    124125