|
@@ -5,7 +5,7 @@ import { UncontrolledTooltip } from 'reactstrap';
|
|
|
|
|
|
|
|
|
|
|
|
|
const NotFoundAlert = (props) => {
|
|
const NotFoundAlert = (props) => {
|
|
|
- const { t, isHidden, isUser } = props;
|
|
|
|
|
|
|
+ const { t, isHidden, isGuestUserMode } = props;
|
|
|
function clickHandler(viewType) {
|
|
function clickHandler(viewType) {
|
|
|
if (props.onPageCreateClicked === null) {
|
|
if (props.onPageCreateClicked === null) {
|
|
|
return;
|
|
return;
|
|
@@ -30,14 +30,14 @@ const NotFoundAlert = (props) => {
|
|
|
</h2>
|
|
</h2>
|
|
|
<button
|
|
<button
|
|
|
type="button"
|
|
type="button"
|
|
|
- className={`m-1 pl-3 pr-3 btn bg-info text-white ${!isUser && 'disabled'}`}
|
|
|
|
|
|
|
+ className={`m-1 pl-3 pr-3 btn bg-info text-white ${isGuestUserMode && 'disabled'}`}
|
|
|
onClick={() => { clickHandler('edit') }}
|
|
onClick={() => { clickHandler('edit') }}
|
|
|
>
|
|
>
|
|
|
<i className="icon-note icon-fw" />
|
|
<i className="icon-note icon-fw" />
|
|
|
{t('not_found_page.Create Page')}
|
|
{t('not_found_page.Create Page')}
|
|
|
</button>
|
|
</button>
|
|
|
|
|
|
|
|
- {!isUser && (
|
|
|
|
|
|
|
+ {isGuestUserMode && (
|
|
|
<UncontrolledTooltip placement="top" target="create-page-btn-wrapper-for-tooltip" fade={false}>
|
|
<UncontrolledTooltip placement="top" target="create-page-btn-wrapper-for-tooltip" fade={false}>
|
|
|
{t('Not available for guest')}
|
|
{t('Not available for guest')}
|
|
|
</UncontrolledTooltip>
|
|
</UncontrolledTooltip>
|
|
@@ -52,7 +52,7 @@ NotFoundAlert.propTypes = {
|
|
|
t: PropTypes.func.isRequired, // i18next
|
|
t: PropTypes.func.isRequired, // i18next
|
|
|
onPageCreateClicked: PropTypes.func,
|
|
onPageCreateClicked: PropTypes.func,
|
|
|
isHidden: PropTypes.bool.isRequired,
|
|
isHidden: PropTypes.bool.isRequired,
|
|
|
- isUser: PropTypes.bool.isRequired,
|
|
|
|
|
|
|
+ isGuestUserMode: PropTypes.bool.isRequired,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export default withTranslation()(NotFoundAlert);
|
|
export default withTranslation()(NotFoundAlert);
|