Fixed Follow up for bug #6825: TCEforms: Icon for empty palettes should not be displa...
authorBenni Mack <benni.mack@typo3.org>
Mon, 11 Feb 2008 20:50:12 +0000 (20:50 +0000)
committerBenni Mack <benni.mack@typo3.org>
Mon, 11 Feb 2008 20:50:12 +0000 (20:50 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3148 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index 705d601..e43d30c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2008-02-11  Benjamin Mack  <mack@xnos.org>
 
+       * Fixed Follow up for bug #6825: TCEforms: Icon for empty palettes should not be displayed -- palettes fields were not shown
        * Fixed Bug #7463: missing descriptions in backend user editor (Thanks to Steffen Kamper, followup to Issue #6921)
 
 2008-02-11  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
index e4a4e5b..d9e23eb 100755 (executable)
@@ -744,7 +744,7 @@ class t3lib_TCEforms        {
         * @param       string          Optional Link text for activating a palette (when palettes does not have another form element to belong to).
         * @return      string          HTML code.
         */
-       function getPaletteFields($table,$row,$palette,$header='',$itemList='',$collapsedHeader='')     {
+       function getPaletteFields($table,$row,$palette,$header='',$itemList='',$collapsedHeader=NULL)   {
                if (!$this->doPrintPalette)     {
                        return '';
                }
@@ -760,9 +760,19 @@ class t3lib_TCEforms       {
                                                $this->palFieldTemplateHeader
                                        );
                        }
+
                        $collapsed = $this->isPalettesCollapsed($table,$palette);
+                       
+                       $thePalIcon = '';
+                       if ($collapsed && $collapsedHeader !== NULL) {
+                               list($thePalIcon,) = $this->wrapOpenPalette('<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/options.gif','width="18" height="16"').' border="0" title="'.htmlspecialchars($this->getLL('l_moreOptions')).'" alt="" />',$table,$row,$palette,1);
+                               $thePalIcon = '<span style="margin-left: 20px;">' . $thePalIcon . $collapsedHeader . '</span>';
+                       }
+
+                       $paletteHtml = $this->wrapPaletteField($this->printPalette($parts), $table, $row ,$palette, $collapsed);
+                       
                        $out .= $this->intoTemplate(
-                                       array('PALETTE' => $this->wrapPaletteField($this->printPalette($parts), $table, $row ,$palette, $collapsed)),
+                                       array('PALETTE' => $thePalIcon . $paletteHtml),
                                        $this->palFieldTemplate
                                );
                }