Changeset 31535
- Timestamp:
- 2017-03-23T12:20:18+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/web/interfaces/default/transform/layouts/toc.xsl
r31523 r31535 77 77 <div id="contentsArea"> 78 78 <!-- show the berry basket if it's turned on --> 79 <gslib:berryBasket/> 80 81 <!-- the contents (if enabled) --> 79 <xsl:call-template name="berryBasket"/> 80 <!-- add in expand and contract document links --> 81 <xsl:call-template name="expandContractDocumentLinks"/> 82 <!-- dynamically get the contents (if enabled) --> 82 83 <xsl:choose> 83 84 <xsl:when test="/page/pageResponse/document/@docType = 'paged' or /page/pageResponse/document/@docType = 'pagedhierarchy'"> … … 93 94 </xsl:text> 94 95 </script> 96 95 97 <div id="tableOfContents"><xsl:text> </xsl:text></div> 96 98 <div id="tocLoadingImage" style="text-align:center;"> … … 101 103 <a href="javascript:extractFilteredPagesToOwnDocument();"><button id="extractDocButton"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'de.extract_pages')"/></button></a> 102 104 </xsl:if> 103 104 <!-- <table style="width:100%;"><tbody><tr>105 <td><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.filter_pages')"/><xsl:text>: </xsl:text><input id="filterText" type="text"/></td>106 </tr>107 <xsl:if test="/page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true'">108 <tr><td><a href="javascript:extractFilteredPagesToOwnDocument();"><button id="extractDocButton">Extract these pages to document</button></a></td></tr>109 </xsl:if>110 </tbody></table>-->111 105 </xsl:when> 112 106 <xsl:when test="not(/page/pageRequest/paramList/param[@name = 'ed']/@value = '1' or /page/pageRequest/paramList/param[@name = 'ec']/@value = '1')"> … … 126 120 </xsl:when> 127 121 <xsl:otherwise> 128 <xsl:variable name="doc_url"><xsl:value-of select='$library_name'/>/collection/<xsl:value-of select='/page/pageResponse/collection/@name'/>/document/<xsl:value-of select='/page/pageResponse/document/documentNode/@nodeID'/>?<xsl:if test="/page/pageRequest/paramList/param[@name='p.s']">p.s=<xsl:value-of select="/page/pageRequest/paramList/param[@name='p.s']/@value"/>&</xsl:if></xsl:variable>122 129 123 <div id="tableOfContents"> 130 <xsl:attribute name="class"> 124 <!-- if ed=1 or ec=1 then we have the complete section hierarchy in the page xml source, so we don't need an ajax call to get the table of contents, we just generate it from the list of nodes --> 125 <xsl:attribute name="class"> <!-- do we ever need this ?? --> 131 126 <xsl:choose> 132 127 <xsl:when test="count(//documentNode) > 1">visible</xsl:when> … … 134 129 </xsl:choose> 135 130 </xsl:attribute> 136 <table style="width:100%; text-align:center;"><tr><td><a href="{$doc_url}ed=1"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.expand_doc')"/></a></td><td><a href="{$doc_url}ed=0"><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'doc.collapse_doc')"/></a></td></tr></table>137 131 <xsl:for-each select="documentNode"> 138 132 <xsl:call-template name="documentNodeTOC"/> … … 150 144 <!-- This template is used to display the table of contents --> 151 145 <xsl:template name="documentNodeTOC"> 152 153 <!-- check if this is the currently selected table of contents item -->154 <xsl:variable name="isCurrent" select="nodeContent"/>155 156 <!-- formulate the link -->157 <xsl:variable name="contentsLink">158 <xsl:value-of select='$library_name'/>?a=d&c=<gslib:collectionNameShort/>&d=<xsl:value-of select='@nodeID'/><xsl:if test="documentNode">.pr</xsl:if>&sib=1159 </xsl:variable>160 161 146 <ul> 162 147 <table><tr> … … 165 150 <td> 166 151 <xsl:choose> 167 <xsl:when test=" not(nodeContent and not(documentNode))">152 <xsl:when test="documentNode"> 168 153 <img id="ttoggle{@nodeID}" onclick="toggleSection('{@nodeID}');" class="icon"> 169 154 <xsl:attribute name="src"> … … 189 174 <td> 190 175 <img> 191 <xsl:if test="no deContent and not(documentNode)">176 <xsl:if test="not(documentNode)"> 192 177 <xsl:attribute name="class">leafNode</xsl:attribute> 193 178 </xsl:if> … … 195 180 <xsl:attribute name="src"> 196 181 <xsl:choose> 197 <xsl:when test="no deContent and not(documentNode)">182 <xsl:when test="not(documentNode)"> 198 183 <xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'page_image')"/> 199 184 </xsl:when>
Note:
See TracChangeset
for help on using the changeset viewer.