[TASK] Use ModuleTemplate API for EXT:aboutmodules 76/43776/5
authorMathias Schreiber <mathias.schreiber@wmdb.de>
Sun, 4 Oct 2015 13:47:17 +0000 (15:47 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 8 Oct 2015 20:19:03 +0000 (22:19 +0200)
Releases: master
Resolves: #70351
Change-Id: Ib0352cc4b4035b2c237f12fac4e4f1ac664cb2f5
Reviewed-on: http://review.typo3.org/43776
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/aboutmodules/Classes/Controller/ModulesController.php
typo3/sysext/aboutmodules/Resources/Private/Layouts/Default.html
typo3/sysext/aboutmodules/Resources/Private/Templates/Modules/Index.html

index 81d707d..4f81226 100644 (file)
@@ -15,10 +15,13 @@ namespace TYPO3\CMS\Aboutmodules\Controller;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Backend\View\BackendTemplateView;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
+use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\Utility\PathUtility;
 use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
+use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
 use TYPO3\CMS\Lang\LanguageService;
 
 /**
 use TYPO3\CMS\Lang\LanguageService;
 
 /**
@@ -36,13 +39,33 @@ class ModulesController extends ActionController {
        protected $languageService;
 
        /**
        protected $languageService;
 
        /**
+        * BackendTemplateView Container
+        *
+        * @var BackendTemplateView
+        */
+       protected $defaultViewObjectName = BackendTemplateView::class;
+
+       /**
         * @param LanguageService $languageService Language Service to inject
         */
        public function __construct(LanguageService $languageService = NULL) {
         * @param LanguageService $languageService Language Service to inject
         */
        public function __construct(LanguageService $languageService = NULL) {
+               parent::__construct();
                $this->languageService = $languageService ?: $GLOBALS['LANG'];
        }
 
        /**
                $this->languageService = $languageService ?: $GLOBALS['LANG'];
        }
 
        /**
+        * Set up the doc header properly here
+        *
+        * @param ViewInterface $view
+        */
+       protected function initializeView(ViewInterface $view) {
+               /** @var BackendTemplateView $view */
+               parent::initializeView($view);
+               // Disable Path
+               $view->getModuleTemplate()->getDocHeaderComponent()->setMetaInformation([]);
+       }
+
+       /**
         * Show general information and the installed modules
         *
         * @return void
         * Show general information and the installed modules
         *
         * @return void
index c9725aa..615d84a 100644 (file)
@@ -1,12 +1,2 @@
-<f:be.container includeCssFiles="{0: '{f:uri.resource(path:\'Css/styles.css\')}'}">
-       <div id="typo3-docheader">
-               <div class="typo3-docheader-functions">&nbsp;</div>
-               <div class="typo3-docheader-buttons">&nbsp;</div>
-       </div>
-
-       <div id="typo3-docbody">
-               <div id="typo3-inner-docbody" class="typo3-aboutmodules-inner-docbody">
-                       <f:render section="Content" />
-               </div>
-       </div>
-</f:be.container>
\ No newline at end of file
+<f:be.pageRenderer includeCssFiles="{0: '{f:uri.resource(path:\'Css/styles.css\')}'}" />
+<f:render section="Content" />
\ No newline at end of file
index 3fc8d8f..571a608 100644 (file)
@@ -1,78 +1,80 @@
 <f:layout name="Default" />
 
 <f:section name="Content">
 <f:layout name="Default" />
 
 <f:section name="Content">
-       <h1>TYPO3 CMS {TYPO3Version}<br />
-               <f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:introtext" />
-       </h1>
+       <div class="typo3-aboutmodules-inner-docbody">
+               <h1>TYPO3 CMS {TYPO3Version}<br />
+                       <f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:introtext" />
+               </h1>
 
 
-       <p class="lead">
-               <f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:introtext2" />
-       </p>
+               <p class="lead">
+                       <f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:introtext2" />
+               </p>
 
 
-       {warningMessages -> f:format.raw()}
+               {warningMessages -> f:format.raw()}
 
 
-       <f:for each="{modules}" as="mainModule">
-               <f:if condition="{mainModule.subModules}">
-                       <h2>{mainModule.label}</h2>
-                       <div class="container-fuid">
-                               <div class="row">
-                                       <f:for each="{mainModule.subModules}" as="subModule" iteration="subModuleIterator">
-                                               <div class="col-xs-12 col-sm-6">
-                                                       <div class="submodule media clearfix">
-                                                               <a
-                                                                       href="#"
-                                                                       onclick="top.goToModule('{mainModule.name}_{subModule.name}'); return false;"
-                                                                       title="{subModule.shortDescription}"
-                                                                       class="pull-left"
-                                                               >
-                                                                       <span class="typo3-app-icon">
-                                                                               <span>
+               <f:for each="{modules}" as="mainModule">
+                       <f:if condition="{mainModule.subModules}">
+                               <h2>{mainModule.label}</h2>
+                               <div class="container-fuid">
+                                       <div class="row">
+                                               <f:for each="{mainModule.subModules}" as="subModule" iteration="subModuleIterator">
+                                                       <div class="col-xs-12 col-sm-6">
+                                                               <div class="submodule media clearfix">
+                                                                       <a
+                                                                               href="#"
+                                                                               onclick="top.goToModule('{mainModule.name}_{subModule.name}'); return false;"
+                                                                               title="{subModule.shortDescription}"
+                                                                               class="pull-left"
+                                                                       >
+                                                                               <span class="typo3-app-icon">
                                                                                        <span>
                                                                                        <span>
-                                                                                               <img src="../{subModule.icon}" alt="{subModule.label}" class="media-object" />
+                                                                                               <span>
+                                                                                                       <img src="../{subModule.icon}" alt="{subModule.label}" class="media-object" />
+                                                                                               </span>
                                                                                        </span>
                                                                                </span>
                                                                                        </span>
                                                                                </span>
-                                                                       </span>
-                                                               </a>
+                                                                       </a>
 
 
-                                                               <div class="media-body">
-                                                                       <strong>
-                                                                               <a
-                                                                                       href="#"
-                                                                                       onclick="top.goToModule('{mainModule.name}_{subModule.name}'); return false;"
-                                                                                       title="{subModule.shortDescription}"
-                                                                                       >{subModule.label}</a>
-                                                                       </strong><br>
+                                                                       <div class="media-body">
+                                                                               <strong>
+                                                                                       <a
+                                                                                               href="#"
+                                                                                               onclick="top.goToModule('{mainModule.name}_{subModule.name}'); return false;"
+                                                                                               title="{subModule.shortDescription}"
+                                                                                               >{subModule.label}</a>
+                                                                               </strong><br>
 
 
-                                                                       <f:if condition="{subModule.shortDescription}">
-                                                                               <small class="text-muted">{subModule.shortDescription}</small><br>
-                                                                       </f:if>
+                                                                               <f:if condition="{subModule.shortDescription}">
+                                                                                       <small class="text-muted">{subModule.shortDescription}</small><br>
+                                                                               </f:if>
 
 
-                                                                       {subModule.longDescription -> f:format.raw()}
+                                                                               {subModule.longDescription -> f:format.raw()}
+                                                                       </div>
                                                                </div>
                                                        </div>
                                                                </div>
                                                        </div>
-                                               </div>
 
 
-                                               <f:if condition="{subModuleIterator.isEven}">
-                                                       <f:if condition="{subModuleIterator.isLast} == 0">
-                                                               </div><div class="row">
+                                                       <f:if condition="{subModuleIterator.isEven}">
+                                                               <f:if condition="{subModuleIterator.isLast} == 0">
+                                                                       </div><div class="row">
+                                                               </f:if>
                                                        </f:if>
                                                        </f:if>
-                                               </f:if>
-                                       </f:for>
+                                               </f:for>
+                                       </div>
                                </div>
                                </div>
-                       </div>
-               </f:if>
-       </f:for>
+                       </f:if>
+               </f:for>
 
 
-       <p class="end-text text-info">
-               <em>
-                       (<f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:endText" />)
-               </em>
-       </p>
+               <p class="end-text text-info">
+                       <em>
+                               (<f:translate key="LLL:EXT:lang/locallang_alt_intro.xlf:endText" />)
+                       </em>
+               </p>
 
 
-       <p>
-               <small>
-                       {copyRightNotice -> f:format.raw()}
-               </small>
-       </p>
+               <p>
+                       <small>
+                               {copyRightNotice -> f:format.raw()}
+                       </small>
+               </p>
 
 
-</f:section>
+       </div>
+</f:section>
\ No newline at end of file