Commit 3d8edb37 authored by Viacheslav Pavlov's avatar Viacheslav Pavlov Committed by Viacheslav Pavlov
Browse files

Page titles not set

Added missing titles
fixed stepper pages
now titles are set by specific entity title not by generic "page type"
contentHeaderWithButton now sets it's background color depending on it's type
fixed vocabulary public routes
PageTitle introduced, setPageTitle now used only by PageTitle component
parent deee86d3
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
"lastModified": "Last modified", "lastModified": "Last modified",
"lastUpdated": "Last updated", "lastUpdated": "Last updated",
"lastUpdatedBy": "Last updated by {{who}}", "lastUpdatedBy": "Last updated by {{who}}",
"loading": "Loading {{what}}",
"modified": "Modified", "modified": "Modified",
"name": "Name", "name": "Name",
"newVersionAvailable": "New version available", "newVersionAvailable": "New version available",
......
...@@ -783,6 +783,7 @@ ...@@ -783,6 +783,7 @@
"edit": { "edit": {
"articleSaved": "Article saved", "articleSaved": "Article saved",
"activityPostSaved": "Activity post saved", "activityPostSaved": "Activity post saved",
"activityPostPageTitle": "Activity post details",
"transifex": { "transifex": {
"fetch": "Fetch translations", "fetch": "Fetch translations",
"fetchStarted": "Fetch started", "fetchStarted": "Fetch started",
...@@ -1254,8 +1255,8 @@ ...@@ -1254,8 +1255,8 @@
"admin": { "admin": {
"p": { "p": {
"edit": { "edit": {
"title": "Edit descriptor", "title": "Edit {{title}} descriptor",
"dataPublication": "Data publication", "details": "Descriptor details",
"back": "BACK TO DASHBOARD" "back": "BACK TO DASHBOARD"
} }
}, },
...@@ -1514,6 +1515,11 @@ ...@@ -1514,6 +1515,11 @@
} }
}, },
"dashboard": { "dashboard": {
"p": {
"edit": {
"title": "Edit {{instName}}"
}
},
"c": { "c": {
"form": { "form": {
"gaTracker": "GA Tracker code", "gaTracker": "GA Tracker code",
...@@ -1729,7 +1735,8 @@ ...@@ -1729,7 +1735,8 @@
"display": { "display": {
"email": "Contact email", "email": "Contact email",
"metadata": "Record metadata", "metadata": "Record metadata",
"urls": "Websites" "urls": "Websites",
"title": "Data provider details"
} }
} }
} }
...@@ -1743,14 +1750,16 @@ ...@@ -1743,14 +1750,16 @@
"imageGallery": { "imageGallery": {
"toFolder": "To folder", "toFolder": "To folder",
"deleteGallery": "Delete gallery", "deleteGallery": "Delete gallery",
"deleteGalleryAlert": "Gallery at {{folderPath, string}} could not be deleted." "deleteGalleryAlert": "Gallery at {{folderPath, string}} could not be deleted.",
"title": "Image gallery details"
}, },
"repositoryBrowser": { "repositoryBrowser": {
"viewGallery": "View gallery", "viewGallery": "View gallery",
"createGallery": "Create gallery", "createGallery": "Create gallery",
"createGalleryAlert": "Image gallery at {{folderPath, string}} could not be created.", "createGalleryAlert": "Image gallery at {{folderPath, string}} could not be created.",
"deleteFolder": "Delete folder", "deleteFolder": "Delete folder",
"deleteFolderAlert": "Folder {{folderPath, string}} could not be deleted." "deleteFolderAlert": "Folder {{folderPath, string}} could not be deleted.",
"title": "File repository"
} }
}, },
"dialog": { "dialog": {
...@@ -1844,7 +1853,7 @@ ...@@ -1844,7 +1853,7 @@
}, },
"p": { "p": {
"browse": { "browse": {
"title": "{{totalElements, number}} requests for PGR material" "title": "Requests for PGR material"
}, },
"display": { "display": {
"title": "Request from {{email, string}}", "title": "Request from {{email, string}}",
...@@ -1952,8 +1961,12 @@ ...@@ -1952,8 +1961,12 @@
"createSubsets": "Create subset" "createSubsets": "Create subset"
}, },
"p": { "p": {
"browse": {
"title": "Subsets dashboard"
},
"stepper": { "stepper": {
"stepperTitle": "Steps for subset data publication completion", "stepperTitle": "Steps for subset data publication completion",
"publisher": "Subset data publisher",
"accessionList": { "accessionList": {
"stepName": "List of accessions", "stepName": "List of accessions",
"instructions": "INSTRUCTIONS FOR USE", "instructions": "INSTRUCTIONS FOR USE",
...@@ -2152,7 +2165,8 @@ ...@@ -2152,7 +2165,8 @@
"confirm": "Do you wish to set a new FTP password for this account?" "confirm": "Do you wish to set a new FTP password for this account?"
}, },
"profile": { "profile": {
"title": "User profile" "title": "User profile",
"profile": "{{fullName}} profile information"
} }
} }
}, },
...@@ -2263,7 +2277,7 @@ ...@@ -2263,7 +2277,7 @@
"p": { "p": {
"browse": { "browse": {
"create": "Create vocabulary", "create": "Create vocabulary",
"title": "What do you want to do?", "title": "Browse vocabularies",
"update": "Update vocabularies" "update": "Update vocabularies"
}, },
"display": { "display": {
...@@ -2273,6 +2287,10 @@ ...@@ -2273,6 +2287,10 @@
"term": "Term", "term": "Term",
"terms": "terms", "terms": "terms",
"title": "Vocabulary details" "title": "Vocabulary details"
},
"edit": {
"title": "{{code}} vocabulary edit",
"titleCreate": "Create vocabulary"
} }
} }
}, },
......
...@@ -22,6 +22,7 @@ import Tabs, { Tab } from 'ui/common/Tabs'; ...@@ -22,6 +22,7 @@ import Tabs, { Tab } from 'ui/common/Tabs';
import AccessionFilters from './c/Filters'; import AccessionFilters from './c/Filters';
import ButtonBar from 'ui/common/buttons/ButtonBar'; import ButtonBar from 'ui/common/buttons/ButtonBar';
import DownloadDialog, { DOWNLOAD_LIMIT } from 'ui/common/download-dialog'; import DownloadDialog, { DOWNLOAD_LIMIT } from 'ui/common/download-dialog';
import PageTitle from 'ui/common/PageTitle';
class BrowsePage extends BrowsePageTemplate<Accession> { class BrowsePage extends BrowsePageTemplate<Accession> {
...@@ -52,6 +53,7 @@ class BrowsePage extends BrowsePageTemplate<Accession> { ...@@ -52,6 +53,7 @@ class BrowsePage extends BrowsePageTemplate<Accession> {
<PageLayout sidebar={ <PageLayout sidebar={
<AccessionFilters initialValues={ paged && paged.filter || {} } onSubmit={ this.myApplyFilters } /> <AccessionFilters initialValues={ paged && paged.filter || {} } onSubmit={ this.myApplyFilters } />
}> }>
<PageTitle title={ t('accessions.public.p.browse.title') }/>
<ContentHeader title={ t('accessions.public.p.browse.title') } subTitle={ t('accessions.public.p.browse.subTitle') } /> <ContentHeader title={ t('accessions.public.p.browse.title') } subTitle={ t('accessions.public.p.browse.subTitle') } />
<PaginationComponent <PaginationComponent
pageObj={ paged } pageObj={ paged }
......
...@@ -41,6 +41,7 @@ import Authorize from 'ui/common/authorized/Authorize'; ...@@ -41,6 +41,7 @@ import Authorize from 'ui/common/authorized/Authorize';
import TemperatureChart from './c/TemperatureChart'; import TemperatureChart from './c/TemperatureChart';
import PrecipitationChart from './c/PrecipitationChart'; import PrecipitationChart from './c/PrecipitationChart';
import ClimateTable from './c/ClimateTable'; import ClimateTable from './c/ClimateTable';
import PageTitle from 'ui/common/PageTitle';
import ActionButton from 'ui/common/buttons/ActionButton'; import ActionButton from 'ui/common/buttons/ActionButton';
const styles = (theme) => ({ const styles = (theme) => ({
...@@ -206,7 +207,11 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> { ...@@ -206,7 +207,11 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
return ( return (
<PageLayout withFooter> <PageLayout withFooter>
<ScrollToTopOnMount /> <ScrollToTopOnMount />
<ContentHeader title={ t('accessions.public.p.display.title') } subtitle={ t('accessions.public.p.display.subTitle') } /> <PageTitle title={ !stillLoading ? accession.accessionNumber : t('common:label.loading', { what: t('accessions.public.p.display.title') }) } />
<ContentHeader
title={ !stillLoading ? accession.accessionNumber : t('common:label.loading', { what: t('accessions.public.p.display.title') }) }
subtitle={ t('accessions.public.p.display.subTitle') }
/>
{ stillLoading ? <Loading /> : { stillLoading ? <Loading /> :
<div> <div>
...@@ -216,7 +221,7 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> { ...@@ -216,7 +221,7 @@ class BrowsePage extends React.Component<IBrowsePageProps, any> {
<PageContents className="pt-1rem"> <PageContents className="pt-1rem">
<MainSection className={ isChecked ? classes.selected : accession.historic ? classes.historic : '' } title={ <MainSection className={ isChecked ? classes.selected : accession.historic ? classes.historic : '' } title={
<div> <div>
{ t('accessions.common.modelName') }: { accession.accessionNumber } { t('accessions.public.p.display.title') }
<div className="float-right"> <div className="float-right">
<Authorize role={ ROLE_USER }> <Authorize role={ ROLE_USER }>
<Button className="mr-20" variant="contained" onClick={ this.loadAuditLog }>{ t('accessions.public.p.display.loadChanges') }</Button> <Button className="mr-20" variant="contained" onClick={ this.loadAuditLog }>{ t('accessions.public.p.display.loadChanges') }</Button>
......
...@@ -9,6 +9,7 @@ import AccessionFilter from 'model/accession/AccessionFilter'; ...@@ -9,6 +9,7 @@ import AccessionFilter from 'model/accession/AccessionFilter';
import Loading from 'ui/common/Loading'; import Loading from 'ui/common/Loading';
import AccessionMapInfo from 'model/accession/AccessionMapInfo'; import AccessionMapInfo from 'model/accession/AccessionMapInfo';
import MapLayer from 'model/genesys/MapTileLayer'; import MapLayer from 'model/genesys/MapTileLayer';
import ContentHeader from 'ui/common/heading/ContentHeader';
import Button from '@material-ui/core/Button'; import Button from '@material-ui/core/Button';
import Tabs, { Tab } from 'ui/common/Tabs'; import Tabs, { Tab } from 'ui/common/Tabs';
import PrettyFilters from 'ui/common/filter/PrettyFilters'; import PrettyFilters from 'ui/common/filter/PrettyFilters';
...@@ -17,6 +18,7 @@ import ContentLayout from 'ui/layout/ContentLayout'; ...@@ -17,6 +18,7 @@ import ContentLayout from 'ui/layout/ContentLayout';
import MapConfigSection from './c/MapConfigSection'; import MapConfigSection from './c/MapConfigSection';
import AccessionService from 'service/genesys/AccessionService'; import AccessionService from 'service/genesys/AccessionService';
import PageTitle from 'ui/common/PageTitle';
let Map; let Map;
let TileLayer; let TileLayer;
...@@ -156,7 +158,9 @@ class BrowsePage extends React.Component<IMapPageProps, any> { ...@@ -156,7 +158,9 @@ class BrowsePage extends React.Component<IMapPageProps, any> {
rightAlwaysCollapsible rightAlwaysCollapsible
customHeaderHeight customHeaderHeight
> >
<Tabs <PageTitle title={ t('accessions.public.p.browse.title') } />
<ContentHeader title={ t('accessions.public.p.browse.title') } subTitle={ t('accessions.public.p.browse.subTitle') } />
<Tabs
tab={ currentTab } tab={ currentTab }
actions={ actions={
<ButtonBar> <ButtonBar>
......
...@@ -24,6 +24,7 @@ import Tabs, { Tab } from 'ui/common/Tabs'; ...@@ -24,6 +24,7 @@ import Tabs, { Tab } from 'ui/common/Tabs';
import PropertiesCard from 'ui/common/PropertiesCard'; import PropertiesCard from 'ui/common/PropertiesCard';
import PrettyFilters from 'ui/common/filter/PrettyFilters'; import PrettyFilters from 'ui/common/filter/PrettyFilters';
import Number from 'ui/common/Number'; import Number from 'ui/common/Number';
import PageTitle from 'ui/common/PageTitle';
import AccessionFilters from './c/Filters'; import AccessionFilters from './c/Filters';
...@@ -136,6 +137,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> { ...@@ -136,6 +137,7 @@ class BrowsePage extends React.Component<IOverviewPageProps, any> {
} }
withFooter withFooter
> >
<PageTitle title={ t('accessions.public.p.browse.title') }/>
<ContentHeader title={ t('accessions.public.p.browse.title') } subTitle={ t('accessions.public.p.browse.subTitle') } /> <ContentHeader title={ t('accessions.public.p.browse.title') } subTitle={ t('accessions.public.p.browse.subTitle') } />
<Tabs <Tabs
tab={ currentTab } tab={ currentTab }
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
"edit": { "edit": {
"articleSaved": "Article saved", "articleSaved": "Article saved",
"activityPostSaved": "Activity post saved", "activityPostSaved": "Activity post saved",
"activityPostPageTitle": "Activity post details",
"transifex": { "transifex": {
"fetch": "Fetch translations", "fetch": "Fetch translations",
"fetchStarted": "Fetch started", "fetchStarted": "Fetch started",
......
...@@ -14,6 +14,7 @@ import Menu from 'model/cms/Menu'; ...@@ -14,6 +14,7 @@ import Menu from 'model/cms/Menu';
import PageLayout from 'ui/layout/PageLayout'; import PageLayout from 'ui/layout/PageLayout';
import ContentHeader from 'ui/common/heading/ContentHeader'; import ContentHeader from 'ui/common/heading/ContentHeader';
import Loading from 'ui/common/Loading'; import Loading from 'ui/common/Loading';
import PageTitle from 'ui/common/PageTitle';
import ArticleSection from './c/ArticleSection'; import ArticleSection from './c/ArticleSection';
import Grid from '@material-ui/core/Grid'; import Grid from '@material-ui/core/Grid';
import MenuStepper from 'cms/ui/c/MenuStepper'; import MenuStepper from 'cms/ui/c/MenuStepper';
...@@ -79,6 +80,7 @@ class ActivityPostDisplayPage extends React.Component<IActivityPostDisplayPage> ...@@ -79,6 +80,7 @@ class ActivityPostDisplayPage extends React.Component<IActivityPostDisplayPage>
<Loading/> <Loading/>
) : ( ) : (
<Grid container style={ {height: '100%'} }> <Grid container style={ {height: '100%'} }>
<PageTitle title={ title }/>
<ContentHeader title={ title }/> <ContentHeader title={ title }/>
<ArticleSection title={ title } body={ activityPost.body }/> <ArticleSection title={ title } body={ activityPost.body }/>
<MenuStepper menu={ lastNewsMenu }/> <MenuStepper menu={ lastNewsMenu }/>
......
...@@ -11,6 +11,7 @@ import Article from 'model/cms/Article'; ...@@ -11,6 +11,7 @@ import Article from 'model/cms/Article';
// UI // UI
import PageLayout from 'ui/layout/PageLayout'; import PageLayout from 'ui/layout/PageLayout';
import ContentHeader from 'ui/common/heading/ContentHeader'; import ContentHeader from 'ui/common/heading/ContentHeader';
import PageTitle from 'ui/common/PageTitle';
import ArticleSection from './c/ArticleSection'; import ArticleSection from './c/ArticleSection';
import MenuStepper from './c/MenuStepper'; import MenuStepper from './c/MenuStepper';
...@@ -67,6 +68,7 @@ class ContentPage extends React.Component<IContentPageProps> { ...@@ -67,6 +68,7 @@ class ContentPage extends React.Component<IContentPageProps> {
<PageLayout withFooter> <PageLayout withFooter>
{ article && { article &&
<Grid container style={ {height: '100%'} }> <Grid container style={ {height: '100%'} }>
<PageTitle title={ article.title }/>
<ContentHeader title={ article.title } /> <ContentHeader title={ article.title } />
<ArticleSection body={ article.body }/> <ArticleSection body={ article.body }/>
{ menuKey && <MenuStepper menu={ menu } t={ t }/> } { menuKey && <MenuStepper menu={ menu } t={ t }/> }
......
...@@ -4,13 +4,13 @@ import {bindActionCreators} from 'redux'; ...@@ -4,13 +4,13 @@ import {bindActionCreators} from 'redux';
import { translate } from 'react-i18next'; import { translate } from 'react-i18next';
// Actions // Actions
import { setPageTitle } from 'actions/pageTitle';
import {loadDocumentation} from 'cms/actions/public'; import {loadDocumentation} from 'cms/actions/public';
// Model // Model
import ADoc from 'model/cms/ADoc'; import ADoc from 'model/cms/ADoc';
// UI // UI
import PageLayout from 'ui/layout/PageLayout'; import PageLayout from 'ui/layout/PageLayout';
import ContentHeader from 'ui/common/heading/ContentHeader'; import ContentHeader from 'ui/common/heading/ContentHeader';
import PageTitle from 'ui/common/PageTitle';
import DocumentationSection from './c/DocumentationSection'; import DocumentationSection from './c/DocumentationSection';
import Grid from '@material-ui/core/Grid'; import Grid from '@material-ui/core/Grid';
...@@ -22,7 +22,6 @@ interface IDocumentationPageProps { ...@@ -22,7 +22,6 @@ interface IDocumentationPageProps {
i18n: any; i18n: any;
documentation: ADoc; documentation: ADoc;
loadDocumentation: (slug: string) => void; loadDocumentation: (slug: string) => void;
setPageTitle: any;
} }
class ContentPage extends React.Component<IDocumentationPageProps> { class ContentPage extends React.Component<IDocumentationPageProps> {
...@@ -39,14 +38,10 @@ class ContentPage extends React.Component<IDocumentationPageProps> { ...@@ -39,14 +38,10 @@ class ContentPage extends React.Component<IDocumentationPageProps> {
} }
} }
public componentWillReceiveProps(nextProps) { public componentWillReceiveProps(nextProps) {
const { slug, documentation, loadDocumentation, setPageTitle, loadingSlug } = nextProps; const { slug, documentation, loadDocumentation, loadingSlug } = nextProps;
if ((!documentation && !loadingSlug) || (loadingSlug && slug !== loadingSlug)) { if ((!documentation && !loadingSlug) || (loadingSlug && slug !== loadingSlug)) {
loadDocumentation(slug); loadDocumentation(slug);
} else {
if (documentation && documentation.title) {
setPageTitle(documentation.title);
}
} }
} }
...@@ -58,6 +53,7 @@ class ContentPage extends React.Component<IDocumentationPageProps> { ...@@ -58,6 +53,7 @@ class ContentPage extends React.Component<IDocumentationPageProps> {
<PageLayout withFooter> <PageLayout withFooter>
{ documentation && { documentation &&
<Grid container> <Grid container>
<PageTitle title={ documentation.title }/>
<ContentHeader title={ documentation.title } /> <ContentHeader title={ documentation.title } />
<DocumentationSection documentation={ documentation }/> <DocumentationSection documentation={ documentation }/>
</Grid> </Grid>
...@@ -75,6 +71,5 @@ const mapStateToProps = (state, ownProps) => ({ ...@@ -75,6 +71,5 @@ const mapStateToProps = (state, ownProps) => ({
const mapDispatchToProps = (dispatch) => bindActionCreators({ const mapDispatchToProps = (dispatch) => bindActionCreators({
loadDocumentation, loadDocumentation,
setPageTitle,
}, dispatch); }, dispatch);
export default translate()(connect(mapStateToProps, mapDispatchToProps)(ContentPage)); export default translate()(connect(mapStateToProps, mapDispatchToProps)(ContentPage));
...@@ -13,9 +13,9 @@ import ActivityPost from 'model/cms/ActivityPost'; ...@@ -13,9 +13,9 @@ import ActivityPost from 'model/cms/ActivityPost';
// UI // UI
import BrowsePageTemplate, { IBrowsePageProps } from 'ui/pages/_base/BrowsePage'; import BrowsePageTemplate, { IBrowsePageProps } from 'ui/pages/_base/BrowsePage';
import PageLayout, { PageContents } from 'ui/layout/PageLayout'; import PageLayout, { PageContents } from 'ui/layout/PageLayout';
import ContentHeader from 'ui/common/heading/ContentHeader';
import Loading from 'ui/common/Loading'; import Loading from 'ui/common/Loading';
import PagedLoader from 'ui/common/PagedLoader'; import PagedLoader from 'ui/common/PagedLoader';
import PageTitle from 'ui/common/PageTitle';
import ActivityPostFilters from './c/ActivityPostFilters'; import ActivityPostFilters from './c/ActivityPostFilters';
import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton'; import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton';
import Button from '@material-ui/core/Button/Button'; import Button from '@material-ui/core/Button/Button';
...@@ -38,8 +38,9 @@ class ActivityPostBrowsePage extends BrowsePageTemplate<ActivityPost> { ...@@ -38,8 +38,9 @@ class ActivityPostBrowsePage extends BrowsePageTemplate<ActivityPost> {
<PageLayout sidebar={ <PageLayout sidebar={
<ActivityPostFilters initialValues={ paged && paged.filter || {} } onSubmit={ this.myApplyFilters }/> <ActivityPostFilters initialValues={ paged && paged.filter || {} } onSubmit={ this.myApplyFilters }/>
}> }>
<ContentHeader title={ t('cms.admin.p.browseActivityPost.title') }/> <PageTitle title={ t('cms.admin.p.browseActivityPost.title') }/>
<ContentHeaderWithButton <ContentHeaderWithButton
title={ t('cms.admin.p.browseActivityPost.title') }
buttons={ buttons={
<Link to="/admin/content/activity-post/edit"> <Link to="/admin/content/activity-post/edit">
<Button variant="contained">{ t('cms.admin.p.browseActivityPost.create') }</Button> <Button variant="contained">{ t('cms.admin.p.browseActivityPost.create') }</Button>
......
...@@ -21,6 +21,7 @@ import ButtonBar from 'ui/common/buttons/ButtonBar'; ...@@ -21,6 +21,7 @@ import ButtonBar from 'ui/common/buttons/ButtonBar';
import ActivityPostForm from 'cms/ui/admin/c/ActivityPostForm'; import ActivityPostForm from 'cms/ui/admin/c/ActivityPostForm';
import ArticleSection from 'cms/ui/c/ArticleSection'; import ArticleSection from 'cms/ui/c/ArticleSection';
import Footer from 'ui/layout/Footer'; import Footer from 'ui/layout/Footer';
import PageTitle from 'ui/common/PageTitle';
const styles = () => ({ const styles = () => ({
activityPost: { activityPost: {
...@@ -106,6 +107,7 @@ class ActivityPostEditPage extends React.Component<IArticleEditPageProps, any> { ...@@ -106,6 +107,7 @@ class ActivityPostEditPage extends React.Component<IArticleEditPageProps, any> {
return ( return (
<div> <div>
<PageTitle title={ activityPost.title.split(/<\w>|<\/\w>/).join('') }/>
<ContentHeaderWithButton <ContentHeaderWithButton
title={ <span dangerouslySetInnerHTML={ { __html: activityPost.title } }/> } title={ <span dangerouslySetInnerHTML={ { __html: activityPost.title } }/> }
classes={ { subHeader: classes.customSubHeader } } classes={ { subHeader: classes.customSubHeader } }
......
...@@ -13,12 +13,12 @@ import Article from 'model/cms/Article'; ...@@ -13,12 +13,12 @@ import Article from 'model/cms/Article';
// UI // UI
import BrowsePageTemplate, { IBrowsePageProps } from 'ui/pages/_base/BrowsePage'; import BrowsePageTemplate, { IBrowsePageProps } from 'ui/pages/_base/BrowsePage';
import PageLayout, { PageContents } from 'ui/layout/PageLayout'; import PageLayout, { PageContents } from 'ui/layout/PageLayout';
import ContentHeader from 'ui/common/heading/ContentHeader';
import Loading from 'ui/common/Loading'; import Loading from 'ui/common/Loading';
import PagedLoader from 'ui/common/PagedLoader'; import PagedLoader from 'ui/common/PagedLoader';
import ArticleFilters from './c/ArticleFilters'; import ArticleFilters from './c/ArticleFilters';
import ArticleCard from './c/ArticleCard'; import ArticleCard from './c/ArticleCard';
import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton'; import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton';
import PageTitle from 'ui/common/PageTitle';
import Button from '@material-ui/core/Button/Button'; import Button from '@material-ui/core/Button/Button';
class BrowsePage extends BrowsePageTemplate<Article> { class BrowsePage extends BrowsePageTemplate<Article> {
...@@ -38,8 +38,9 @@ class BrowsePage extends BrowsePageTemplate<Article> { ...@@ -38,8 +38,9 @@ class BrowsePage extends BrowsePageTemplate<Article> {
<PageLayout sidebar={ <PageLayout sidebar={
<ArticleFilters initialValues={ paged && paged.filter || {} } onSubmit={ this.myApplyFilters }/> <ArticleFilters initialValues={ paged && paged.filter || {} } onSubmit={ this.myApplyFilters }/>
}> }>
<ContentHeader title={ t('cms.admin.p.browse.title') }/> <PageTitle title={ t('cms.admin.p.browse.title') }/>
<ContentHeaderWithButton <ContentHeaderWithButton
title={ t('cms.admin.p.browse.title') }
buttons={ buttons={
<Link to="/admin/content/edit"> <Link to="/admin/content/edit">
<Button variant="contained">{ t('cms.admin.p.browse.create') }</Button> <Button variant="contained">{ t('cms.admin.p.browse.create') }</Button>
......
...@@ -15,11 +15,12 @@ import CmsService from 'service/genesys/CmsService'; ...@@ -15,11 +15,12 @@ import CmsService from 'service/genesys/CmsService';
import { log } from 'utilities/debug'; import { log } from 'utilities/debug';
// ui // ui
import { PageContents } from 'ui/layout/PageLayout'; import { PageContents } from 'ui/layout/PageLayout';
import PageTitle from 'ui/common/PageTitle';
import Grid from '@material-ui/core/Grid'; import Grid from '@material-ui/core/Grid';
import ArticleForm from './c/ArticleForm'; import ArticleForm from './c/ArticleForm';
import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton'; import ContentHeaderWithButton from 'ui/common/heading/ContentHeaderWithButton';
import ActionButton from 'ui/common/buttons/ActionButton'; import ActionButton from 'ui/common/buttons/ActionButton';
import ArticleSection from '../c/ArticleSection'; import ArticleSection from 'cms/ui/c/ArticleSection';
import ButtonBar from 'ui/common/buttons/ButtonBar'; import ButtonBar from 'ui/common/buttons/ButtonBar';
const styles = () => ({ const styles = () => ({
...@@ -114,6 +115,7 @@ class ArticleEditPage extends React.Component<IArticleEditPageProps, any> { ...@@ -114,6 +115,7 @@ class ArticleEditPage extends React.Component<IArticleEditPageProps, any> {
return ( return (
<div> <div>
<PageTitle title={ article.title }/>
<ContentHeaderWithButton title={ article.title } classes={ { subHeader: classes.customSubHeader } } buttons={