[BUGFIX] Wrong colspan in DatabaseRecordList 48/27448/5
authorMarcin Sągol <kontakt@soee.pl>
Sat, 8 Feb 2014 11:54:22 +0000 (12:54 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 8 Feb 2014 18:19:41 +0000 (19:19 +0100)
If the List Module is in extended view, the colspan of the footer
is wrong if there are more than 20 records of a type.

Fix this by increasing the colspan with one if the List Module is
extended view.

Resolves: #55443
Releases: 6.2
Change-Id: I4c9a45cdab3d1c5267566663fbb6c7cbb702f32a
Reviewed-on: https://review.typo3.org/27448
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 8ccb204..c8f1322 100644 (file)
@@ -542,7 +542,8 @@ class DatabaseRecordList extends \TYPO3\CMS\Recordlist\RecordList\AbstractDataba
                                        if ($this->totalItems > $this->itemsLimitPerTable) {
                                                $countOnFirstPage = $this->totalItems > $this->itemsLimitSingleTable ? $this->itemsLimitSingleTable : $this->totalItems;
                                                $hasMore = $this->totalItems > $this->itemsLimitSingleTable;
                                        if ($this->totalItems > $this->itemsLimitPerTable) {
                                                $countOnFirstPage = $this->totalItems > $this->itemsLimitSingleTable ? $this->itemsLimitSingleTable : $this->totalItems;
                                                $hasMore = $this->totalItems > $this->itemsLimitSingleTable;
-                                               $iOut .= '<tr><td colspan="' . count($this->fieldArray) . '" style="padding:5px;">
+                                               $colspan = $this->showIcon ? count($this->fieldArray) + 1 : count($this->fieldArray);
+                                               $iOut .= '<tr><td colspan="' . $colspan . '" style="padding:5px;">
                                                                <a href="' . htmlspecialchars(($this->listURL() . '&table=' . rawurlencode($table))) . '">' . '<img' . IconUtility::skinImg($this->backPath, 'gfx/pildown.gif', 'width="14" height="14"') . ' alt="" />' . ' <i>[1 - ' . $countOnFirstPage . ($hasMore ? '+' : '') . ']</i></a>
                                                                </td></tr>';
                                        }
                                                                <a href="' . htmlspecialchars(($this->listURL() . '&table=' . rawurlencode($table))) . '">' . '<img' . IconUtility::skinImg($this->backPath, 'gfx/pildown.gif', 'width="14" height="14"') . ' alt="" />' . ' <i>[1 - ' . $countOnFirstPage . ($hasMore ? '+' : '') . ']</i></a>
                                                                </td></tr>';
                                        }