From 95a2da04fbb1c7b3dda8b31c0fc138a3fe9c12ed Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 11 Feb 2007 18:06:42 +0000 Subject: [PATCH] design improvements --- lam/lib/lists.inc | 70 +++++++++++++++++++++++++++-------------- lam/lib/types/group.inc | 2 -- lam/lib/types/user.inc | 11 ++----- 3 files changed, 48 insertions(+), 35 deletions(-) diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc index 59b8fecb..665d42f6 100644 --- a/lam/lib/lists.inc +++ b/lam/lib/lists.inc @@ -121,6 +121,9 @@ class lamList { echo ("
type . "&norefresh=true\" method=\"post\">\n"); // draw account list if accounts were found if (sizeof($filteredEntries) > 0) { + // buttons + $this->listPrintButtons(false); + echo ("
\n"); // navigation bar $this->listDrawNavigationBar(sizeof($filteredEntries)); echo ("
\n"); @@ -128,22 +131,24 @@ class lamList { $this->listPrintTableHeader(); // account table body $this->listPrintTableBody($filteredEntries); + echo ("
\n"); // navigation bar $this->listDrawNavigationBar(sizeof($filteredEntries)); echo ("
\n"); - // print combobox with possible sub-DNs - $this->listShowOUSelection(); - // buttons - $this->listPrintButtons(false); + // other options + $this->listPrintAdditionalOptions(); + // PDF bar + $this->listPrintPDFButtons(); } else { + // buttons + $this->listPrintButtons(true); + echo ("
\n"); // account table head $this->listPrintTableHeader(); echo "
\n"; - // print combobox with possible sub-DNs - $this->listShowOUSelection(); - echo ("
\n"); - $this->listPrintButtons(true); + // other options + $this->listPrintAdditionalOptions(); } echo ("
\n"); echo "\n"; @@ -405,8 +410,6 @@ class lamList { "" . _("Select all") . "\n"; echo "\n"; echo (""); - - echo ("
"); } /** @@ -481,7 +484,6 @@ class lamList { */ function listShowOUSelection() { if (sizeof($this->possibleSuffixes) > 1) { - echo ("

\n"); echo ("" . _("Suffix") . ": "); echo ("\n"); echo ("type . "\" type=\"submit\" name=\"refresh\" value=\"" . _("Change suffix") . "\">"); - echo ("

\n"); } } @@ -502,23 +503,37 @@ class lamList { * @param boolean $createOnly true if only the create button should be displayed */ function listPrintButtons($createOnly) { + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; + echo "
\n"; // add/delete/PDF buttons echo ("type . "\" type=\"submit\" name=\"new\" value=\"" . $this->labels['newEntry'] . "\">\n"); if (!$createOnly) { echo ("type . "\" type=\"submit\" name=\"del\" value=\"" . $this->labels['deleteEntry'] . "\">\n"); - echo ("


\n"); - echo "
type . "edit\">PDF\n"; - echo ("" . _('PDF structure') . ":      \n"; - echo ("labels['createPDF'] . "\">\n"); - echo " "; - echo ("labels['createPDFAll'] . "\">\n"); - echo "
"; } + echo "
\n"; + $this->listShowOUSelection(); + echo "
\n"; + } + + /** + * Prints the PDF button bar. + */ + function listPrintPDFButtons() { + echo "
type . "edit\">PDF\n"; + echo ("" . _('PDF structure') . ":      \n"; + echo ("labels['createPDF'] . "\">\n"); + echo " "; + echo ("labels['createPDFAll'] . "\">\n"); + echo "
"; } /** @@ -661,6 +676,13 @@ class lamList { // generate list of possible suffixes $this->possibleSuffixes = $_SESSION['ldap']->search_units($_SESSION["config"]->get_Suffix($this->type)); } + + /** + * Prints additional option fields for specific object types. + */ + function listPrintAdditionalOptions() { + // may be used by subclasses + } } diff --git a/lam/lib/types/group.inc b/lam/lib/types/group.inc index ea27cd28..35a4761a 100644 --- a/lam/lib/types/group.inc +++ b/lam/lib/types/group.inc @@ -182,8 +182,6 @@ class lamGroupList extends lamList { "" . _("Select all") . "\n"; echo "\n"; echo (""); - - echo ("
"); } } diff --git a/lam/lib/types/user.inc b/lam/lib/types/user.inc index b05e1c10..d3ddeba9 100644 --- a/lam/lib/types/user.inc +++ b/lam/lib/types/user.inc @@ -218,16 +218,12 @@ class lamUserList extends lamList { "" . _("Select all") . "\n"; echo "\n"; echo (""); - - echo ("
"); } /** - * Prints the create, delete and PDF buttons. - * - * @param boolean $createOnly true if only the create button should be displayed + * Prints additional option fields for specific object types. */ - function listPrintButtons($createOnly) { + function listPrintAdditionalOptions() { // show translate GID to group name box if there is a column with gidnumber if (in_array("gidnumber", $this->attrArray)) { echo "

\n"; @@ -239,9 +235,6 @@ class lamUserList extends lamList { echo ("  type . "\" type=\"submit\" name=\"apply_trans_primary\" value=\"" . _("Apply") . "\">"); echo "

\n"; } - - echo ("

 

\n"); - parent::listPrintButtons($createOnly); } }