Skip to content

Commit

Permalink
Merge pull request #579 from voluntarily/vp-761-hide-new-activity-but…
Browse files Browse the repository at this point in the history
…ton-unless-AP

VP-761 New Activity button hidden to people without Activity Provider status
  • Loading branch information
Andrew Watkins committed Jan 14, 2020
2 parents d26c3b0 + 6c0bcba commit d5f3de4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
2 changes: 1 addition & 1 deletion components/Act/ActAdd.js
Expand Up @@ -15,7 +15,7 @@ const ActAdd = ({ roles, ...props }) => {
<Link href='/act/new'>
<Button type='primary' shape='round' size='large'>
<FormattedMessage
id='landing.newAct'
id='act.new'
defaultMessage='New Activity'
description='Button to create a new activity on Landing page'
/>
Expand Down
3 changes: 1 addition & 2 deletions lang/en.json
Expand Up @@ -11,7 +11,7 @@
"act.editSaveDraft": "Save as draft",
"act.list.empty": "No matching activities",
"act.list.subtitle": "Find activity templates that make it easy to bring volunteers into your classroom",
"act.new": "New activity",
"act.new": "New Activity",
"act.SaveInstructions": "Save as draft will allow you to preview the activity while Publish will make it available to everyone to view.",
"act.update.helptext": "Help people find this activity.",
"act.update.newActivity": "Create an Activity",
Expand Down Expand Up @@ -126,7 +126,6 @@
"itemlist.equipment": "Equipment needed:",
"itemlist.location": "Location:",
"itemlist.status": "Status:",
"landing.newAct": "New Activity",
"landing.sectiontitle.oplist": "Happening Soon",
"landing.sectiontitle.persona": "Who we help",
"LearnMore": "Sign up",
Expand Down
16 changes: 3 additions & 13 deletions pages/act/actlistpage.js
@@ -1,6 +1,5 @@
// [@TODO] - remove Input once actual search component is done
import { Button, Input } from 'antd'
import Link from 'next/link'
import { Input } from 'antd'
import Router from 'next/router'
import { Helmet } from 'react-helmet'
import { FormattedMessage } from 'react-intl'
Expand All @@ -11,6 +10,7 @@ import NoResult from '../../components/NoResult'
import { ActivityContainer, FullPage, GridContainer, PageBanner, PageBannerButtons } from '../../components/VTheme/VTheme'
import publicPage from '../../hocs/publicPage'
import reduxApi, { withActs } from '../../lib/redux/reduxApi.js'
import ActAdd from '../../components/Act/ActAdd'

const escapeRegex = require('../../server/util/regexUtil')

Expand Down Expand Up @@ -52,17 +52,7 @@ export const ActListPage = ({ activities }) =>
</h1>

<PageBannerButtons>
<Button type='primary' shape='round' size='large'>
<Link href='/act/new'>
<a>
<FormattedMessage
id='act.new'
defaultMessage='New activity'
description='Button to create a new activity'
/>
</a>
</Link>
</Button>
<ActAdd />
</PageBannerButtons>
<FormattedMessage
defaultMessage='Find activity templates that make it easy to bring volunteers into your classroom'
Expand Down

0 comments on commit d5f3de4

Please sign in to comment.