Skip to content

Commit

Permalink
Add an organisation Talk page
Browse files Browse the repository at this point in the history
A simple experiment in adding a Talk page for organisation. It looks for a Talk section called org-{organisation.id}.
  • Loading branch information
eatyourgreens committed Jun 20, 2019
1 parent 940a84f commit fb3d56c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
32 changes: 32 additions & 0 deletions app/pages/organization/talk/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import { Helmet } from 'react-helmet';
import { Link } from 'react-router';
import counterpart from 'counterpart';
const talkPath = '../../../talk'
import TalkBreadcrumbs from '../../../talk/breadcrumbs';
import TalkSearchInput from '../../../talk/search-input';
import TalkFootnote from '../../../talk/footnote';

export default function OrgTalkPage(props) {
const section = `org-${props.organisation.id}`;
const pageTitle = `${props.organisation.display_name} » ${counterpart('orgTalk.title')}`;
return (
<div className="project-text-content talk project">
<Helmet title={pageTitle} />
<div className="content-container">
<h1 className="talk-main-link">
<Link to="/projects/#{owner}/#{name}/talk">
{props.organisation.display_name} Talk
</Link>
</h1>
<TalkBreadcrumbs {...props} />

<TalkSearchInput {...props} />

{React.cloneElement(props.children, {section, organisation: props.organisation, user: props.user})}

<TalkFootnote />
</div>
</div>
);
}
1 change: 1 addition & 0 deletions app/router.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ module.exports =
<Route path="organizations/:owner/:name" component={(require './pages/organization/organization-container').default}>
<IndexRoute component={(require './pages/organization/organization-page').default} />
<Route path="home" component={ONE_UP_REDIRECT} />
<Route path="talk" component={require('./pages/organization/talk').default} />
</Route>

<Route path="notifications" component={NotificationsPage} />
Expand Down

0 comments on commit fb3d56c

Please sign in to comment.