Skip to content

Commit 9b7774c

Browse files
authored
Update msplugin block configured (#2307)
(cherry picked from commit a3f32f3)
1 parent 11bcd4d commit 9b7774c

File tree

1 file changed

+33
-32
lines changed

1 file changed

+33
-32
lines changed

geonode_mapstore_client/templates/geonode-mapstore-client/resource_page_catalog.html

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,46 @@
99
<script>
1010
(function(){
1111
function getPageFilterForm(filterForm) {
12+
const filterGroup = [...new Map([
13+
{
14+
"id": "my-resources",
15+
"labelId": "gnhome.myResources",
16+
"type": "filter",
17+
"disableIf": "{!state('user')}"
18+
},
19+
{
20+
"id": "favorite",
21+
"labelId": "gnhome.favorites",
22+
"type": "filter",
23+
"disableIf": "{!state('user')}"
24+
},
25+
{
26+
"id": "featured",
27+
"labelId": "gnhome.featuredList",
28+
"type": "filter"
29+
},
30+
{
31+
"id": "unpublished",
32+
"labelId": "gnhome.unpublished",
33+
"type": "filter",
34+
"disableIf": "{!state('user')}"
35+
},
36+
{
37+
"id": "pending-approval",
38+
"labelId": "gnhome.pendingApproval",
39+
"type": "filter",
40+
"disableIf": "{!state('user')}"
41+
},
42+
...(filterForm ?? []),
43+
].map(item => [item.id, item])).values()];
1244
return [
1345
{
1446
"type": "search"
1547
},
1648
{
1749
"type": "group",
1850
"labelId": "gnhome.customFiltersTitle",
19-
"items": [
20-
{
21-
"id": "my-resources",
22-
"labelId": "gnhome.myResources",
23-
"type": "filter",
24-
"disableIf": "{!state('user')}"
25-
},
26-
{
27-
"id": "favorite",
28-
"labelId": "gnhome.favorites",
29-
"type": "filter",
30-
"disableIf": "{!state('user')}"
31-
},
32-
{
33-
"id": "featured",
34-
"labelId": "gnhome.featuredList",
35-
"type": "filter"
36-
},
37-
{
38-
"id": "unpublished",
39-
"labelId": "gnhome.unpublished",
40-
"type": "filter",
41-
"disableIf": "{!state('user')}"
42-
},
43-
{
44-
"id": "pending-approval",
45-
"labelId": "gnhome.pendingApproval",
46-
"type": "filter",
47-
"disableIf": "{!state('user')}"
48-
},
49-
...(filterForm ?? []),
50-
]
51+
"items": filterGroup
5152
},
5253
{
5354
"type": "divider",

0 commit comments

Comments
 (0)