Changeset 26140


Ignore:
Timestamp:
2012-08-30T16:06:00+12:00 (12 years ago)
Author:
sjm84
Message:

Some more fixes to help the editor work with simple documents

Location:
main/trunk/greenstone3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r26044 r26140  
    597597                dummy_node.appendChild(this.doc.importNode(dc_response_doc_content, true));
    598598                // hack for simple type
    599                 if (document_type.equals("simple"))
     599                if (document_type.equals(GSXML.DOC_TYPE_SIMPLE))
    600600                {
    601601                    // we dont want the internal docNode, just want the content and metadata in the document
     
    618618                    }
    619619                }
     620               
     621                the_document.setAttribute(GSXML.NODE_ID_ATT, modified_doc_id);
    620622            }
    621623            else
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r26139 r26140  
    390390                                <xsl:value-of select="$collName"/>
    391391                                <xsl:text>/document/</xsl:text>
    392                                 <xsl:value-of select="/page/pageResponse/document/documentNode/@nodeID"/>
     392                                <xsl:choose>
     393                                    <xsl:when test="count(//documentNode) > 0">
     394                                        <xsl:value-of select="/page/pageResponse/document/documentNode/@nodeID"/>
     395                                    </xsl:when>
     396                                    <xsl:otherwise>
     397                                        <xsl:value-of select="/page/pageResponse/document/@nodeID"/>
     398                                    </xsl:otherwise>
     399                                </xsl:choose>
    393400                                <xsl:if test="not(/page/pageRequest/paramList/param[@name = 'docEdit']/@value = '1')">
    394                                     <xsl:text>?ed=1&amp;docEdit=1</xsl:text>
     401                                    <xsl:text>?ed=1&amp;docEdit=1&amp;dt=hierarchy</xsl:text>
    395402                                </xsl:if>
    396403                            </xsl:attribute>
Note: See TracChangeset for help on using the changeset viewer.