Skip to content

Commit

Permalink
add variant selection to list.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Jun 2, 2021
1 parent 8e15332 commit 9580868
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,22 @@
jcr:title="Layout"
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
<items jcr:primaryType="nt:unstructured">
<variant
jcr:primaryType="nt:unstructured"
sling:resourceType="aemdesign/components/coral/common/form/select"
emptyOption="{Boolean}true"
fieldLabel="Variant"
name="./variant"
granite:class="dialog-dropdown-showhide">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="aemdesign/components/coral/datasources/tags"
variant="valuelist"
path="/content/cq:tags/${(empty tenant.id and empty tenantId) ? 'aemdesign' : (empty tenant.id ? tenantId : tenant.id )}/component-dialog/components/lists/list/variant"/>
<granite:data
jcr:primaryType="nt:unstructured"
dialog-dropdown-showhide-target=".genericdetails-variant-showhide-target"/>
</variant>
<detailsBadge
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
Expand All @@ -526,6 +542,20 @@
path="/content/cq:tags/${(empty tenant.id and empty tenantId) ? 'aemdesign' : (empty tenant.id ? tenantId : tenant.id )}/component-dialog/components/lists/list/badge"
variant="valuelist"/>
</detailsBadge>
<topic
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
fieldDescription="Subscribers waiting for notification of the filter value is updated"
fieldLabel="Topic Queue"
name="./topicQueue"
emptyOption="{Boolean}true"
value="">
<datasource
jcr:primaryType="nt:unstructured"
sling:resourceType="aemdesign/components/coral/datasources/tags"
variant="valuelist"
path="/content/cq:tags/${(empty tenant.id and empty tenantId) ? 'aemdesign' : (empty tenant.id ? tenantId : tenant.id )}/component-topic/topic"/>
</topic>
</items>
</variant>
</items>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<template data-sly-template.variant="${@ componentProperties, component}">
<div style="${componentProperties.attr.data.style @ context = 'unsafe'}"
data-sly-attribute="${componentProperties.attr.data @ context = 'unsafe'}"
data-sly-unwrap="${!componentProperties.printStructure}">

<sly data-sly-use.feed="list.feedurl.html" data-sly-call="${feed.variant @ componentProperties=componentProperties}"></sly>

<sly data-sly-test="${componentProperties.resultInfo.result.nextPage.start}"
data-sly-set.pageEnd="${componentProperties.resultInfo.result.nextPage.start}"></sly>

<sly data-sly-test="${!componentProperties.resultInfo.result.nextPage.start}"
data-sly-set.pageEnd="${componentProperties.resultInfo.result.totalMatches}"></sly>

<div class="header" data-sly-set.listItems="${component.ListItems}">
<div>Showing ${componentProperties.resultInfo.result.startIndex}-${pageEnd} of ${componentProperties.resultInfo.result.totalMatches} results</div>
</div>

<div class="content" data-sly-unwrap="${!componentProperties.printStructure}">
<sly data-sly-use.body="list.body.html"
data-sly-call="${body.variant @ componentProperties=componentProperties, component=component}"></sly>
</div>

<sly data-sly-use.pagination="${componentProperties.paginationTemplate}" data-sly-call="${pagination.variant @ componentProperties=componentProperties, component=component}"></sly>

</div>
</template>

0 comments on commit 9580868

Please sign in to comment.