Skip to content

Commit f895381

Browse files
committed
Child documents can be created only if the current document is the Root or a container
1 parent 0c2d06e commit f895381

5 files changed

Lines changed: 2 additions & 9 deletions

File tree

File renamed without changes.

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/constructor.xsl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,9 +386,6 @@ exclude-result-prefixes="#all"
386386
</xsl:call-template>
387387
</xsl:otherwise>
388388
</xsl:choose>
389-
390-
<!-- used by typeahead to set $Type -->
391-
<!-- <input type="hidden" class="forClass" value="&rdfs;Class" autocomplete="off"/> -->
392389
</xsl:template>
393390

394391
<!-- EVENT HANDLERS -->

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/layout.xsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,8 +593,8 @@ LIMIT 100
593593
</xsl:if>
594594

595595
<xsl:if test="$acl:mode = '&acl;Write' and not(key('resources-by-type', '&http;Response')) and doc-available(ac:absolute-path($ldh:requestUri))">
596-
<!-- if the current resource is an Item, hide the "Create" dropdown as items cannot have child documents -->
597-
<xsl:if test="not(key('resources', ac:absolute-path($ldh:requestUri), document(ac:absolute-path($ldh:requestUri)))/rdf:type/@rdf:resource = '&dh;Item')">
596+
<!-- child documents can be created only if the current document is the Root or a container -->
597+
<xsl:if test="key('resources', ac:absolute-path($ldh:requestUri), document(ac:absolute-path($ldh:requestUri)))/rdf:type/@rdf:resource = ('&def;Root', '&dh;Container')">
598598
<xsl:variable name="document-classes" select="key('resources', ('&dh;Container', '&dh;Item'), document(ac:document-uri('&def;')))" as="element()*"/>
599599
<xsl:apply-templates select="." mode="bs2:Create">
600600
<xsl:with-param name="class" select="'btn-group pull-left'"/>

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/resource.xsl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,10 +1290,6 @@ extension-element-prefixes="ixsl"
12901290
<ul class="dropdown-menu">
12911291
<xsl:for-each select="$constructor-classes">
12921292
<li>
1293-
<xsl:message>
1294-
key('resources', '<xsl:value-of select="."/>', $type-metadata): <xsl:value-of select="serialize(key('resources', ., $type-metadata))"/>
1295-
</xsl:message>
1296-
12971293
<button type="button" class="btn btn-edit-constructors" data-resource-type="{.}">
12981294
<xsl:value-of>
12991295
<xsl:apply-templates select="key('resources', 'edit', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri)))" mode="ac:label"/>

0 commit comments

Comments
 (0)