Skip to content

Commit cf08c27

Browse files
namedgraphclaude
andcommitted
Fix disabled edit button triggering modal and move action buttons inside auth guard
- Prevent click handler from firing on disabled edit button by adding [not(contains-token(@Class, 'disabled'))] predicate - Move ACL and Edit buttons inside the xsl:if auth guard so they are not rendered for unauthorized users - Wrap edit button in pull-right div and add ldh:logo icon to match ACL button structure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 15e8379 commit cf08c27

File tree

1 file changed

+18
-14
lines changed
  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2

1 file changed

+18
-14
lines changed

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

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -304,22 +304,26 @@ extension-element-prefixes="ixsl"
304304
</xsl:value-of>
305305
</button>
306306
</div>
307-
</xsl:if>
308307

309-
<div class="pull-right">
310-
<button type="button" title="{ac:label(key('resources', 'acl-list-title', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri))))}">
311-
<xsl:apply-templates select="key('resources', '&acl;Access', document(ac:document-uri('&acl;')))" mode="ldh:logo">
312-
<xsl:with-param name="class" select="'btn'"/>
313-
</xsl:apply-templates>
314-
<xsl:apply-templates select="key('resources', '&acl;Access', document(ac:document-uri('&acl;')))" mode="ac:label"/>
315-
</button>
316-
</div>
308+
<div class="pull-right">
309+
<button type="button" title="{ac:label(key('resources', 'acl-list-title', document(resolve-uri('static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/translations.rdf', $ac:contextUri))))}">
310+
<xsl:apply-templates select="key('resources', '&acl;Access', document(ac:document-uri('&acl;')))" mode="ldh:logo">
311+
<xsl:with-param name="class" select="'btn'"/>
312+
</xsl:apply-templates>
313+
<xsl:apply-templates select="key('resources', '&acl;Access', document(ac:document-uri('&acl;')))" mode="ac:label"/>
314+
</button>
315+
</div>
317316

318-
<button type="button" class="btn btn-edit pull-right">
319-
<xsl:apply-templates select="key('resources', '&ac;EditMode', document(ac:document-uri('&ac;')))" mode="ac:label">
320-
<xsl:with-param name="class" select="'btn' || (if ($edit-disabled) then ' disabled' else ())"/>
321-
</xsl:apply-templates>
322-
</button>
317+
<div class="pull-right">
318+
<button type="button" class="btn btn-edit pull-right" title="{ac:label(key('resources', '&ac;EditMode', document(ac:document-uri('&ac;'))))}">
319+
<xsl:apply-templates select="key('resources', '&ac;EditMode', document(ac:document-uri('&ac;')))" mode="ldh:logo">
320+
<xsl:with-param name="class" select="'btn' || (if ($edit-disabled) then ' disabled' else ())"/>
321+
</xsl:apply-templates>
322+
323+
<xsl:apply-templates select="key('resources', '&ac;EditMode', document(ac:document-uri('&ac;')))" mode="ac:label"/>
324+
</button>
325+
</div>
326+
</xsl:if>
323327
</xsl:if>
324328
</xsl:template>
325329

0 commit comments

Comments
 (0)