Ignore:
Timestamp:
2017-03-24T21:37:12+13:00 (7 years ago)
Author:
ak19
Message:

First commit for getting user comments working for GS3. It all works, but there's debugging statements still and haven't cleaned up commented out code. After that, would like to make POST rather than GET AJAX calls, so more refactoring required. 1. config_format.xsl is just minor spelling corrections. 2. header.xsl has a new function generateLogoutURL. 3. document.xsl imports and calls new usercomments.xsl to set up the user comments area. 4. New usercomments.js is imported by new usercomments.xsl, and sets up the interaction of the usercomments area. 5. javascript-global-functions.js now contains setMetadataArray and getMetadataArray functions to parallel what GS2 used in gsajaxapi.js, but for GS3 need to go through GS2Construct.processModifyMetadata() service in java code. 5. GS2Construct.java does different checking for users adding user comments versus users doing document editing. For the latter, the user needs to have editing permissions for the document. But any user is allowed to add comments on any accessible document. But ModifyMetadata should not allow any other metadata to be modified other than meta fields. 6. New language strings for usercomment area and GS2Construct errors in the 2 changed properties files.

File:
1 edited

Legend:

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

    r31534 r31537  
    1212    <xsl:import href="layouts/main.xsl"/>
    1313    <xsl:import href="layouts/toc.xsl"/>
     14
     15    <!-- templates for adding user comments -->
     16    <xsl:import href="layouts/usercomments.xsl"/>
    1417   
    1518    <xsl:variable name="bookswitch">
     
    367370                <xsl:call-template name="documentHeading"/><br/>
    368371                <xsl:call-template name="documentContent"/>
     372                <br /><xsl:call-template name="userCommentsSection"/>
    369373            </xsl:when>
    370374            <xsl:otherwise> <!-- display the standard greenstone document -->
Note: See TracChangeset for help on using the changeset viewer.