Removed routes.yml as it's no longer needed dev/docs is now handled

through DevelopmentAdmin

Fixed include paths in the DocumentationViewer_DocumentationPage
template

Fixed undefined variable notice
This commit is contained in:
UndefinedOffset 2019-01-07 13:21:19 -04:00
parent 90d39617f0
commit c02f94bfef
4 changed files with 9 additions and 12 deletions

3
.gitignore vendored
View File

@ -1 +1,4 @@
.DS_Store
/.buildpath
/.project
/.settings/

View File

@ -1,7 +0,0 @@
---
Name: docs
After: framework/routes#coreroutes
---
SilverStripe\Control\Director:
rules:
dev/docs//$Action/$ID/$OtherID: SilverStripe\DocsViewer\Controllers\DocumentationViewer

View File

@ -335,6 +335,7 @@ class DocumentationPage extends ViewableData
//
// get the text up to the first empty line
$extPattern = "/^(.+)\n\r*\n/Uis";
$block = [];
$matches = preg_match($extPattern, $md, $block);
if ($matches && $block[1]) {

View File

@ -1,19 +1,19 @@
<div id="documentation-page" class="box">
<% if VersionWarning %>
<% include DocumentationVersion_warning Version=$Entity.Version %>
<% include SilverStripe\\DocsViewer\\Controllers\\DocumentationVersion_warning Version=$Entity.Version %>
<% end_if %>
<% include DocumentationTableContents %>
<% include SilverStripe\\DocsViewer\\Controllers\\DocumentationTableContents %>
$Content.RAW
<% include DocumentationNextPrevious %>
<% include SilverStripe\\DocsViewer\\Controllers\\DocumentationNextPrevious %>
<% if EditLink %>
<% include DocumentationEditLink %>
<% include SilverStripe\\DocsViewer\\Controllers\\DocumentationEditLink %>
<% end_if %>
<% include DocumentationComments %>
<% include SilverStripe\\DocsViewer\\Controllers\\DocumentationComments %>
</div>