[TASK] Proper template for EXT:cshmanual 33/25933/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 4 Dec 2013 07:15:04 +0000 (08:15 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 14 Jan 2014 08:06:06 +0000 (09:06 +0100)
Use the proper template mechanism and a toolbar for the cshmanual ext to
let it look like all other backend modules.

Change-Id: I6b1a4cfe036034d09caa71a8914eed359f2da930
Resolves: #54184
Releases: 6.2
Reviewed-on: https://review.typo3.org/25933
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php
typo3/sysext/cshmanual/Resources/Private/Templates/cshmanual.html [new file with mode: 0644]

index b8b300b..31b2265 100644 (file)
@@ -162,9 +162,6 @@ class HelpModuleController {
         * @todo Define visibility
         */
        public function main() {
-               // Start HTML output accumulation:
-               $GLOBALS['TBE_TEMPLATE']->divClass = 'typo3-view-help';
-               $this->content .= $GLOBALS['TBE_TEMPLATE']->startPage($GLOBALS['LANG']->getLL('title'));
                if ($this->field == '*') {
                        // If ALL fields is supposed to be shown:
                        $this->createGlossaryIndex();
@@ -177,9 +174,15 @@ class HelpModuleController {
                        // Render Table Of Contents if nothing else:
                        $this->content .= $this->render_TOC();
                }
-               // End page:
-               $this->content .= '<br/>';
-               $this->content .= $GLOBALS['TBE_TEMPLATE']->endPage();
+
+               $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
+               $this->doc->backPath = $GLOBALS['BACK_PATH'];
+               $this->doc->setModuleTemplate('EXT:cshmanual/Resources/Private/Templates/cshmanual.html');
+
+               $markers = array('CONTENT' => $this->content);
+
+               $this->content = $this->doc->moduleBody(array(), array(), $markers);
+               $this->content = $this->doc->render($GLOBALS['LANG']->getLL('title'), $this->content);
        }
 
        /**
diff --git a/typo3/sysext/cshmanual/Resources/Private/Templates/cshmanual.html b/typo3/sysext/cshmanual/Resources/Private/Templates/cshmanual.html
new file mode 100644 (file)
index 0000000..7c88a68
--- /dev/null
@@ -0,0 +1,28 @@
+<!-- ###FULLDOC### begin -->
+<div class="typo3-fullDoc">
+       <div id="typo3-docheader">
+               <div class="typo3-docheader-functions">
+                       <div class="left"></div>
+                       <div class="right"></div>
+               </div>
+               <div class="typo3-docheader-buttons">
+                       <div class="left">###BUTTONLIST_LEFT###</div>
+                       <div class="right">###BUTTONLIST_RIGHT###</div>
+               </div>
+       </div>
+
+       <div id="typo3-docbody">
+               <div id="typo3-inner-docbody">
+                       <div class="typo3-view-help">
+                               ###CONTENT###
+                       </div>
+               </div>
+       </div>
+</div>
+<!-- ###FULLDOC### end -->
+
+<!-- Grouping the icons on top -->
+
+<!-- ###BUTTON_GROUP_WRAP### -->
+<div class="buttongroup">###BUTTONS###</div>
+<!-- ###BUTTON_GROUP_WRAP### -->