Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions src/theme/UnsupportedVersionBanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ function UnsupportedTitle() {
);
}

function SecurityOnlyTitle() {
return (
<Translate
id="version.securityonly.warning.title"
>
Security Support Only Moodle Version
</Translate>
);
}

function UnreleasedTitle() {
return (
<Translate
Expand Down Expand Up @@ -68,6 +78,32 @@ function UpgradeLink() {
);
}

function ReleasesLink() {
return (
<Translate
id="documentation.versionSecurityWarning.content"
description={'A banner used to indicate that the current page relates to '
+ 'a version of Moodle no longer in general support'}
values={{
releases: (
<Link to="/general/releases">
<strong>
<Translate
id="releases"
description="Link label for releases list"
>
releases
</Translate>
</strong>
</Link>
),
}}
>
{'You may view the {releases} page to see the support status of all Moodle versions.'}
</Translate>
);
}

function GeneralSupportExpiredWarning({ versionData }) {
return (
<Admonition
Expand All @@ -76,19 +112,19 @@ function GeneralSupportExpiredWarning({ versionData }) {
<AutoFixHighIcon fontSize="inherit" />
}
title={
<UnsupportedTitle versionData={versionData} />
<SecurityOnlyTitle versionData={versionData} />
}
>
<strong>
<Translate
description="A heading to indicate that the Moodle version is only in security support"
id="documentation.support.securityOnly"
>
This version of Moodle is no longer supported for general bug fixes.
This version of Moodle receives security fixes, but is no longer supported for general bug fixes.
</Translate>
</strong>
<br />
<UpgradeLink />
<ReleasesLink />
</Admonition>
);
}
Expand Down Expand Up @@ -206,6 +242,7 @@ function VersionedSupportWarning({ versionData, moodleVersion }) {
);
}

// 'security' is the remaining option.
return (
<GeneralSupportExpiredWarning versionData={versionData} />
);
Expand Down
Loading