mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
FIX Showing the stable and outdated version number correctly.
This commit is contained in:
parent
def89a2894
commit
272b7ae660
@ -34,13 +34,13 @@ class DocumentationViewerVersionWarning extends Extension {
|
||||
if($entity->getVersion() == "master" || $compare > 0) {
|
||||
return $this->owner->customise(new ArrayData(array(
|
||||
'FutureRelease' => true,
|
||||
'StableVersion' => DBField::create_field('HTMLText', $stable)
|
||||
'StableVersion' => DBField::create_field('HTMLText', $stable->getVersion())
|
||||
)));
|
||||
}
|
||||
else {
|
||||
return $this->owner->customise(new ArrayData(array(
|
||||
'OutdatedRelease' => true,
|
||||
'StableVersion' => DBField::create_field('HTMLText', $stable)
|
||||
'StableVersion' => DBField::create_field('HTMLText', $stable->getVersion())
|
||||
)));
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<div class="warningBoxTop">
|
||||
<% loop VersionWarning %>
|
||||
<% if OutdatedRelease %>
|
||||
<p>This document contains information for an <strong>outdated</strong> version <% if Top.Version %>(<strong>$Top.Version</strong>)<% end_if %> and may not be maintained any more. If some of your projects still use this version, consider upgrading as soon as possible.</p>
|
||||
<p>This document contains information for an <strong>outdated</strong> version <% if $Version %>(<strong>$Version</strong>)<% end_if %> and may not be maintained any more. If some of your projects still use this version, consider upgrading as soon as possible.</p>
|
||||
<% else_if FutureRelease %>
|
||||
<p>This document contains information about a <strong>future</strong> release <% if StableVersion %>and not the current stable version (<strong>$StableVersion</strong>)<% end_if %>. Be aware that information on this page may change and API's may not be stable for production use.</p>
|
||||
<p>This document contains information about a <strong>future</strong> release <% if $VersionWarning.StableVersion %>and not the current stable version (<strong>$VersionWarning.StableVersion</strong>)<% end_if %>. Be aware that information on this page may change and API's may not be stable for production use.</p>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div id="documentation-page" class="box">
|
||||
<% if VersionWarning %>
|
||||
<% include DocumentationVersion_warning %>
|
||||
<% include DocumentationVersion_warning Version=$Entity.Version %>
|
||||
<% end_if %>
|
||||
|
||||
<% include DocumentationTableContents %>
|
||||
|
Loading…
Reference in New Issue
Block a user