[TASK] Display count of failed error checks in install tool menu 80/23380/3
authorStefan Rotsch <stefan.rotsch@aoemedia.de>
Tue, 27 Aug 2013 19:12:46 +0000 (21:12 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 27 Aug 2013 20:49:11 +0000 (22:49 +0200)
With displaying the count of failed error checks in the navigation menu
(like the count of unread messages in an email inbox) a user will more
likely enter the "System environment" section of the install tool and
take care about the found errors and warnings.

Change-Id: I3d9b628b428da13992c3dc1e7e5ab6beaeda5ce1
Resolves: #51410
Releases: 6.2
Reviewed-on: https://review.typo3.org/23380
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/install/Classes/Controller/Action/AbstractAction.php
typo3/sysext/install/Resources/Private/Partials/Action/Common/Left.html
typo3/sysext/install/Resources/Public/Stylesheets/Action/Common/Install.css

index 6f9c3a4..43e0254 100644 (file)
@@ -74,6 +74,12 @@ abstract class AbstractAction {
         * @return string content
         */
        protected function initializeHandle() {
+                       // Count of failed status checks will be displayed in the left navigation menu
+               $statusCheck = $this->objectManager->get('TYPO3\\CMS\\Install\\SystemEnvironment\\Check');
+               $statusObjects = $statusCheck->getStatus();
+               $statusUtility = $this->objectManager->get('TYPO3\\CMS\\Install\\Status\\StatusUtility');
+               $statusObjectsWithErrorStatus = $statusUtility->filterBySeverity($statusObjects, 'error');
+
                $viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
                $controllerActionDirectoryName = ucfirst($this->controller);
                $mainTemplate = ucfirst($this->action);
@@ -89,7 +95,8 @@ abstract class AbstractAction {
                        ->assign('context', $this->getContext())
                        ->assign('messages', $this->messages)
                        ->assign('typo3Version', TYPO3_version)
-                       ->assign('siteName', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']);
+                       ->assign('siteName', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])
+                       ->assign('statusObjectsWithErrorStatus', $statusObjectsWithErrorStatus);
        }
 
        /**
index ccca144..e55e545 100644 (file)
@@ -13,6 +13,9 @@
                <li id="t3-install-menu-systemEnvironment" class="{f:if(condition:'{action} == \'systemEnvironment\'', then:'act')}">
                        <a href="Install.php?install[action]=systemEnvironment&install[context]={context}&install[controller]=tool">
                                System environment
+                               <f:if condition="{statusObjectsWithErrorStatus}">
+                                       <span class="t3-install-menu-errorCount"><f:count>{statusObjectsWithErrorStatus}</f:count></span>
+                               </f:if>
                        </a>
                </li>
                <li id="t3-install-menu-folderStructure" class="{f:if(condition:'{action} == \'folderStructure\'', then:'act')}">
index 4e650e8..c415fcd 100755 (executable)
@@ -340,6 +340,18 @@ button span.t3-install-form-button-icon-negative {
        background-image: url('../../../Images/Menu/Logout.gif');
 }
 
+#t3-install-menu .t3-install-menu-errorCount {
+       background-color: #dc4c42;
+       color:#ffffff;
+       font-weight: normal;
+       margin: 0 0.2em 0 0;
+       float: right;
+       padding: 0 0.6em 0 0.6em;
+       -webkit-border-radius: 1em;
+       -moz-border-radius: 1em;
+       border-radius: 1em;
+}
+
 #t3-install-links {
        margin: 2em 0 0 0.8em;
        padding: 0;