Fixed bug #10919: Hide View-icon in listview with doktypes 254 and 255
authorSteffen Kamper <info@sk-typo3.de>
Sun, 19 Apr 2009 10:32:59 +0000 (10:32 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 19 Apr 2009 10:32:59 +0000 (10:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5329 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.db_list_extra.inc

index f746602..1ba01b2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-04-19  Steffen Kamper  <info@sk-typo3.de>
+
+       * Fixed bug #10919: Hide View-icon in listview with doktypes 254 and 255
+
 2009-04-17  Steffen Kamper  <info@sk-typo3.de>
 
        * Fixed bug #10827: Hide "Save and View"-button when editing a content-element
index 1ff42e5..3cc532c 100644 (file)
@@ -157,11 +157,20 @@ class localRecordList extends recordList {
                }
 
                if (isset($this->id)) {
-                               // View
-                       $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $this->backPath, t3lib_BEfunc::BEgetRootLine($this->id))) . '">' .
+                               // View  Exclude doktypes 254,255 Configuration: mod.web_list.noViewWithDokTypes = 254,255
+                       if (isset($GLOBALS['SOBE']->modTSconfig['properties']['noViewWithDokTypes'])) {
+                               $noViewDokTypes = t3lib_div::trimExplode(',', $GLOBALS['SOBE']->modTSconfig['properties']['noViewWithDokTypes'], true);
+                       } else {
+                                       //default exclusion: doktype 254, 255
+                               $noViewDokTypes = array('254', '255');
+                       }       
+                               
+                       if (!in_array($this->pageRow['doktype'], $noViewDokTypes)) {
+                               $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $this->backPath, t3lib_BEfunc::BEgetRootLine($this->id))) . '">' .
                                                        '<img' . t3lib_iconWorks::skinImg($this->backPath, 'gfx/zoom.gif') . ' title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '" alt="" />' .
                                                        '</a>';
-
+                       }
+                       
                                // New record
                        if (!$GLOBALS['SOBE']->modTSconfig['properties']['noCreateRecordsLink']) {
                                $buttons['new_record'] = '<a href="#" onclick="' . htmlspecialchars('return jumpExt(\'' . $this->backPath . 'db_new.php?id=' . $this->id . '\');') . '">' .