Skip to content

Commit 9c6f640

Browse files
CalebJamesHbrianchandotcom
authored andcommitted
LPD-51089 Add composite app and low-code labels to PDP
1 parent 4e61d70 commit 9c6f640

File tree

1 file changed

+28
-27
lines changed
  • workspaces/liferay-marketplace-workspace/client-extensions/liferay-marketplace-site-initializer/site-initializer/ddm-templates/marketplace-apps-categories

1 file changed

+28
-27
lines changed

workspaces/liferay-marketplace-workspace/client-extensions/liferay-marketplace-site-initializer/site-initializer/ddm-templates/marketplace-apps-categories/ddm-template.ftl

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,28 +27,33 @@
2727
white-space: nowrap;
2828
}
2929
30-
.client-extension-app-product-type {
30+
.client-extension-product-type {
3131
background-color: #FFE6C6;
3232
color: #9D4C00;
3333
}
3434
35-
.cloud-app-product-type {
35+
.cloud-product-type {
3636
background-color: #D1EEDC;
3737
color: #0E7835;
3838
}
3939
40+
.composite-app-product-type {
41+
background-color: #FBE0FF;
42+
color: #720086;
43+
}
44+
4045
.diamond-icon-container {
4146
color: #C9C9CF;
4247
height: 4px;
4348
width: 4px;
4449
}
4550
46-
.dxp-app-product-type {
51+
.dxp-product-type {
4752
background-color: #D1ECFA;
4853
color: #166E9E;
4954
}
5055
51-
.fragment-app-product-type {
56+
.low-code-configuration-product-type {
5257
background-color: #DCD7E9;
5358
color: #503690;
5459
}
@@ -70,13 +75,17 @@
7075
}
7176
}
7277
</style>
78+
7379
<#assign
74-
PRODUCT_TYPE_CLIENT_EXTENSION = "CLIENT-EXTENSION"
75-
PRODUCT_TYPE_CLOUD = "CLOUD"
76-
PRODUCT_TYPE_DXP = "DXP"
77-
PRODUCT_TYPE_FRAGMENT = "FRAGMENT"
78-
PRODUCT_TYPE_FREE = "FREE"
79-
PRODUCT_TYPE_PAID = "PAID"
80+
productTypeValues =
81+
{
82+
"client-extension": "Client Extension",
83+
"cloud": "Cloud App",
84+
"composite-app": "Composite App",
85+
"dxp": "DXP App",
86+
"low-code-configuration": "Low-Code"
87+
}
88+
8089
VOCABULARY_PRODUCT_CATEGORY = "MARKETPLACE APP CATEGORY"
8190
/>
8291

@@ -116,30 +125,22 @@
116125
<#assign productTypes = productSpecifications?filter(item -> stringUtil.equals(item.specificationKey, "type")) />
117126

118127
<#list productTypes as productType>
119-
<#if productType.value?upper_case == PRODUCT_TYPE_CLIENT_EXTENSION>
120-
<div class="align-items-center app-product-type border border-radius-small client-extension-app-product-type d-flex mb-1 mr-2 px-2 rounded-lg">
121-
<div class="bg-neutral-8">Client Extension</div>
122-
</div>
123-
<#elseif productType.value?upper_case == PRODUCT_TYPE_CLOUD>
124-
<div class="align-items-center app-product-type border border-radius-small cloud-app-product-type d-flex mb-1 mr-2 px-2 rounded-lg">
125-
<div class="bg-neutral-8">Cloud App</div>
126-
</div>
127-
<#elseif productType.value?upper_case == PRODUCT_TYPE_DXP>
128-
<div class="align-items-center app-product-type border border-radius-small d-flex dxp-app-product-type mb-1 mr-2 px-2 rounded-lg">
129-
<div class="bg-neutral-8">DXP App</div>
130-
</div>
131-
<#elseif productType.value?upper_case == PRODUCT_TYPE_FRAGMENT>
132-
<div class="align-items-center app-product-type border border-radius-small d-flex fragment-app-product-type mb-1 mr-2 px-2 rounded-lg">
133-
<div class="bg-neutral-8">Fragment</div>
134-
</div>
128+
<#if productType?has_content>
129+
<#assign appType = (productTypeValues[productType.value]!) />
130+
131+
<#if appType?has_content>
132+
<div class="align-items-center app-product-type border border-radius-small d-flex mb-1 mr-2 px-2 rounded-lg ${productType.value}-product-type">
133+
<div class="bg-neutral-8">${appType}</div>
134+
</div>
135+
</#if>
135136
</#if>
136137
</#list>
137138
</#if>
138139

139140
<#if categories?has_content>
140141
<#assign filteredCategories = categories?filter(category -> category.vocabulary?upper_case == VOCABULARY_PRODUCT_CATEGORY) />
141142

142-
<#if filteredCategories?has_content && productTypes?has_content>
143+
<#if filteredCategories?has_content && appType?has_content>
143144
<span class="align-items-center d-flex justify-content-between">
144145
<span class="align-items-center d-flex diamond-icon-container justify-content-between mr-3">
145146
<@clay["icon"] symbol="diamond" />

0 commit comments

Comments
 (0)