Skip to content

Commit

Permalink
Query/chart blocks also get progress bar <div>s
Browse files Browse the repository at this point in the history
  • Loading branch information
namedgraph committed Jan 3, 2025
1 parent 0d1a9b3 commit a9eae1c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,18 @@ exclude-result-prefixes="#all"

<!-- render block -->

<!-- match resources that are not LDH system resources -->
<xsl:template match="*[@typeof[not(. = ('&ldh;Object', '&ldh;View', '&ldh;GraphChart', '&ldh;ResultSetChart'))]]" mode="ldh:RenderRow" priority="1">
<xsl:apply-templates mode="#current"/>

<!-- hide the progress bar -->
<xsl:for-each select="ancestor::div[contains-token(@class, 'span12')][contains-token(@class, 'progress')][contains-token(@class, 'active')]">
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress-striped', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'active', false() ])[current-date() lt xs:date('2000-01-01')]"/>
</xsl:for-each>
</xsl:template>

<xsl:template match="*" mode="ldh:RenderRow">
<xsl:apply-templates mode="#current"/>
</xsl:template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,5 @@ exclude-result-prefixes="#all"
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="*[@typeof[not(. = ('&ldh;Object', '&ldh;View', '&ldh;GraphChart', '&ldh;ResultSetChart'))]]" mode="ldh:RenderRow" priority="1">
<xsl:apply-templates mode="#current"/>

<!-- hide the progress bar -->
<xsl:for-each select="ancestor::div[contains-token(@class, 'span12')][contains-token(@class, 'progress')][contains-token(@class, 'active')]">
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'progress-striped', false() ])[current-date() lt xs:date('2000-01-01')]"/>
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'active', false() ])[current-date() lt xs:date('2000-01-01')]"/>
</xsl:for-each>
</xsl:template>

</xsl:stylesheet>
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<!ENTITY http "http://www.w3.org/2011/http#">
<!ENTITY sc "http://www.w3.org/2011/http-statusCodes#">
<!ENTITY acl "http://www.w3.org/ns/auth/acl#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
<!ENTITY sh "http://www.w3.org/ns/shacl#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
<!ENTITY ldt "https://www.w3.org/ns/ldt#">
<!ENTITY dh "https://www.w3.org/ns/ldt/document-hierarchy#">
<!ENTITY dct "http://purl.org/dc/terms/">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
<!ENTITY sc "http://www.w3.org/2011/http-statusCodes#">
<!ENTITY acl "http://www.w3.org/ns/auth/acl#">
<!ENTITY cert "http://www.w3.org/ns/auth/cert#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
<!ENTITY sh "http://www.w3.org/ns/shacl#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
<!ENTITY ldt "https://www.w3.org/ns/ldt#">
<!ENTITY c "https://www.w3.org/ns/ldt/core/domain#">
<!ENTITY ct "https://www.w3.org/ns/ldt/core/templates#">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<!ENTITY acl "http://www.w3.org/ns/auth/acl#">
<!ENTITY ldt "https://www.w3.org/ns/ldt#">
<!ENTITY dh "https://www.w3.org/ns/ldt/document-hierarchy#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
<!ENTITY sh "http://www.w3.org/ns/shacl#">
<!ENTITY sd "http://www.w3.org/ns/sparql-service-description#">
<!ENTITY dct "http://purl.org/dc/terms/">
<!ENTITY foaf "http://xmlns.com/foaf/0.1/">
<!ENTITY sioc "http://rdfs.org/sioc/ns#">
Expand Down Expand Up @@ -461,14 +461,14 @@ extension-element-prefixes="ixsl"

<!-- BLOCK -->

<xsl:template match="*[@rdf:about][rdf:type/@rdf:resource = ('&sp;Describe', '&sp;Construct', '&sp;Ask', '&sp;Select')]" mode="bs2:Row" priority="1">
<!-- <xsl:template match="*[@rdf:about][rdf:type/@rdf:resource = ('&sp;Describe', '&sp;Construct', '&sp;Ask', '&sp;Select')]" mode="bs2:Row" priority="1">
<xsl:next-match>
<xsl:with-param name="class" select="'row-fluid block'"/>
</xsl:next-match>
</xsl:template>
</xsl:template>-->

<!-- resource block overrides -->
<xsl:template match="*[@rdf:about][rdf:type/@rdf:resource = '&ldh;Object']" mode="bs2:Row" priority="1">
<xsl:template match="*[@rdf:about][rdf:type/@rdf:resource = ('&ldh;Object', '&sp;Describe', '&sp;Construct', '&sp;Ask', '&sp;Select')]" mode="bs2:Row" priority="1">
<!-- TO-DO: use $ldh:requestUri to resolve URIs server-side -->
<xsl:param name="id" select="if (contains(@rdf:about, ac:absolute-path(ldh:base-uri(.)) || '#')) then substring-after(@rdf:about, ac:absolute-path(ldh:base-uri(.)) || '#') else generate-id()" as="xs:string?"/>
<xsl:param name="class" select="'row-fluid block'" as="xs:string?"/>
Expand Down

0 comments on commit a9eae1c

Please sign in to comment.