Added feature #15916: Display a link to list module on sysfolders when in page module...
authorSusanne Moog <typo3@susannemoog.de>
Wed, 17 Nov 2010 08:52:01 +0000 (08:52 +0000)
committerSusanne Moog <typo3@susannemoog.de>
Wed, 17 Nov 2010 08:52:01 +0000 (08:52 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9429 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/layout/db_layout.php
typo3/sysext/cms/layout/locallang.xml

index 66c504c..bb2ae44 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
 
        * Added feature #16284: Optimize stdWrap usage for TypoScript content element LOAD_REGISTER (Thanks to Jo Hasenau)
        * Added feature #16285: Optimize stdWrap usage for TypoScript content element RECORDS (Thanks to Jo Hasenau)
+       * Added feature #15916: Display a link to list module on sysfolders when in page module (Thanks to Georg Ringer)
 
 2010-11-17  Oliver Hader  <oliver@typo3.org>
 
index 16bfedd..e5002c2 100755 (executable)
@@ -554,6 +554,32 @@ class SC_db_layout {
                                $body = $this->renderListContent();     // All other listings
                        }
 
+                       // If page is a sysfolder
+                       if ($this->pageinfo['doktype'] == 254) {
+
+                                       // access to list module
+                               $moduleLoader = t3lib_div::makeInstance('t3lib_loadModules');
+                               $moduleLoader->load($GLOBALS['TBE_MODULES']);
+                               $modules = $moduleLoader->modules;
+
+                               if (is_array($modules['web']['sub']['list'])) {
+                                       $flashMessage = t3lib_div::makeInstance(
+                                               't3lib_FlashMessage',
+                                               '<p>' . $GLOBALS['LANG']->getLL('goToListModuleMessage') . '</p>
+                                                <br />
+                                                <p>' .
+                                                       t3lib_iconWorks::getSpriteIcon('actions-system-list-open') .
+                                                       '<a href="javascript:top.goToModule( \'web_list\',1);">' .
+                                                               $GLOBALS['LANG']->getLL('goToListModule') . '
+                                                       </a>
+                                                </p>',
+                                               '',
+                                               t3lib_FlashMessage::INFO
+                                       );
+                                       $body = $flashMessage->render() . $body;
+                               }
+                       }
+
 
                        if ($this->pageinfo['content_from_pid']) {
                                $contentPage = t3lib_BEfunc::getRecord('pages', intval($this->pageinfo['content_from_pid']));
@@ -1386,4 +1412,4 @@ $SOBE->clearCache();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>
index 6181611..a3fb0dc 100755 (executable)
@@ -83,6 +83,8 @@
                        <label index="pI_hits24hours">Last 24 hours</label>
                        <label index="pI_hits10days">Last 10 days</label>
                        <label index="content_from_pid_title">Page uses content from this page: %s</label>
+                       <label index="goToListModule">Go to list module</label>
+                       <label index="goToListModuleMessage">The current page is of the type "Sysfolder". Sysfolders usually don't contain content elements but are used for collecting other types of records in a single folder.</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file