Changeset 33285 for main

Show
Ignore:
Timestamp:
02.07.2019 14:43:46 (7 weeks ago)
Author:
kjdon
Message:

standardising the basket names. berryBasket, favouriteBasket, documentBasket. variables etc will all follow this pattern. cgi params berrybasket, favouritebasket. etc

Location:
main/trunk/greenstone3/web/interfaces/default/transform
Files:
7 modified

Legend:

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

    r33261 r33285  
    5757    <xsl:value-of select="/page/pageRequest/paramList/param[@name='berrybasket']/@value"/> 
    5858  </xsl:variable> 
    59   <xsl:variable name="favouritesbasketswitch"> 
    60     <xsl:value-of select="/page/pageRequest/paramList/param[@name='favouritesbasket']/@value"/> 
     59  <xsl:variable name="favouritebasketswitch"> 
     60    <xsl:value-of select="/page/pageRequest/paramList/param[@name='favouritebasket']/@value"/> 
    6161  </xsl:variable> 
    6262   
    6363  <xsl:variable name="berryBasketOn" select="/page/pageRequest/paramList/param[@name='berrybasket' and @value='on']"/> 
    64   <xsl:variable name="favouritesBasketOn" select="/page/pageRequest/paramList/param[@name='favouritesbasket' and @value='on']"/> 
     64  <xsl:variable name="favouriteBasketOn" select="/page/pageRequest/paramList/param[@name='favouritebasket' and @value='on']"/> 
    6565  <xsl:variable name="documentBasketOn" select="/page/pageRequest/paramList/param[@name='documentbasket' and @value='on']"/> 
    6666   
     
    763763  --> 
    764764  <xsl:template name="gotoFavourites"> 
    765     <xsl:if test="$favouritesBasketOn"> 
     765    <xsl:if test="$favouriteBasketOn"> 
    766766      <div id="berrybasket" class="hide"> 
    767767      <img src="interfaces/{$interface_name}/images/{$selected_favourite_icon}" title="click to add to favourites" width="16" height="16" border="0" /> 
     
    873873    <gsf:variable name="unselected_favourite_icon_url">interfaces/<xsl:value-of select="$interface_name"/>/images/<xsl:value-of select="$unselected_favourite_icon"/></gsf:variable> 
    874874 
    875     <xsl:if test="$favouritesBasketOn"> 
     875    <xsl:if test="$favouriteBasketOn"> 
    876876      <img src="interfaces/{$interface_name}/images/{$unselected_favourite_icon}" title="click to add to favourites" width="20" height="20" border="0" onclick="toggleFavourite(this)" data-is-favourite="false"> 
    877877        <xsl:attribute name="id"><xsl:value-of select="/page/pageResponse/collection/@name"/>:<xsl:value-of select="@nodeID"/></xsl:attribute> 
     
    910910      <xsl:value-of select="/page/pageResponse/document/documentNode[@nodeType='root']/@nodeID"/> 
    911911    </xsl:variable> 
    912     <xsl:if test="$favouritesBasketOn"> 
     912    <xsl:if test="$favouriteBasketOn"> 
    913913      <div id="documentberries"> 
    914914        <img id="{/page/pageResponse/collection/@name}:{$rootNode}" src="interfaces/{$interface_name}/images/{$unselected_favourite_icon}" alt="in basket" width="15" height="15" border="0"/> 
  • main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl

    r33261 r33285  
    7878                            <!-- showing gotoFavourites display-area takes priority over berryBaskets --> 
    7979                            <xsl:choose> 
    80                           <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'favouritesBaskets']/@value = 'true'"> 
     80                          <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'favouriteBasket']/@value = 'true'"> 
    8181                            <!-- show the goto favourites if it's turned on --> 
    8282                            <xsl:call-template name="gotoFavourites"/> 
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/berry.xsl

    r33261 r33285  
    6363          <!-- showing favourites help text takes priority over berryBasket help text --> 
    6464          <xsl:choose> 
    65             <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'favouritesBaskets']/@value = 'true'"> 
     65            <xsl:when test="/page/pageResponse/interfaceOptions/option[@name = 'favouriteBasket']/@value = 'true'"> 
    6666              <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.delete_help')"/> <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'favourites.delete_else')"/><xsl:text>  </xsl:text> 
    6767            </xsl:when> 
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/classifier.xsl

    r33261 r33285  
    3030    <script type="text/javascript">$(window).load(openStoredClassifiers);</script> 
    3131    <!-- this right sidebar --> 
    32     <xsl:if test="$berryBasketOn or $favouritesBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))"> 
     32    <xsl:if test="$berryBasketOn or $favouriteBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))"> 
    3333      <div id="rightSidebar"> 
    3434    <xsl:if test="$berryBasketOn"> 
     
    3838    </xsl:if> 
    3939 
    40     <xsl:if test="$favouritesBasketOn"> 
     40    <xsl:if test="$favouriteBasketOn"> 
    4141      <!-- show the favourites 'basket' if it's turned on --> 
    4242      <gslib:gotoFavourites/> 
     
    268268    <!-- The berry/favourite (optional) --> 
    269269    <td valign="top"> 
    270       <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'berryBaskets']/@value = 'true'"> 
     270      <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'berryBasket']/@value = 'true'"> 
    271271    <xsl:call-template name="documentBerryForClassifierOrSearchPage"/> 
    272272      </xsl:if> 
    273       <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'favouritesBaskets']/@value = 'true'"> 
     273      <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'favouriteBasket']/@value = 'true'"> 
    274274    <xsl:call-template name="documentFavouriteForClassifierOrSearchPage"/> 
    275275      </xsl:if> 
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/help.xsl

    r33280 r33285  
    5757    </xsl:if> 
    5858    <xsl:call-template name="documentHelp"/> 
    59     <xsl:if test="/page/pageResponse/interfaceOptions/option[@name='favouritesBaskets']/@value='true'"> 
    60       <xsl:call-template name="favouritesHelp"/> 
     59    <xsl:if test="/page/pageResponse/interfaceOptions/option[@name='favouriteBasket']/@value='true'"> 
     60      <xsl:call-template name="favouriteBasketHelp"/> 
    6161    </xsl:if> 
    62     <xsl:if test="/page/pageResponse/interfaceOptions/option[@name='berryBaskets']/@value='true'"> 
    63       <xsl:call-template name="berrybasketsHelp"/> 
     62    <xsl:if test="/page/pageResponse/interfaceOptions/option[@name='berryBasket']/@value='true'"> 
     63      <xsl:call-template name="berryBasketHelp"/> 
    6464    </xsl:if> 
    6565    <xsl:if test="//format/gsf:option[@name='RSS']/@value= 'true'"> 
     
    138138    TODO: put some stuff here about icons found on doc pages. toc/paged docs. highlighter, image zoomer,  
    139139  </xsl:template> 
    140   <xsl:template name="favouritesHelp"> 
     140  <xsl:template name="favouriteBasketHelp"> 
    141141    <xsl:variable name="fav_icon"><img src="interfaces/{$interface_name}/images/favourite-star-transparent-unselected32.png" width="16" height="16" alt="favourites unselected"/></xsl:variable> 
    142142    <xsl:variable name="fav_icon_selected"><img src="interfaces/{$interface_name}/images/favourite-star-transparent-selected32.png" width="16" height="16" alt="favourites selected"/></xsl:variable> 
     
    145145  </xsl:template> 
    146146 
    147   <xsl:template name="berrybasketsHelp"> 
     147  <xsl:template name="berryBasketHelp"> 
    148148    <xsl:variable name="berry_icon"><img src="interfaces/{$interface_name}/images/berry.png" alt="berry icon" width="16" height="16"/></xsl:variable> 
    149149    <h3><xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($help_interface_name, /page/@lang, 'help.berrybasket_title')"/></h3><br/> 
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/pref.xsl

    r33261 r33285  
    5050     <!-- <xsl:call-template name="encoding-param"/>--> 
    5151      <xsl:call-template name="format-edit-param"/> 
    52       <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'berryBaskets']/@value = 'true'"> 
     52      <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'berryBasket']/@value = 'true'"> 
    5353    <xsl:call-template name="berry-basket-param"/> 
    5454      </xsl:if> 
    55       <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'favouritesBaskets']/@value = 'true'"> 
    56     <xsl:call-template name="favourites-basket-param"/> 
     55      <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'favouriteBasket']/@value = 'true'"> 
     56    <xsl:call-template name="favourite-basket-param"/> 
    5757      </xsl:if> 
    5858    <!--<xsl:call-template name="document-maker-param"/> not working at moment--> 
     
    173173 
    174174 
    175 <xsl:template name="favourites-basket-param"> 
    176                 <div id="favouritesbasketprefs"> 
    177                     <xsl:variable name="favouritesbasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='favouritesbasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='favouritesbasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable> 
     175<xsl:template name="favourite-basket-param"> 
     176                <div id="favouritebasketprefs"> 
     177                    <xsl:variable name="favouritebasket"><xsl:choose><xsl:when test="/page/pageRequest/paramList/param[@name='favouritebasket']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='favouritebasket']/@value"/></xsl:when><xsl:otherwise>off</xsl:otherwise></xsl:choose></xsl:variable> 
    178178                    <div class="paramLabel"> 
    179                         <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.favouritesbasket')"/> 
    180                     </div> 
    181                     <div class="paramValue"> 
    182                         <select name="favouritesbasket"> 
    183                             <option value="on"><xsl:if test="$favouritesbasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.on')"/></option>  
    184                             <option value="off"><xsl:if test="$favouritesbasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.off')"/></option> 
     179                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.favouritebasket')"/> 
     180                    </div> 
     181                    <div class="paramValue"> 
     182                        <select name="favouritebasket"> 
     183                            <option value="on"><xsl:if test="$favouritebasket='on'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.on')"/></option>  
     184                            <option value="off"><xsl:if test="$favouritebasket='off'"><xsl:attribute name="selected"></xsl:attribute></xsl:if><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'pref.off')"/></option> 
    185185                        </select> 
    186186                    </div> 
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/query.xsl

    r33261 r33285  
    5959 
    6060    <xsl:template name="displayBaskets"> 
    61       <xsl:if test="$berryBasketOn or $favouritesBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))"> 
     61      <xsl:if test="$berryBasketOn or $favouriteBasketOn or ($documentBasketOn and (util:contains(/page/pageRequest/userInformation/@groups, 'administrator') or util:contains(/page/pageRequest/userInformation/@groups, 'all-collections-editor') or util:contains(/page/pageRequest/userInformation/@groups, $thisCollectionEditor)))"> 
    6262        <div id="rightSidebar"> 
    6363          <xsl:if test="$berryBasketOn"> 
     
    6767          </xsl:if> 
    6868 
    69           <xsl:if test="$favouritesBasketOn"> 
     69          <xsl:if test="$favouriteBasketOn"> 
    7070        <!-- show the favourites 'basket' if it's turned on --> 
    7171        <gslib:gotoFavourites/> 
     
    9595                        <!-- The berry/favourite (optional) --> 
    9696                        <td valign="top"> 
    97                           <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'berryBaskets']/@value = 'true'"> 
     97                          <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'berryBasket']/@value = 'true'"> 
    9898                            <xsl:call-template name="documentBerryForClassifierOrSearchPage"/> 
    9999                          </xsl:if> 
    100                           <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'favouritesBaskets']/@value = 'true'"> 
     100                          <xsl:if test="/page/pageResponse/interfaceOptions/option[@name = 'favouriteBasket']/@value = 'true'"> 
    101101                            <xsl:call-template name="documentFavouriteForClassifierOrSearchPage"/> 
    102102                          </xsl:if>