Skip to content

Commit 9580868

Browse files
committed
add variant selection to list.
1 parent 8e15332 commit 9580868

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

aemdesign-aem-common/src/main/content/jcr_root/apps/aemdesign/components/lists/list/v2/list/_cq_dialog/.content.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,22 @@
512512
jcr:title="Layout"
513513
sling:resourceType="granite/ui/components/coral/foundation/form/fieldset">
514514
<items jcr:primaryType="nt:unstructured">
515+
<variant
516+
jcr:primaryType="nt:unstructured"
517+
sling:resourceType="aemdesign/components/coral/common/form/select"
518+
emptyOption="{Boolean}true"
519+
fieldLabel="Variant"
520+
name="./variant"
521+
granite:class="dialog-dropdown-showhide">
522+
<datasource
523+
jcr:primaryType="nt:unstructured"
524+
sling:resourceType="aemdesign/components/coral/datasources/tags"
525+
variant="valuelist"
526+
path="/content/cq:tags/${(empty tenant.id and empty tenantId) ? 'aemdesign' : (empty tenant.id ? tenantId : tenant.id )}/component-dialog/components/lists/list/variant"/>
527+
<granite:data
528+
jcr:primaryType="nt:unstructured"
529+
dialog-dropdown-showhide-target=".genericdetails-variant-showhide-target"/>
530+
</variant>
515531
<detailsBadge
516532
jcr:primaryType="nt:unstructured"
517533
sling:resourceType="granite/ui/components/foundation/form/select"
@@ -526,6 +542,20 @@
526542
path="/content/cq:tags/${(empty tenant.id and empty tenantId) ? 'aemdesign' : (empty tenant.id ? tenantId : tenant.id )}/component-dialog/components/lists/list/badge"
527543
variant="valuelist"/>
528544
</detailsBadge>
545+
<topic
546+
jcr:primaryType="nt:unstructured"
547+
sling:resourceType="granite/ui/components/foundation/form/select"
548+
fieldDescription="Subscribers waiting for notification of the filter value is updated"
549+
fieldLabel="Topic Queue"
550+
name="./topicQueue"
551+
emptyOption="{Boolean}true"
552+
value="">
553+
<datasource
554+
jcr:primaryType="nt:unstructured"
555+
sling:resourceType="aemdesign/components/coral/datasources/tags"
556+
variant="valuelist"
557+
path="/content/cq:tags/${(empty tenant.id and empty tenantId) ? 'aemdesign' : (empty tenant.id ? tenantId : tenant.id )}/component-topic/topic"/>
558+
</topic>
529559
</items>
530560
</variant>
531561
</items>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<template data-sly-template.variant="${@ componentProperties, component}">
2+
<div style="${componentProperties.attr.data.style @ context = 'unsafe'}"
3+
data-sly-attribute="${componentProperties.attr.data @ context = 'unsafe'}"
4+
data-sly-unwrap="${!componentProperties.printStructure}">
5+
6+
<sly data-sly-use.feed="list.feedurl.html" data-sly-call="${feed.variant @ componentProperties=componentProperties}"></sly>
7+
8+
<sly data-sly-test="${componentProperties.resultInfo.result.nextPage.start}"
9+
data-sly-set.pageEnd="${componentProperties.resultInfo.result.nextPage.start}"></sly>
10+
11+
<sly data-sly-test="${!componentProperties.resultInfo.result.nextPage.start}"
12+
data-sly-set.pageEnd="${componentProperties.resultInfo.result.totalMatches}"></sly>
13+
14+
<div class="header" data-sly-set.listItems="${component.ListItems}">
15+
<div>Showing ${componentProperties.resultInfo.result.startIndex}-${pageEnd} of ${componentProperties.resultInfo.result.totalMatches} results</div>
16+
</div>
17+
18+
<div class="content" data-sly-unwrap="${!componentProperties.printStructure}">
19+
<sly data-sly-use.body="list.body.html"
20+
data-sly-call="${body.variant @ componentProperties=componentProperties, component=component}"></sly>
21+
</div>
22+
23+
<sly data-sly-use.pagination="${componentProperties.paginationTemplate}" data-sly-call="${pagination.variant @ componentProperties=componentProperties, component=component}"></sly>
24+
25+
</div>
26+
</template>

0 commit comments

Comments
 (0)