Changeset 37005


Ignore:
Timestamp:
2022-12-09T22:47:23+13:00 (18 months ago)
Author:
davidb
Message:

Introduction of documentPost to balance out documentPre; change to use Image rather than Source/SourceFile in places where images are to be displayed in the browser (Source might be a format such as TIFF that a browser cannot display, however Image can be controlled by the collectinConfig.xml file to be web friendly

File:
1 edited

Legend:

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

    r36979 r37005  
    1818    <!-- We technically need this include. However, it is imported with toc.xsl -->
    1919    <!-- <xsl:include href="document-shared.xsl" /> -->
    20    
     20
     21    <xsl:variable name="docID" select="/page/pageRequest/paramList/param[@name='d']/@value"/>
     22
    2123    <xsl:variable name="bookswitch">
    2224        <xsl:choose>
     
    8789                <xsl:call-template name="documentNodeText"/>
    8890            </div>
     91            <xsl:call-template name="documentPost"/>
    8992        </div>
    9093    </xsl:template>
     
    478481                    </xsl:choose>
    479482                  </div>
     483                  <xsl:call-template name="documentPost"/>               
    480484                </div>
    481485            </xsl:when>
     
    508512                        </xsl:for-each>
    509513                    </div>
     514                    <xsl:call-template name="documentPost"/>                   
    510515                </div>
    511516            </xsl:when>
     
    634639
    635640        <xsl:choose>
    636           <xsl:when test="metadataList/metadata[@name = 'Screen'] and metadataList/metadata[@name = 'SourceFile'] and ($imageWidth div $screenImageWidth > 1.2) and (not(/page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']) or /page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']/@value='false')">
     641          <!-- **** Should the test of 'Source' perhaps be changed to 'Image' to be more consistent with usage else where for showing an web friendy Image-->
     642          <xsl:when test="metadataList/metadata[@name = 'Screen'] and metadataList/metadata[@name = 'Source'] and ($imageWidth div $screenImageWidth > 1.2) and (not(/page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']) or /page/pageResponse/format[@type='display']/gsf:option[@name='disableZoom']/@value='false')">
    637643            <gsf:div id="tidyDiv" />
    638644            <!-- adding a div with clear:both when the image doesn't nicely fit in beside the side bar. Otherwise, the divs stays up, but the image moves down and everything looks and acts weird. -->
     
    660666                            </div>
    661667                            <div id="large{util:replace(@nodeID, '.', '_')}" style="position: relative; width: {$imageWidth}px; height: {$imageHeight}px;">
    662                                 <gsf:link type="source"><gsf:image type="source"/></gsf:link>
     668                                <gsf:link type="source"><gsf:image type="image"/></gsf:link>
    663669                            </div>
    664670                        </div>
     
    797803        </xsl:if>
    798804    </xsl:template>
    799    
     805
     806    <xsl:template name="documentPost">
     807      <!-- empty by default, to be overridden as needed -->
     808    </xsl:template>
     809
     810
    800811    <xsl:template name="mapFeatures">
    801812        <div id="map_canvas" class="map_canvas_full"><xsl:text> </xsl:text></div>
Note: See TracChangeset for help on using the changeset viewer.