mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 09:05:56 +00:00
3.1/3.2 compat
This commit is contained in:
parent
02c5a38f37
commit
032a49d929
@ -428,7 +428,7 @@ class DocumentationSearch {
|
|||||||
$defaults = array(
|
$defaults = array(
|
||||||
'Description' => _t('DocumentationViewer.OPENSEARCHDESC', 'Search the documentation'),
|
'Description' => _t('DocumentationViewer.OPENSEARCHDESC', 'Search the documentation'),
|
||||||
'Tags' => _t('DocumentationViewer.OPENSEARCHTAGS', 'documentation'),
|
'Tags' => _t('DocumentationViewer.OPENSEARCHTAGS', 'documentation'),
|
||||||
'Contact' => Email::getAdminEmail(),
|
'Contact' => Config::inst()->get('Email', 'admin_email'),
|
||||||
'ShortName' => _t('DocumentationViewer.OPENSEARCHNAME', 'Documentation Search'),
|
'ShortName' => _t('DocumentationViewer.OPENSEARCHNAME', 'Documentation Search'),
|
||||||
'Author' => 'SilverStripe'
|
'Author' => 'SilverStripe'
|
||||||
);
|
);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
class DocumentationOpenSearchController extends Controller {
|
class DocumentationOpenSearchController extends Controller {
|
||||||
|
|
||||||
public static $allowed_actions = array(
|
private static $allowed_actions = array(
|
||||||
'description'
|
'description'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
class DocumentationViewer extends Controller {
|
class DocumentationViewer extends Controller {
|
||||||
|
|
||||||
public static $allowed_actions = array(
|
private static $allowed_actions = array(
|
||||||
'home',
|
'home',
|
||||||
'LanguageForm',
|
'LanguageForm',
|
||||||
'doLanguageForm',
|
'doLanguageForm',
|
||||||
|
@ -26,7 +26,7 @@ class DocumentationEntity extends ViewableData {
|
|||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
static $casting = array(
|
private static $casting = array(
|
||||||
'Name' => 'Text'
|
'Name' => 'Text'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -14,6 +14,6 @@
|
|||||||
"irc": "irc://irc.freenode.org/silverstripe"
|
"irc": "irc://irc.freenode.org/silverstripe"
|
||||||
}],
|
}],
|
||||||
"require": {
|
"require": {
|
||||||
"silverstripe/framework": ">=3.1.*@dev"
|
"silverstripe/framework": "~3.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
<% if Pages %>
|
<% if Pages %>
|
||||||
<ul>
|
<ul>
|
||||||
<% control Pages %>
|
<% loop Pages %>
|
||||||
<li><a href="$Link">$Title</a></li>
|
<li><a href="$Link">$Title</a></li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul>
|
</ul>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p>No documentation pages found for $Title. If you need help writing documentation please consult the README.</p>
|
<p>No documentation pages found for $Title. If you need help writing documentation please consult the README.</p>
|
||||||
|
@ -30,9 +30,9 @@
|
|||||||
<div id="entities-nav" class="documentation-nav clearfix">
|
<div id="entities-nav" class="documentation-nav clearfix">
|
||||||
<h2>Modules:</h2>
|
<h2>Modules:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<% control Entities %>
|
<% loop Entities %>
|
||||||
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
|
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="clear"><!-- --></div>
|
<div class="clear"><!-- --></div>
|
||||||
@ -43,9 +43,9 @@
|
|||||||
<div id="versions-nav" class="documentation-nav clearfix">
|
<div id="versions-nav" class="documentation-nav clearfix">
|
||||||
<h2>Versions:</h2>
|
<h2>Versions:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<% control Versions %>
|
<% loop Versions %>
|
||||||
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
|
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="doc-breadcrumbs">
|
<div class="doc-breadcrumbs">
|
||||||
<p>
|
<p>
|
||||||
<% control Breadcrumbs %>
|
<% loop Breadcrumbs %>
|
||||||
<a href="$Link">$Title</a> <% if Last %><% else %>›<% end_if %>
|
<a href="$Link">$Title</a> <% if Last %><% else %>›<% end_if %>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
@ -2,7 +2,7 @@
|
|||||||
<div id="sibling-pages" class="sidebar-box">
|
<div id="sibling-pages" class="sidebar-box">
|
||||||
<h4>In this module:</h4>
|
<h4>In this module:</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<% control EntityPages %>
|
<% loop EntityPages %>
|
||||||
<li>
|
<li>
|
||||||
<a href="$Link" class="$LinkingMode">$Title</a>
|
<a href="$Link" class="$LinkingMode">$Title</a>
|
||||||
<% if Top.SubmenuLocation = nested %>
|
<% if Top.SubmenuLocation = nested %>
|
||||||
@ -11,18 +11,18 @@
|
|||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
</li>
|
</li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% if SubmenuLocation = separate %>
|
<% if SubmenuLocation = separate %>
|
||||||
<% control CurrentLevelOnePage %>
|
<% loop CurrentLevelOnePage %>
|
||||||
<% if Children %>
|
<% if Children %>
|
||||||
<div class = "sidebar-box">
|
<div class = "sidebar-box">
|
||||||
<h4>$title</h4>
|
<h4>$title</h4>
|
||||||
<% include DocSubmenu %>
|
<% include DocSubmenu %>
|
||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<ul id="submenu">
|
<ul id="submenu">
|
||||||
<% control Children %>
|
<% loop Children %>
|
||||||
<li><a href="$Link" class="$LinkingMode">
|
<li><a href="$Link" class="$LinkingMode">
|
||||||
$Title <% if IsFolder %><span class="is-folder">►</span><% end_if %>
|
$Title <% if IsFolder %><span class="is-folder">►</span><% end_if %>
|
||||||
</a>
|
</a>
|
||||||
<% if Children %>
|
<% if Children %>
|
||||||
<ul>
|
<ul>
|
||||||
<% control Children %>
|
<% loop Children %>
|
||||||
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
|
<li><a href="$Link" class="$LinkingMode">$Title</a></li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul><% end_if %>
|
</ul><% end_if %>
|
||||||
</li>
|
</li>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="warningBox" id="outdated-release">
|
<div class="warningBox" id="outdated-release">
|
||||||
<div class="warningBoxTop">
|
<div class="warningBoxTop">
|
||||||
<% control VersionWarning %>
|
<% loop VersionWarning %>
|
||||||
<% if OutdatedRelease %>
|
<% 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.</p>
|
<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.</p>
|
||||||
<p>If some of your projects still use this version, consider upgrading as soon as possible.</p>
|
<p>If some of your projects still use this version, consider upgrading as soon as possible.</p>
|
||||||
@ -8,6 +8,6 @@
|
|||||||
<p>This document contains information about a <strong>future</strong> release <% if StableVersion %>and not the current stable version (<strong>$StableVersion</strong>)<% end_if %>.</p>
|
<p>This document contains information about a <strong>future</strong> release <% if StableVersion %>and not the current stable version (<strong>$StableVersion</strong>)<% end_if %>.</p>
|
||||||
<p>Be aware that information on this page may change and API's may not be stable for production use.</p>
|
<p>Be aware that information on this page may change and API's may not be stable for production use.</p>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
<h2><% _t('DOCUMENTEDMODULES', 'Documented Modules') %></h2>
|
<h2><% _t('DOCUMENTEDMODULES', 'Documented Modules') %></h2>
|
||||||
|
|
||||||
<% if Entities %>
|
<% if Entities %>
|
||||||
<% control Entities %>
|
<% loop Entities %>
|
||||||
<div class="module">
|
<div class="module">
|
||||||
<h3><a href="$Link">$Title</a></h3>
|
<h3><a href="$Link">$Title</a></h3>
|
||||||
</div>
|
</div>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p><% _t('NOMODULEDOCUMENTATION', 'No modules with documentation installed could be found.') %></p>
|
<p><% _t('NOMODULEDOCUMENTATION', 'No modules with documentation installed could be found.') %></p>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
<% if Results %>
|
<% if Results %>
|
||||||
<p>Showing page $ThisPage of $TotalPages</p>
|
<p>Showing page $ThisPage of $TotalPages</p>
|
||||||
|
|
||||||
<% control Results %>
|
<% loop Results %>
|
||||||
<h2><a href="$Link"><% if BreadcrumbTitle %>$BreadcrumbTitle<% else %>$Title<% end_if %></a></h2>
|
<h2><a href="$Link"><% if BreadcrumbTitle %>$BreadcrumbTitle<% else %>$Title<% end_if %></a></h2>
|
||||||
<p>$Content.LimitCharacters(200)</p>
|
<p>$Content.LimitCharacters(200)</p>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
|
|
||||||
<% if SearchPages %>
|
<% if SearchPages %>
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<li class="prev"><a href="$PrevUrl">Prev</a></li>
|
<li class="prev"><a href="$PrevUrl">Prev</a></li>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% control SearchPages %>
|
<% loop SearchPages %>
|
||||||
<% if IsEllipsis %>
|
<% if IsEllipsis %>
|
||||||
<li class="ellipsis">...</li>
|
<li class="ellipsis">...</li>
|
||||||
<% else %>
|
<% else %>
|
||||||
@ -29,7 +29,7 @@
|
|||||||
<li><a href="$Link">$PageNumber</a></li>
|
<li><a href="$Link">$PageNumber</a></li>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
|
|
||||||
<% if NextUrl = false %>
|
<% if NextUrl = false %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
<opensearch:startIndex>$StartResult</opensearch:startIndex>
|
<opensearch:startIndex>$StartResult</opensearch:startIndex>
|
||||||
<opensearch:itemsPerPage>$PageLength</opensearch:itemsPerPage>
|
<opensearch:itemsPerPage>$PageLength</opensearch:itemsPerPage>
|
||||||
<opensearch:Query role="request" searchTerms="$Query" startIndex="$StartResult" count="$PageLength"></opensearch:Query>
|
<opensearch:Query role="request" searchTerms="$Query" startIndex="$StartResult" count="$PageLength"></opensearch:Query>
|
||||||
<% control Results %>
|
<% loop Results %>
|
||||||
<entry>
|
<entry>
|
||||||
<title><% if BreadcrumbTitle %>$BreadcrumbTitle<% else %>$Title<% end_if %></title>
|
<title><% if BreadcrumbTitle %>$BreadcrumbTitle<% else %>$Title<% end_if %></title>
|
||||||
<link href="$Link">$Link</link>
|
<link href="$Link">$Link</link>
|
||||||
<id>urn:uuid:$ID</id>
|
<id>urn:uuid:$ID</id>
|
||||||
<content type="text">$Content.LimitCharacters(200)</content>
|
<content type="text">$Content.LimitCharacters(200)</content>
|
||||||
</entry>
|
</entry>
|
||||||
<% end_control %>
|
<% end_loop %>
|
||||||
</feed>
|
</feed>
|
Loading…
x
Reference in New Issue
Block a user