Index: typo3/stylesheet.css
===================================================================
--- typo3/stylesheet.css (revision 5129)
+++ typo3/stylesheet.css (working copy)
@@ -1932,7 +1932,24 @@
width: 93%;
}
+div#typo3-dblist-pagination {
+ padding: 5px 0;
+ white-space: nowrap;
+}
+div#typo3-dblist-pagination img, div#typo3-dblist-pagination span.pageIndicator {
+ margin-right: 6px;
+}
+div#typo3-dblist-pagination img {
+ vertical-align: bottom;
+ padding-bottom: 2px;
+}
+div#typo3-dblist-pagination span.bar {
+ border-left: 1px solid #5485c3;
+ padding: 0 2px;
+}
+
+
/* - - - - - - - - - - - - - - - - - - - - -
Web > Template
Index: typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css
===================================================================
--- typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (revision 5129)
+++ typo3/sysext/t3skin/stylesheets/typo3-db-list-php.css (working copy)
@@ -78,7 +78,7 @@
border-right: 1px solid #d7d8e2;
padding-right: 0px;
}
-tr.fwd_rwd_nav td {
- padding: 4px 0;
+
+div#typo3-dblist-pagination img {
+ padding-bottom: 1px;
}
-
Index: typo3/sysext/lang/locallang_mod_web_list.xml
===================================================================
--- typo3/sysext/lang/locallang_mod_web_list.xml (revision 5129)
+++ typo3/sysext/lang/locallang_mod_web_list.xml (working copy)
@@ -51,6 +51,8 @@
+
+
Index: typo3/sysext/lang/locallang_common.xml
===================================================================
--- typo3/sysext/lang/locallang_common.xml (revision 5129)
+++ typo3/sysext/lang/locallang_common.xml (working copy)
@@ -23,11 +23,13 @@
+
+
Index: typo3/class.db_list_extra.inc
===================================================================
--- typo3/class.db_list_extra.inc (revision 5129)
+++ typo3/class.db_list_extra.inc (working copy)
@@ -520,14 +520,10 @@
$iOut = '';
$cc = 0;
+
foreach($accRows as $row) {
-
- // Forward/Backwards navigation links:
- list($flag,$code) = $this->fwd_rwd_nav($table);
- $iOut.=$code;
-
- // If render item, increment counter and call function
- if ($flag) {
+ // Render item row if counter < limit
+ if ($cc < $this->iLimit) {
$cc++;
$iOut.= $this->renderListRow($table,$row,$cc,$titleCol,$thumbsCol);
@@ -564,6 +560,12 @@
$this->eCounter++;
}
+ // Record navigation is added to the beginning and end of the table if in single table mode
+ if ($this->table) {
+ $pageNavigation = $this->renderListNavigation();
+ $iOut = $pageNavigation . $iOut . $pageNavigation;
+ }
+
// The header row for the table is now created:
$out.=$this->renderListHeader($table,$currentIdList);
}
@@ -892,11 +894,143 @@
return $this->addelement(1, $icon, $theData, ' class="c-headLine"', '');
}
+ /**
+ * Creates a page browser for tables with many records
+ *
+ * @return string Navigation HTML
+ *
+ * @author Dmitry Pikhno
+ * @author Christian Kuhn
+ */
+ protected function renderListNavigation() {
+ $totalPages = ceil($this->totalItems / $this->iLimit);
+ $content = '';
+ // Show page selector if not all records fit into one page
+ if ($totalPages > 1) {
+ $first = $previous = $next = $last = $reload = '';
+ $listURL = $this->listURL('', $this->table);
+ // 1 = first page
+ $currentPage = floor(($this->firstElementNumber + 1) / $this->iLimit) + 1;
+ // Compile first, previous, next, last and refresh buttons
+ if ($currentPage > 1) {
+ $labelFirst = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:first');
+ $first = '
+
backPath, 'gfx/control_first.gif')
+ . 'alt="' . $labelFirst . '" title="' . $labelFirst . '" />
+ ';
+ } else {
+ $first = '
backPath, 'gfx/control_first_disabled.gif') . 'alt="" title="" />';
+ }
+
+ if (($currentPage - 1) > 0) {
+ $labelPrevious = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:previous');
+
+ $previous = '
+
backPath, 'gfx/control_previous.gif')
+ . 'alt="' . $labelPrevious . '" title="' . $labelPrevious . '" />
+ ';
+ } else {
+ $previous = '
backPath, 'gfx/control_previous_disabled.gif') . 'alt="" title="" />';
+ }
+
+ if (($currentPage + 1) <= $totalPages) {
+ $labelNext = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:next');
+
+ $next = '
+
backPath, 'gfx/control_next.gif')
+ . 'alt="' . $labelNext . '" title="' . $labelNext . '" />
+ ';
+ } else {
+ $next = '
backPath, 'gfx/control_next_disabled.gif') . 'alt="" title="" />';
+ }
+
+ if ($currentPage != $totalPages) {
+ $labelLast = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:last');
+
+ $last = '
+
backPath, 'gfx/control_last.gif')
+ . 'alt="' . $labelLast . '" title="' . $labelLast . '" />
+ ';
+ } else {
+ $last = '
backPath, 'gfx/control_last_disabled.gif') . 'alt="" title="" />';
+ }
+
+ $reload = '
+
backPath, 'gfx/refresh_n.gif')
+ . 'alt="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:reload')
+ . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_common.xml:reload')
+ . '" />';
+
+ // Add js to traverse a page select input to a pointer value
+ $content = '
+
+';
+
+ $pageNumberInput = '
+
+ ';
+ $pageIndicator = ''
+ . sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:pageIndicator'), $pageNumberInput, $totalPages)
+ . '';
+
+ if ($this->totalItems > ($this->firstElementNumber + $this->iLimit)) {
+ $lastElementNumber = $this->firstElementNumber + $this->iLimit;
+ } else {
+ $lastElementNumber = $this->totalItems;
+ }
+ $rangeIndicator = ''
+ . sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:rangeIndicator'), $this->firstElementNumber + 1, $lastElementNumber)
+ . '';
+
+ $content .= '';
+ } // end of if pages > 1
+
+ $data = Array();
+ $titleColumn = $this->fieldArray[0];
+ $data[$titleColumn] = $content;
+
+ return ($this->addElement(1, '', $data));
+ }
+
+
+
+
+
+
/*********************************
*
* Rendering of various elements