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

Places: show some columns only on instance page

parent 486182e2
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,7 @@ class ResultTable extends React.Component {
const expanded = this.state.expandedRows.has(row.id);
let hasExpandableContent = false;
const dataCells = this.props.data.tableColumns.map(column => {
if (column.onlyOnInstancePage) { return null; }
const columnData = row[column.id] == null ? '-' : row[column.id];
const isArray = Array.isArray(columnData);
if (isArray) {
......
......@@ -25,6 +25,7 @@ const ResultTableHead = props => {
<TableRow>
<TableCell className={classes.headerCol} key={'empty'} />
{columns.map(column => {
if (column.onlyOnInstancePage) { return null; }
return (
<TableCell
className={classes.headerCol}
......
......@@ -76,7 +76,35 @@ export const INITIAL_STATE = {
externalLink: false,
sortValues: true,
numberedList: false,
minWidth: 170
minWidth: 170,
},
{
id: 'manuscript',
label: 'Manuscript',
desc: `
The manuscript(s) associated with the place.
`,
valueType: 'object',
makeLink: true,
externalLink: false,
sortValues: true,
numberedList: false,
minWidth: 250,
onlyOnInstancePage: true
},
{
id: 'actor',
label: 'Actor',
desc: `
The actor(s) associated with the place.
`,
valueType: 'object',
makeLink: true,
externalLink: false,
sortValues: true,
numberedList: false,
minWidth: 250,
onlyOnInstancePage: true
},
{
id: 'source',
......
......@@ -21,7 +21,7 @@ export const placePropertiesInstancePage = `
BIND(CONCAT("/places/page/", REPLACE(STR(?area__id), "^.*\\\\/(.+)", "$1")) AS ?area__dataProviderUrl)
}
UNION {
?id ^mmm-schema:person_place ?actor__id .
?id ^crm:P7_took_place_at/crm:P11_had_participant ?actor__id .
?actor__id skos:prefLabel ?actor__prefLabel .
BIND(CONCAT("/actors/page/", REPLACE(STR(?actor__id), "^.*\\\\/(.+)", "$1")) AS ?actor__dataProviderUrl)
}
......
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