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