[TASK] Show headlines only if sub modules are available 15/41915/3
authorGeorg Ringer <georg.ringer@gmail.com>
Fri, 24 Jul 2015 05:56:55 +0000 (07:56 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 27 Jul 2015 07:34:29 +0000 (09:34 +0200)
EXT:aboutmodules should only show the headlines if submodules
are actually available.

Change-Id: I7d1c0c9f9a2d5ae6aefd121a34af388179ae0a1a
Resolves: #68498
Releases: master
Reviewed-on: http://review.typo3.org/41915
Reviewed-by: Daniel Goerz <ervaude@gmail.com>
Tested-by: Daniel Goerz <ervaude@gmail.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/aboutmodules/Resources/Private/Templates/Modules/Index.html

index 6b95447..3fc8d8f 100644 (file)
        {warningMessages -> f:format.raw()}
 
        <f:for each="{modules}" as="mainModule">
-               <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: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>
-                                                                                       <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>
-                                                       </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>
 
-                                       <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:for>
+                                       </f:for>
+                               </div>
                        </div>
-               </div>
+               </f:if>
        </f:for>
 
        <p class="end-text text-info">