Commit fb55871c authored by Viacheslav Pavlov's avatar Viacheslav Pavlov
Browse files

Merge branch '82-footer-with-links' into 'master'

Resolve "Footer with links"

Closes #82

See merge request genesys-pgr/genesys-ui!85
parents 1e5fc01b 77c897f5
......@@ -93,7 +93,7 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
const hasLatLon = accession && accession.geo && accession.geo.latitude !== null && accession.geo.longitude !== null;
return (
<PageLayout>
<PageLayout withFooter>
<ScrollToTopOnMount />
<ContentHeader title="Accession details" subtitle="Passport data and everything else" />
......
......@@ -80,7 +80,7 @@ class BrowsePage extends React.Component<IMapPageProps, any> {
const layerUrl = `{s}/acn/tile/{z}/{x}/{y}?f=${filterCode ? filterCode : ''}`; // `&color=${color}`;
return (
<PageLayout>
<PageLayout withFooter>
<ContentHeader title="Accession map" subTitle="Explore accession localities"/>
<Tabs
tab={ currentTab }
......
......@@ -127,6 +127,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> {
sidebar={
<AccessionFilters initialValues={ overviewWrapper && overviewWrapper.filter || {} } onSubmit={ applyOverviewFilters }/>
}
withFooter
>
<ContentHeader title="Accession browser" subTitle="Explore curated sets of accessions" />
<Tabs
......
......@@ -31,7 +31,7 @@ class ContentPage extends React.Component<IContentPageProps> {
const { menuItem, slug, i18n } = this.props;
CmsService.getMenu(menuItem).then((menu) => this.setState({menu}));
CmsService.getArticleBySlugAndLang(slug, i18n.language).then((article) => this.setState({article}));
CmsService.getArticleBySlugAndLang(i18n.language, slug).then((article) => this.setState({article}));
}
public componentWillReceiveProps(nextProps) {
const {menuItem: oldMenu} = this.props;
......@@ -41,7 +41,7 @@ class ContentPage extends React.Component<IContentPageProps> {
CmsService.getMenu(menuItem).then((menu) => this.setState({menu}));
}
CmsService.getArticleBySlugAndLang(slug, i18n.language).then((article) => this.setState({article}));
CmsService.getArticleBySlugAndLang(i18n.language, slug).then((article) => this.setState({article}));
}
......@@ -49,7 +49,7 @@ class ContentPage extends React.Component<IContentPageProps> {
const { t } = this.props;
const {article, menu} = this.state;
return (
<PageLayout>
<PageLayout withFooter>
{ article &&
<Grid container>
<ContentHeader title={ article.title } />
......
......@@ -41,7 +41,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
const { crop } = this.state;
return !crop ? null : (
<PageLayout>
<PageLayout withFooter>
<ContentHeader title="Crop details"/>
<PageContents>
<CropCard crop={ crop }/>
......
......@@ -96,7 +96,7 @@ class DisplayPage extends React.Component<IDisplayPageProps, any> {
}
return (
<PageLayout>
<PageLayout withFooter>
<ScrollToTopOnMount />
<ContentHeader title="Institute details" subtitle="smt" />
......
......@@ -26,7 +26,7 @@ const styles = (theme) => ({
display: 'flex' as 'flex',
minHeight: 'calc(100vh - 72px)',
flexDirection: 'column' as 'column',
// flexBasis: '70%',
maxWidth: '100%',
},
children: {
flexGrow: 1,
......@@ -60,9 +60,10 @@ interface ILayoutProps extends React.Props<any> {
classes?: any;
children?: any;
sidebar?: any;
withFooter?: any;
}
const Layout = ({classes, children = null, sidebar = null}: ILayoutProps) => (
const Layout = ({classes, children = null, sidebar = null, withFooter = false}: ILayoutProps) => (
<div>
<Header />
<div className={ classes.root }>
......@@ -73,7 +74,7 @@ const Layout = ({classes, children = null, sidebar = null}: ILayoutProps) => (
{ children }
</div>
<div className={ classes.footer }>
<Footer />
{ withFooter && <Footer /> }
</div>
</div>
) }
......
......@@ -272,7 +272,7 @@ class WelcomePage extends React.Component<any, any> {
};
return (
<PageLayout classes={ {root: classes.root } }>
<PageLayout classes={ {root: classes.root } } withFooter>
<ContentHeader title={ t('Genesys PGR') } />
<Grid container spacing={ 0 } className={ classes.background }>
<div className={ classes.backgroundImageWrapper }>
......
......@@ -68,7 +68,7 @@ class LoginContainer extends React.Component<ILoginContainerProps, void> {
public render() {
return (
<PageLayout>
<PageLayout withFooter>
<ContentHeader title="Welcome to Genesys" subTitle="Log in to manage datasets" />
<Grid container spacing={ 0 } justify="center" className="back-gray p-20">
<Grid item xs={ 12 } md={ 5 } lg={ 4 } xl={ 3 }>
......
......@@ -45,7 +45,7 @@ class LoginContainer extends React.Component<ILoginContainerProps> {
const { errorMsg } = this.state;
const { captchaClientKey } = this.props;
return (
<PageLayout>
<PageLayout withFooter>
<ContentHeader title="Create your account"/>
<Grid container spacing={ 0 } justify="center" className="back-gray p-20">
<Grid item xs={ 12 } md={ 5 } lg={ 4 } xl={ 3 }>
......
Markdown is supported
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