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

Merge branch 'test' of github.com:SemanticComputing/mmm-web-app into test

parents 61b46370 132cafa9
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,12 @@ import Typography from '@material-ui/core/Typography'; ...@@ -24,6 +24,12 @@ import Typography from '@material-ui/core/Typography';
const MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoiZWtrb25lbiIsImEiOiJjam5vampzZ28xd2dyM3BzNXR0Zzg4azl4In0.eozyF-bBaZbA3ibhvJlJpQ'; const MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoiZWtrb25lbiIsImEiOiJjam5vampzZ28xd2dyM3BzNXR0Zzg4azl4In0.eozyF-bBaZbA3ibhvJlJpQ';
const styles = theme => ({ const styles = theme => ({
root: {
height: 400,
[theme.breakpoints.up('md')]: {
height: 'calc(100% - 72px)'
}
},
tooltip: { tooltip: {
position: 'absolute', position: 'absolute',
padding: '4px', padding: '4px',
...@@ -204,33 +210,33 @@ class Deck extends React.Component { ...@@ -204,33 +210,33 @@ class Deck extends React.Component {
// https://www.mapbox.com/mapbox-gl-js/api#map // https://www.mapbox.com/mapbox-gl-js/api#map
{ /* style={{marginTop: 72}} */} { /* style={{marginTop: 72}} */}
return ( return (
<ReactMapGL <div className={this.props.classes.root}>
{...this.state.viewport} <ReactMapGL
className={this.props.classes.root} {...this.state.viewport}
width='100%' width='100%'
height='calc(100% - 72px)' height='100%'
onViewportChange={this._onViewportChange}
onViewportChange={this._onViewportChange} mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN}
mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN} mapOptions={{
mapOptions={{ style: 'mapbox://styles/mapbox/light-v9'
style: 'mapbox://styles/mapbox/light-v9' }}
}} >
> <HTMLOverlay redraw={this._renderLegend.bind(this)} />
<HTMLOverlay redraw={this._renderLegend.bind(this)} /> <DeckGL
<DeckGL viewState={this.state.viewport}
viewState={this.state.viewport} layers={[layer]}
layers={[layer]} />
/> <div className={this.props.classes.mapControls}>
<div className={this.props.classes.mapControls}> <NavigationControl onViewportChange={this._onViewportChange} />
<NavigationControl onViewportChange={this._onViewportChange} /> </div>
</div> {this._renderSpinner()}
{this._renderSpinner()} <InfoDialog
<InfoDialog open={this.state.dialog.open}
open={this.state.dialog.open} onClose={this.closeDialog.bind(this)}
onClose={this.closeDialog.bind(this)} data={this.state.dialog.data}
data={this.state.dialog.data} />
/> </ReactMapGL>
</ReactMapGL> </div>
); );
} }
} }
......
...@@ -37,9 +37,12 @@ const style = { ...@@ -37,9 +37,12 @@ const style = {
height: '100%' height: '100%'
}; };
const styles = () => ({ const styles = theme => ({
leafletContainer: { leafletContainer: {
height: 'calc(100% - 72px)' height: 400,
[theme.breakpoints.up('md')]: {
height: 'calc(100% - 72px)'
}
}, },
spinner: { spinner: {
height: 40, height: 40,
......
...@@ -11,11 +11,14 @@ import querystring from 'querystring'; ...@@ -11,11 +11,14 @@ import querystring from 'querystring';
import ResultTableHead from './ResultTableHead'; import ResultTableHead from './ResultTableHead';
import history from '../../History'; import history from '../../History';
const styles = () => ({ const styles = theme => ({
tableContainer: { tableContainer: {
overflow: 'auto', overflow: 'auto',
width: '100%', width: '100%',
height: 'calc(100% - 72px)' height: 'auto',
[theme.breakpoints.up('md')]: {
height: 'calc(100% - 72px)'
}
}, },
paginationRow: { paginationRow: {
borderBottom: '1px solid lightgrey' borderBottom: '1px solid lightgrey'
......
...@@ -14,10 +14,11 @@ import thumbImage from '../../img/thumb.png'; ...@@ -14,10 +14,11 @@ import thumbImage from '../../img/thumb.png';
const styles = theme => ({ const styles = theme => ({
root: { root: {
width: '100%', width: '100%',
height: 'calc(100% - 150px)', minHeight: 900,
overflow: 'auto', marginBottom: theme.spacing.unit,
[ theme.breakpoints.down('sm')]: { [ theme.breakpoints.up('md')]: {
height: '100%' height: 'calc(100% - 150px)',
overflow: 'auto',
}, },
}, },
icon: { icon: {
......
...@@ -35,7 +35,10 @@ import { ...@@ -35,7 +35,10 @@ import {
const styles = theme => ({ const styles = theme => ({
root: { root: {
flexGrow: 1, flexGrow: 1,
height: '100%', height: 'auto',
[theme.breakpoints.up('md')]: {
height: '100%',
}
}, },
flex: { flex: {
flexGrow: 1, flexGrow: 1,
...@@ -51,14 +54,17 @@ const styles = theme => ({ ...@@ -51,14 +54,17 @@ const styles = theme => ({
//minHeight: 700 //minHeight: 700
}, },
mainContainer: { mainContainer: {
marginTop: 64, height: 'auto',
height: 'calc(100% - 64px)', backgroundColor: '#bdbdbd',
padding: theme.spacing.unit,
[theme.breakpoints.down('sm')]: { [theme.breakpoints.down('sm')]: {
marginTop: 56, marginTop: 56,
height: 'calc(100% - 56px)', height: 'calc(100% - 56px)',
}, },
backgroundColor: '#bdbdbd', [theme.breakpoints.up('sm')]: {
padding: theme.spacing.unit, marginTop: 64,
height: 'calc(100% - 64px)',
},
}, },
facetBarContainer: { facetBarContainer: {
height: '100%', height: '100%',
...@@ -103,7 +109,7 @@ let SemanticPortal = (props) => { ...@@ -103,7 +109,7 @@ let SemanticPortal = (props) => {
path="/manuscripts" path="/manuscripts"
render={routeProps => render={routeProps =>
<React.Fragment> <React.Fragment>
<Grid item sm={12} md={3} className={classes.facetBarContainer}> <Grid item xs={12} md={3} className={classes.facetBarContainer}>
<FacetBar <FacetBar
facetData={props.manuscriptsFacets} facetData={props.manuscriptsFacets}
facetClass='manuscripts' facetClass='manuscripts'
...@@ -112,7 +118,7 @@ let SemanticPortal = (props) => { ...@@ -112,7 +118,7 @@ let SemanticPortal = (props) => {
updateFacetOption={props.updateFacetOption} updateFacetOption={props.updateFacetOption}
/> />
</Grid> </Grid>
<Grid item sm={12} md={9} className={classes.resultsContainer}> <Grid item xs={12} md={9} className={classes.resultsContainer}>
<Paper className={classes.resultsContainerPaper}> <Paper className={classes.resultsContainerPaper}>
<Manuscripts <Manuscripts
manuscripts={props.manuscripts} manuscripts={props.manuscripts}
...@@ -135,7 +141,7 @@ let SemanticPortal = (props) => { ...@@ -135,7 +141,7 @@ let SemanticPortal = (props) => {
path="/works" path="/works"
render={routeProps => render={routeProps =>
<React.Fragment> <React.Fragment>
<Grid item sm={12} md={3} className={classes.facetBarContainer}> <Grid item xs={12} md={3} className={classes.facetBarContainer}>
<FacetBar <FacetBar
facetData={props.worksFacets} facetData={props.worksFacets}
facetClass='works' facetClass='works'
...@@ -144,7 +150,7 @@ let SemanticPortal = (props) => { ...@@ -144,7 +150,7 @@ let SemanticPortal = (props) => {
updateFacetOption={props.updateFacetOption} updateFacetOption={props.updateFacetOption}
/> />
</Grid> </Grid>
<Grid item sm={12} md={9} className={classes.resultsContainer}> <Grid item xs={12} md={9} className={classes.resultsContainer}>
<Paper className={classes.resultsContainerPaper}> <Paper className={classes.resultsContainerPaper}>
<Works <Works
works={props.works} works={props.works}
...@@ -166,7 +172,7 @@ let SemanticPortal = (props) => { ...@@ -166,7 +172,7 @@ let SemanticPortal = (props) => {
path="/people" path="/people"
render={routeProps => render={routeProps =>
<React.Fragment> <React.Fragment>
<Grid item sm={12} md={3} className={classes.facetBarContainer}> <Grid item xs={12} md={3} className={classes.facetBarContainer}>
<FacetBar <FacetBar
facetData={props.peopleFacets} facetData={props.peopleFacets}
facetClass='people' facetClass='people'
...@@ -175,7 +181,7 @@ let SemanticPortal = (props) => { ...@@ -175,7 +181,7 @@ let SemanticPortal = (props) => {
updateFacetOption={props.updateFacetOption} updateFacetOption={props.updateFacetOption}
/> />
</Grid> </Grid>
<Grid item sm={12} md={9} className={classes.resultsContainer}> <Grid item xs={12} md={9} className={classes.resultsContainer}>
<Paper className={classes.resultsContainerPaper}> <Paper className={classes.resultsContainerPaper}>
<People <People
people={props.people} people={props.people}
...@@ -198,7 +204,7 @@ let SemanticPortal = (props) => { ...@@ -198,7 +204,7 @@ let SemanticPortal = (props) => {
path="/organizations" path="/organizations"
render={routeProps => render={routeProps =>
<React.Fragment> <React.Fragment>
<Grid item sm={12} md={3} className={classes.facetBarContainer}> <Grid item xs={12} md={3} className={classes.facetBarContainer}>
<FacetBar <FacetBar
facetData={props.organizationsFacets} facetData={props.organizationsFacets}
facetClass='organizations' facetClass='organizations'
...@@ -207,7 +213,7 @@ let SemanticPortal = (props) => { ...@@ -207,7 +213,7 @@ let SemanticPortal = (props) => {
updateFacetOption={props.updateFacetOption} updateFacetOption={props.updateFacetOption}
/> />
</Grid> </Grid>
<Grid item sm={12} md={9} className={classes.resultsContainer}> <Grid item xs={12} md={9} className={classes.resultsContainer}>
<Paper className={classes.resultsContainerPaper}> <Paper className={classes.resultsContainerPaper}>
<Organizations <Organizations
organizations={props.organizations} organizations={props.organizations}
...@@ -230,7 +236,7 @@ let SemanticPortal = (props) => { ...@@ -230,7 +236,7 @@ let SemanticPortal = (props) => {
path="/places" path="/places"
render={routeProps => render={routeProps =>
<React.Fragment> <React.Fragment>
<Grid item sm={12} md={3} className={classes.facetBarContainer}> <Grid item xs={12} md={3} className={classes.facetBarContainer}>
<FacetBar <FacetBar
facetData={props.placesFacets} facetData={props.placesFacets}
facetClass='places' facetClass='places'
...@@ -239,7 +245,7 @@ let SemanticPortal = (props) => { ...@@ -239,7 +245,7 @@ let SemanticPortal = (props) => {
updateFacetOption={props.updateFacetOption} updateFacetOption={props.updateFacetOption}
/> />
</Grid> </Grid>
<Grid item sm={12} md={9} className={classes.resultsContainer}> <Grid item xs={12} md={9} className={classes.resultsContainer}>
<Paper className={classes.resultsContainerPaper}> <Paper className={classes.resultsContainerPaper}>
<Places <Places
places={props.places} places={props.places}
...@@ -261,10 +267,10 @@ let SemanticPortal = (props) => { ...@@ -261,10 +267,10 @@ let SemanticPortal = (props) => {
path="/all" path="/all"
render={routeProps => render={routeProps =>
<React.Fragment> <React.Fragment>
<Grid item sm={12} md={3} className={classes.facetBarContainer}> <Grid item xs={12} md={3} className={classes.facetBarContainer}>
</Grid> </Grid>
<Grid item sm={12} md={9} className={classes.resultsContainer}> <Grid item xs={12} md={9} className={classes.resultsContainer}>
<Paper className={classes.resultsContainerPaper}> <Paper className={classes.resultsContainerPaper}>
<All <All
clientSideFacetedSearch={props.clientSideFacetedSearch} clientSideFacetedSearch={props.clientSideFacetedSearch}
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<!-- for leaflet side pane --> <!-- for leaflet side pane -->
<!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> --> <!-- <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet"> -->
......
...@@ -131,7 +131,7 @@ export const INITIAL_STATE = { ...@@ -131,7 +131,7 @@ export const INITIAL_STATE = {
valueType: 'owner', valueType: 'owner',
makeLink: true, makeLink: true,
sortValues: true, sortValues: true,
numberedList: true, numberedList: false,
minWidth: 250 minWidth: 250
}, },
{ {
......
...@@ -67,6 +67,23 @@ export const INITIAL_STATE = { ...@@ -67,6 +67,23 @@ export const INITIAL_STATE = {
filterType: 'uriFilter', filterType: 'uriFilter',
uriFilter: null uriFilter: null
}, },
owner: {
id: 'owner',
label: 'Owner',
// 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
},
// language: { // language: {
// id: 'language', // id: 'language',
// label: 'Language', // label: 'Language',
......
...@@ -63,6 +63,7 @@ export const facetConfigs = { ...@@ -63,6 +63,7 @@ export const facetConfigs = {
facetValueFilter: '', facetValueFilter: '',
label: 'Owner', label: 'Owner',
labelPath: 'crm:P51_has_former_or_current_owner/skos:prefLabel', labelPath: 'crm:P51_has_former_or_current_owner/skos:prefLabel',
predicate: 'crm:P51_has_former_or_current_owner',
type: 'list', type: 'list',
}, },
}, },
......
...@@ -37,14 +37,15 @@ export const manuscriptProperties = ` ...@@ -37,14 +37,15 @@ export const manuscriptProperties = `
{ {
?id crm:P51_has_former_or_current_owner ?owner__id . ?id crm:P51_has_former_or_current_owner ?owner__id .
?owner__id skos:prefLabel ?owner__prefLabel . ?owner__id skos:prefLabel ?owner__prefLabel .
OPTIONAL { ?owner__id mmm-schema:data_provider_url ?owner__dataProviderUrl } BIND (?owner__id AS ?owner__dataProviderUrl)
OPTIONAL { #OPTIONAL { ?owner__id mmm-schema:data_provider_url ?owner__dataProviderUrl }
[] rdf:subject ?id ; #OPTIONAL {
rdf:predicate crm:P51_has_former_or_current_owner ; # [] rdf:subject ?id ;
rdf:object ?owner__id ; # rdf:predicate crm:P51_has_former_or_current_owner ;
mmm-schema:order ?order . # rdf:object ?owner__id ;
BIND(xsd:integer(?order) + 1 AS ?owner__order) # mmm-schema:order ?order .
} # BIND(xsd:integer(?order) + 1 AS ?owner__order)
#}
} }
UNION UNION
{ {
......
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