Commit 29481fd6 authored by Elisabeth Reuhl's avatar Elisabeth Reuhl
Browse files

Added "Show related objects" button back to object popups

parent d2a1e9ce
......@@ -78,7 +78,7 @@ const GET_ARCHAEOLOGICAL_SITES = gql`
# identifier
# name
#}
#types
types
#discoveryContext {
# identifier
#}
......@@ -154,11 +154,8 @@ export const OurMap = () => {
regionId: 0,
searchStr: "",
projectList: [{"projectLabel": "African Archaeology Archive Cologne", "projectBestandsname": "AAArC"},
{
"projectLabel": "Syrian Heritage Archive Project",
"projectBestandsname": "Syrian-Heritage-Archive-Project"
},
{"projectLabel": "Friedrich Rakob’s Bequest", "projectBestandsname": "dai-rom-nara"}],
{"projectLabel": "Friedrich Rakob’s Bequest", "projectBestandsname": "dai-rom-nara"},
{"projectLabel": "Syrian Heritage Archive Project", "projectBestandsname": "Syrian-Heritage-Archive-Project"}],
checkedProjects: [],
mode: "archaeoSites",
sitesMode: "",
......@@ -540,7 +537,7 @@ export const OurMap = () => {
position={place.coordinates.split(", ").reverse()}
opacity={1}
>
<ReturnPopup object={mapDataContext.entity} place={place} handleRelatedObjects={handleRelatedObjects} showRelatedObjects={input.showRelatedObjects}/>
<ReturnPopup object={mapDataContext.entity} place={place} handleRelatedObjects={handleRelatedObjects} showRelatedObjects={input.showRelatedObjects} mapDataContextEntity={mapDataContext.entity}/>
</Marker>
)})}
<MarkerClusterGroup>
......@@ -557,7 +554,7 @@ export const OurMap = () => {
position={place.coordinates.split(", ").reverse()}
opacity={0.5}
>
<ReturnPopup object={relatedObj} place={place} handleRelatedObjects={handleRelatedObjects} showRelatedObjects={input.showRelatedObjects}/>
<ReturnPopup object={relatedObj} place={place} handleRelatedObjects={handleRelatedObjects} showRelatedObjects={input.showRelatedObjects} mapDataContextEntity={mapDataContext.entity}/>
</Marker>
)})
)
......@@ -573,7 +570,7 @@ export const OurMap = () => {
//coordinates need to be reversed because of different standards between geojson and leaflet
position={place.coordinates.split(", ").reverse()}
>
<ReturnPopup object={entity} place={place} handleRelatedObjects={handleRelatedObjects} showRelatedObjects={input.showRelatedObjects}/>
<ReturnPopup object={entity} place={place} handleRelatedObjects={handleRelatedObjects} showRelatedObjects={input.showRelatedObjects} mapDataContextEntity={mapDataContext.entity}/>
</Marker>
)}
)
......
......@@ -8,18 +8,18 @@ export const ReturnPopup = (props) => {
<div>
<h2>{props.object.name}</h2>
{props.place&&<p>{props.place.name}</p>}
{/*{input.showRelatedObjects&&mapDataContext&&mapDataContext.entity
{props.showRelatedObjects&&props.mapDataContextEntity
&&<ul>{
(mapDataContext.entity.related
&&mapDataContext.entity.related.map( relatedObj =>
(props.mapDataContextEntity.related
&&props.mapDataContextEntity.related.map( relatedObj =>
<li>{relatedObj
? `${relatedObj.name} (${relatedObj.type})`
: "no access"
}</li>
)
)
}</ul>}*/}
{props.showRelatedObjects&&props.handleRelatedObjects&&<Button
}</ul>}
{props.handleRelatedObjects&&<Button
onClick={() => {props.handleRelatedObjects(props.object.identifier)}}
name="showRelatedObjects"
variant="contained"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment