diff --git a/src/pages-and-resources/PagesAndResources.jsx b/src/pages-and-resources/PagesAndResources.jsx index 29d219a74..f1fed0674 100644 --- a/src/pages-and-resources/PagesAndResources.jsx +++ b/src/pages-and-resources/PagesAndResources.jsx @@ -36,6 +36,7 @@ function PagesAndResources({ courseId, intl }) { if (loadingStatus === RequestStatus.IN_PROGRESS) { return <>; } + return (
diff --git a/src/pages-and-resources/pages/PageCard.jsx b/src/pages-and-resources/pages/PageCard.jsx index d081bbc0b..b0f5c8a13 100644 --- a/src/pages-and-resources/pages/PageCard.jsx +++ b/src/pages-and-resources/pages/PageCard.jsx @@ -1,9 +1,9 @@ import { history } from '@edx/frontend-platform'; import { injectIntl, intlShape } from '@edx/frontend-platform/i18n'; import { - Card, Icon, IconButton, Badge, + Badge, Card, Icon, IconButton, Hyperlink, } from '@edx/paragon'; -import { Settings } from '@edx/paragon/icons'; +import { ArrowForward, Settings } from '@edx/paragon/icons'; import PropTypes from 'prop-types'; import React, { useContext } from 'react'; import messages from '../messages'; @@ -28,6 +28,31 @@ function PageCard({ }) { const { path: pagesAndResourcesPath } = useContext(PagesAndResourcesContext); + const SettingsButton = () => { + if (page.legacyLink) { + return ( + + + + ); + } + return (page.allowedOperations.configure || page.allowedOperations.enable) && ( + history.push(`${pagesAndResourcesPath}/${page.id}/settings`)} + /> + ); + }; + return ( -
- -

{page.name}

- {(page.allowedOperations.configure || page.allowedOperations.enable) - && ( - history.push(`${pagesAndResourcesPath}/${page.id}/settings`)} - /> - )} -
- { - page.enabled && ( - - {intl.formatMessage(messages.enabled)} - - ) - } -
+ +

{page.name}

+ +
+ + { + page.enabled && ( + + {intl.formatMessage(messages.enabled)} + + ) + } {page.description}