Skip to content
Snippets Groups Projects
Commit 4387f94e authored by esikkala's avatar esikkala
Browse files

Works: add collection facet

parent 377e3d5a
No related branches found
No related tags found
No related merge requests found
......@@ -72,6 +72,19 @@ export const INITIAL_STATE = {
numberedList: false,
minWidth: 150,
},
{
id: 'collection',
label: 'Collection',
desc: `
Collection
`,
valueType: 'object',
makeLink: true,
externalLink: false,
sortValues: true,
numberedList: false,
minWidth: 200
},
{
id: 'language',
label: 'Language',
......
......@@ -88,6 +88,24 @@ export const INITIAL_STATE = {
uriFilter: null,
priority: 4
},
collection: {
id: 'collection',
label: 'Collection',
// predicate: defined in backend
distinctValueCount: 0,
values: [],
flatValues: [],
sortBy: 'instanceCount',
sortDirection: 'desc',
sortButton: true,
spatialFilterButton: false,
isFetching: false,
searchField: true,
containerClass: 'ten',
filterType: 'uriFilter',
uriFilter: null,
priority: 5
},
source: {
id: 'source',
label: 'Source',
......@@ -104,7 +122,7 @@ export const INITIAL_STATE = {
containerClass: 'five',
filterType: 'uriFilter',
uriFilter: null,
priority: 5,
priority: 6,
},
},
};
......
......@@ -122,6 +122,13 @@ export const facetConfigs = {
predicate: '^mmm-schema:manuscript_work/crm:P45_consists_of',
type: 'list',
},
collection: {
id: 'collection',
facetValueFilter: '',
labelPath: '^mmm-schema:manuscript_work/crm:P46i_forms_part_of/skos:prefLabel',
predicate: '^mmm-schema:manuscript_work/crm:P46i_forms_part_of',
type: 'list',
},
},
events: {
facetClass: 'crm:E10_Transfer_of_Custody crm:E12_Production crm:E7_Activity',
......
......@@ -11,6 +11,12 @@ export const workProperties = `
BIND(CONCAT("/manuscripts/page/", REPLACE(STR(?manuscript__id), "^.*\\\\/(.+)", "$1")) AS ?manuscript__dataProviderUrl)
}
UNION
{
?id ^mmm-schema:manuscript_work/crm:P46i_forms_part_of ?collection__id .
?collection__id skos:prefLabel ?collection__prefLabel .
BIND(CONCAT("/collections/page/", REPLACE(STR(?collection__id), "^.*\\\\/(.+)", "$1")) AS ?collection__dataProviderUrl)
}
UNION
{
?id ^mmm-schema:manuscript_work/crm:P45_consists_of ?material__id .
?material__id skos:prefLabel ?material__prefLabel .
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment