From 6938ce0a75476ede21403d93e429433c68e7b57d Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 11 Mar 2015 21:41:37 +0000 Subject: [PATCH] routeSQL : Allow the user to define which Area is write in each bar (top or bottom) and left or right git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2014 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- routeSQL.php | 67 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/routeSQL.php b/routeSQL.php index 5cbebfd..457b68d 100644 --- a/routeSQL.php +++ b/routeSQL.php @@ -25,6 +25,18 @@ class routeSQL public $textEdit = ""; /** enable internal CSS */ public $enableInternalCSS = true; + /** Definition of the position in top bar at left + Allowed : addNew numberEntryByDisplay search informations paginator */ + public $topBarLeft = array ("addNew", "numberEntryByDisplay"); + /** Definition of the position in top bar at right + Allowed : addNew numberEntryByDisplay search informations paginator */ + public $topBarRight = array ("search"); + /** Definition of the position in bottom bar at left + Allowed : addNew numberEntryByDisplay search informations paginator */ + public $bottomBarLeft = array ("informations"); + /** Definition of the position in bottom bar at right + Allowed : addNew numberEntryByDisplay search informations paginator */ + public $bottomBarRight = array ("paginator"); /** The cookie path used to determine the old parameters It is automatically generated with the URL */ public $path = ""; @@ -110,13 +122,13 @@ class routeSQL $nbentries is the total number of elements num is the number of elements displayed by page page is the page to display */ - private function paginator ($nbentries, $page, $num, $search) + private function paginatorArea ($nbentries, $page, $num, $search) { // The maximum of links available in the paginator $maxClickPaginator = 10; $prePage = false; $postPage = false; - $content = "
\n"; + $content = "
\n"; $displayedNumbers = 0; for ($i = 1 ; $i < (1+$nbentries/($num)) ; $i++) { @@ -157,7 +169,7 @@ class routeSQL /** Display the actions buttons outside of the table (actually, juste the 'Add new entry' button */ - private function externalActions () + private function addNewArea ($nbentries, $page, $num, $search) { $content = ""; if ($this->displayActions) @@ -172,11 +184,11 @@ class routeSQL } /** Display the select list to choose the number of displayed entries */ - private function listNumberDisplayedEntries ($num) + private function numberEntryByDisplayArea ($nbentries, $page, $num, $search) { $route = new route (); $content = ""; - $content .= "
\n"; + $content .= "
\n"; $content .= "
\n"; $content .= "