From 91857dd8e2d820b306c2d1ad4b1da6559930244a Mon Sep 17 00:00:00 2001 From: Jim O'Donnell Date: Thu, 20 Jun 2019 14:17:42 +0100 Subject: [PATCH] Add an organisation Talk page An experiment in adding a Talk page for organisation. It looks for a Talk section called org-{organisation.id}. --- .../organization/organization-container.jsx | 4 ++- app/pages/organization/talk/index.jsx | 32 +++++++++++++++++++ app/router.cjsx | 12 +++++++ 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 app/pages/organization/talk/index.jsx diff --git a/app/pages/organization/organization-container.jsx b/app/pages/organization/organization-container.jsx index b74b9147d6..b02f92ad52 100644 --- a/app/pages/organization/organization-container.jsx +++ b/app/pages/organization/organization-container.jsx @@ -227,6 +227,7 @@ class OrganizationContainer extends React.Component { } render() { + const { user } = this.context; const { children, params } = this.props; const { collaboratorView, @@ -256,7 +257,8 @@ class OrganizationContainer extends React.Component { organizationProjects, projectAvatars, quoteObject, - toggleCollaboratorView: this.toggleCollaboratorView + toggleCollaboratorView: this.toggleCollaboratorView, + user }); } else if (fetchingOrganization) { return ( diff --git a/app/pages/organization/talk/index.jsx b/app/pages/organization/talk/index.jsx new file mode 100644 index 0000000000..a4174f2787 --- /dev/null +++ b/app/pages/organization/talk/index.jsx @@ -0,0 +1,32 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import { Link } from 'react-router'; +import counterpart from 'counterpart'; +import TalkBreadcrumbs from '../../../talk/breadcrumbs'; +import TalkSearchInput from '../../../talk/search-input'; +import TalkFootnote from '../../../talk/footnote'; + +export default function OrgTalkPage(props) { + const { organization, user } = props; + const section = `org-${organization.id}`; + const pageTitle = `${organization.display_name} ยป ${counterpart('orgTalk.title')}`; + return ( +
+ +
+

+ + {organization.display_name} Talk + +

+ + + + + {React.cloneElement(props.children, { section, organization, user })} + + +
+
+ ); +} diff --git a/app/router.cjsx b/app/router.cjsx index 4677a6b551..71552fd4d4 100644 --- a/app/router.cjsx +++ b/app/router.cjsx @@ -207,6 +207,18 @@ module.exports = + + + + + + + + + + + +