Changeset 32058 for main

Show
Ignore:
Timestamp:
30.10.2017 20:01:10 (23 months ago)
Author:
ak19
Message:

Kathy fixed it so that when editing a document with GS3's online doc editor, the format statements that may modify the display of the document text in regular view, aren't used when displaying the text in doc editing view.

Files:
1 modified

Legend:

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

    r31938 r32058  
    8989        <xsl:call-template name="wrappedSectionText"/> 
    9090    </xsl:template> 
    91      
    92     <xsl:template name="wrappedSectionText"> 
     91    <xsl:template name="sectionContentForEditing"> 
     92        <xsl:call-template name="wrappedSectionImage"/> 
     93        <xsl:call-template name="wrappedSectionTextForEditing"/> 
     94    </xsl:template> 
     95 
     96    <xsl:template name="wrappedSectionTextForEditing"> 
    9397        <br /><br /> 
    9498        <div id="text{@nodeID}" class="sectionText"><!-- *** --> 
    95           <xsl:choose> 
    96             <xsl:when test="/page/pageRequest/paramList/param[(@name='docEdit') and (@value='on' or @value='true' or @value='1')]"> 
    9799                        <xsl:attribute name="contenteditable"> 
    98100                    <xsl:text>true</xsl:text> 
    99101                </xsl:attribute> 
    100102            <xsl:call-template name="documentNodeTextForEditing"/> 
    101                 </xsl:when> 
    102             <xsl:otherwise> 
     103        </div> 
     104    </xsl:template> 
     105 
     106    <xsl:template name="wrappedSectionText"> 
     107        <br /><br /> 
     108        <div id="text{@nodeID}" class="sectionText"><!-- *** --> 
    103109            <xsl:attribute name="style"> 
    104110                <xsl:choose> 
     
    112118            </xsl:attribute> 
    113119            <xsl:call-template name="documentNodeText"/> 
    114  
    115             </xsl:otherwise> 
    116           </xsl:choose> 
    117120        </div> 
    118121    </xsl:template> 
     
    203206            </xsl:choose> 
    204207         
    205             <xsl:if test="/page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true' and /page/pageRequest/paramList/param[@name='docEdit']/@value = '1'  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))"> 
     208            <xsl:choose> 
     209              <xsl:when test="/page/pageRequest/userInformation and /page/pageRequest/userInformation/@editEnabled = 'true' and /page/pageRequest/paramList/param[@name='docEdit']/@value = '1'  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))"> 
    206210                <table id="meta{@nodeID}"> 
    207211                    <xsl:attribute name="style"> 
     
    224228                    </xsl:for-each> 
    225229                </table> 
    226             </xsl:if> 
     230                <xsl:call-template name="sectionContentForEditing"/> 
     231            </xsl:when> 
     232            <xsl:otherwise> 
    227233            <xsl:choose> 
    228234                <xsl:when test="../../document"> 
     
    232238                    <xsl:call-template name="sectionContent"/> 
    233239                </xsl:otherwise> 
     240            </xsl:choose> 
     241            </xsl:otherwise> 
    234242            </xsl:choose> 
    235243            <xsl:if test="documentNode"> 
     
    649657      </xsl:for-each> 
    650658    </xsl:template> 
     659     
    651660    <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin --> 
    652661    <xsl:template name="documentNodeFlashXML">