Ignore:
Timestamp:
2011-05-10T14:33:12+12:00 (13 years ago)
Author:
sjm84
Message:

Another round of improvements to the oran skin including a tree view of the classifiers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/oran/transform/pages/document.xsl

    r23989 r24009  
    3939                <gslib:documentTitle/>
    4040            </xsl:variable>
    41             Document
     41            <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.document')"/>
    4242        </a>
    4343    </xsl:template>
     
    6363    <xsl:template match="/page/pageResponse/document">
    6464        <xsl:if test="$bookswitch = 'off'">
     65            <div id="bookdiv" style="visibility:hidden; height:0px;"><xsl:text> </xsl:text></div>
    6566            <!-- Add the Javascript that adds and removes highlighting ( *** in document-scripts.xsl *** ) -->
    6667            <xsl:call-template name="highlightingScript"/>
     
    111112                <div id="gs-document-text" class="documenttext">
    112113                    <xsl:apply-templates select="documentNode" mode="document"/>
    113                 </div>
     114                </div> 
    114115            </xsl:otherwise>
    115116        </xsl:choose>
     
    137138            <!-- Expand/collapse button -->
    138139            <td class="headerTD">
    139                 <div id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');">           
    140                     <xsl:attribute name="class">
    141                     <xsl:choose>
    142                         <xsl:when test="nodeContent and not(documentNode)">icon leafNode toggleImageCollapse</xsl:when>
    143                         <xsl:otherwise>icon toggleImageCollapse</xsl:otherwise>
    144                     </xsl:choose>
     140                <img id="dtoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">         
     141                    <xsl:attribute name="src">
     142                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'collapse_image')"/>
    145143                    </xsl:attribute>
    146                 </div>
     144                </img>
    147145            </td>
    148146           
     
    166164                <td class="backToTop headerTD">
    167165                    <a href="#top">
    168                         <xsl:text disable-output-escaping="yes">&#9650;back to top</xsl:text>
     166                        <xsl:text disable-output-escaping="yes">&#9650;</xsl:text><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.back_to_top')"/>
    169167                    </a>
    170168                </td>
     
    211209                        <xsl:choose>
    212210                            <xsl:when test="not(nodeContent and not(documentNode))">
    213                                 <div id="ttoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon toggleImageCollapse"/>
     211                                <img id="ttoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon">
     212                                    <xsl:attribute name="src">
     213                                        <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'collapse_image')"/>
     214                                    </xsl:attribute>
     215                                </img>
    214216                            </xsl:when>
    215217                            <xsl:otherwise>
    216                                 <div class="icon"/>
     218                                <xsl:attribute name="class">emptyIcon</xsl:attribute>
    217219                            </xsl:otherwise>
    218220                        </xsl:choose>
     
    222224                <!-- The chapter/page icon -->
    223225                <td>
    224                     <div>
    225                         <xsl:attribute name="class">
     226                    <img>
     227                        <xsl:if test="nodeContent and not(documentNode)">
     228                            <xsl:attribute name="class">leafNode</xsl:attribute>
     229                        </xsl:if>
     230                       
     231                        <xsl:attribute name="src">
    226232                            <xsl:choose>
    227233                                <xsl:when test="nodeContent and not(documentNode)">
    228                                     icon leafNode toggleImagePage
     234                                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_image')"/>
    229235                                </xsl:when>
    230236                                <xsl:otherwise>
    231                                     icon toggleImageChapter
     237                                    <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'chapter_image')"/>
    232238                                </xsl:otherwise>
    233239                            </xsl:choose>
    234240                        </xsl:attribute>
    235                     </div>
     241                    </img>
    236242                </td>
    237243               
    238244                <!-- The section name, links to the section in the document -->
    239245                <td>               
    240                     <!-- display this item from the table of contents -->
    241                     <xsl:if test="$isCurrent"><xsl:attribute name="class">current</xsl:attribute></xsl:if>
    242246                    <a>
    243247                        <xsl:attribute name="href">#<xsl:value-of select="@nodeID"/></xsl:attribute>
     
    302306   
    303307    <xsl:template name="viewOptions">
     308        <xsl:call-template name="realisticBooksScript"/>
    304309        <table class="viewOptions"><tr>
     310            <!-- Realistic books link -->
     311            <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
     312                <td>
     313                    <!-- old url = {$library_name}?a=d&amp;c={$collName}&amp;d={/page/pageResponse/document/documentNode[1]/@nodeID}&amp;dt={/page/pageResponse/document/documentNode/@docType}&amp;p.a=b&amp;p.s={/page/pageResponse/service/@name}&amp;book=on&amp;ed=1 -->
     314                    <div title="Realistic book view" id="rbOptionDiv"><input id="rbOption" type="checkbox" onclick="bookInit();" class="optionCheckBox"/></div>
     315                </td>
     316            </xsl:if>
     317           
    305318            <!-- Highlight on/off button -->
    306319            <xsl:if test="/page/pageRequest/paramList/param[@name = 'p.a']/@value = 'q'">
    307320                <td>
    308                     <a id="highlightOption">
    309                         <xsl:choose>
    310                             <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
    311                                 <xsl:attribute name="href">
    312                                     <xsl:text>javascript:removeHighlight();</xsl:text>
    313                                 </xsl:attribute>
    314                                 <xsl:text>No Highlighting</xsl:text>
    315                             </xsl:when>
    316                             <xsl:otherwise>
    317                                 <xsl:attribute name="href">
    318                                     <xsl:text>javascript:addHighlight();</xsl:text>
    319                                 </xsl:attribute>
    320                                 <xsl:text>Highlighting</xsl:text>
    321                             </xsl:otherwise>
    322                         </xsl:choose>
    323                     </a>
    324                 </td>
    325             </xsl:if>
    326            
    327             <!-- Realistic books link -->
    328             <xsl:if test="/page/pageResponse/collection[@name = $collName]/metadataList/metadata[@name = 'tidyoption'] = 'tidy'">
    329                 <td>
    330                     <a title="Realistic book view" href="{$library_name}?a=d&amp;c={$collName}&amp;d={/page/pageResponse/document/documentNode[1]/@nodeID}&amp;dt={/page/pageResponse/document/documentNode/@docType}&amp;p.a=b&amp;p.s={/page/pageResponse/service/@name}&amp;book=on&amp;ed=1">
    331                         <img src="interfaces/oran/images/rbook.png"/>
    332                     </a>
     321                    <div id="highlightOptionDiv" title="Search term highlighting">
     322                        <input id="highlightOption" type="checkbox" class="optionCheckBox">
     323                            <xsl:choose>
     324                                <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
     325                                    <xsl:attribute name="onclick">
     326                                        <xsl:text>removeHighlight();</xsl:text>
     327                                    </xsl:attribute>
     328                                    <xsl:attribute name="checked">true</xsl:attribute>
     329                                </xsl:when>
     330                                <xsl:otherwise>
     331                                    <xsl:attribute name="onclick">
     332                                        <xsl:text>addHighlight();</xsl:text>
     333                                    </xsl:attribute>
     334                                </xsl:otherwise>
     335                            </xsl:choose>
     336                        </input>
     337                    </div>
    333338                </td>
    334339            </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.