design improvements
This commit is contained in:
parent
3355402621
commit
95a2da04fb
|
@ -121,6 +121,9 @@ class lamList {
|
||||||
echo ("<form action=\"list.php?type=" . $this->type . "&norefresh=true\" method=\"post\">\n");
|
echo ("<form action=\"list.php?type=" . $this->type . "&norefresh=true\" method=\"post\">\n");
|
||||||
// draw account list if accounts were found
|
// draw account list if accounts were found
|
||||||
if (sizeof($filteredEntries) > 0) {
|
if (sizeof($filteredEntries) > 0) {
|
||||||
|
// buttons
|
||||||
|
$this->listPrintButtons(false);
|
||||||
|
echo ("<hr color=\"#999999\">\n");
|
||||||
// navigation bar
|
// navigation bar
|
||||||
$this->listDrawNavigationBar(sizeof($filteredEntries));
|
$this->listDrawNavigationBar(sizeof($filteredEntries));
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
|
@ -128,22 +131,24 @@ class lamList {
|
||||||
$this->listPrintTableHeader();
|
$this->listPrintTableHeader();
|
||||||
// account table body
|
// account table body
|
||||||
$this->listPrintTableBody($filteredEntries);
|
$this->listPrintTableBody($filteredEntries);
|
||||||
|
echo ("<br>\n");
|
||||||
// navigation bar
|
// navigation bar
|
||||||
$this->listDrawNavigationBar(sizeof($filteredEntries));
|
$this->listDrawNavigationBar(sizeof($filteredEntries));
|
||||||
echo ("<br>\n");
|
echo ("<br>\n");
|
||||||
// print combobox with possible sub-DNs
|
// other options
|
||||||
$this->listShowOUSelection();
|
$this->listPrintAdditionalOptions();
|
||||||
// buttons
|
// PDF bar
|
||||||
$this->listPrintButtons(false);
|
$this->listPrintPDFButtons();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// buttons
|
||||||
|
$this->listPrintButtons(true);
|
||||||
|
echo ("<hr>\n");
|
||||||
// account table head
|
// account table head
|
||||||
$this->listPrintTableHeader();
|
$this->listPrintTableHeader();
|
||||||
echo "</table><br>\n";
|
echo "</table><br>\n";
|
||||||
// print combobox with possible sub-DNs
|
// other options
|
||||||
$this->listShowOUSelection();
|
$this->listPrintAdditionalOptions();
|
||||||
echo ("<br>\n");
|
|
||||||
$this->listPrintButtons(true);
|
|
||||||
}
|
}
|
||||||
echo ("</form>\n");
|
echo ("</form>\n");
|
||||||
echo "</body></html>\n";
|
echo "</body></html>\n";
|
||||||
|
@ -405,8 +410,6 @@ class lamList {
|
||||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo ("</table>");
|
echo ("</table>");
|
||||||
|
|
||||||
echo ("<br>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -481,7 +484,6 @@ class lamList {
|
||||||
*/
|
*/
|
||||||
function listShowOUSelection() {
|
function listShowOUSelection() {
|
||||||
if (sizeof($this->possibleSuffixes) > 1) {
|
if (sizeof($this->possibleSuffixes) > 1) {
|
||||||
echo ("<p align=\"left\">\n");
|
|
||||||
echo ("<b>" . _("Suffix") . ": </b>");
|
echo ("<b>" . _("Suffix") . ": </b>");
|
||||||
echo ("<select class=\"" . $this->type . "\" size=1 name=\"suffix\">\n");
|
echo ("<select class=\"" . $this->type . "\" size=1 name=\"suffix\">\n");
|
||||||
for ($i = 0; $i < sizeof($this->possibleSuffixes); $i++) {
|
for ($i = 0; $i < sizeof($this->possibleSuffixes); $i++) {
|
||||||
|
@ -492,7 +494,6 @@ class lamList {
|
||||||
}
|
}
|
||||||
echo ("</select>\n");
|
echo ("</select>\n");
|
||||||
echo ("<input class=\"" . $this->type . "\" type=\"submit\" name=\"refresh\" value=\"" . _("Change suffix") . "\">");
|
echo ("<input class=\"" . $this->type . "\" type=\"submit\" name=\"refresh\" value=\"" . _("Change suffix") . "\">");
|
||||||
echo ("</p>\n");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -502,23 +503,37 @@ class lamList {
|
||||||
* @param boolean $createOnly true if only the create button should be displayed
|
* @param boolean $createOnly true if only the create button should be displayed
|
||||||
*/
|
*/
|
||||||
function listPrintButtons($createOnly) {
|
function listPrintButtons($createOnly) {
|
||||||
|
echo "<table border=0 width=\"100%\">\n";
|
||||||
|
echo "<tr>\n";
|
||||||
|
echo "<td align=\"left\">\n";
|
||||||
// add/delete/PDF buttons
|
// add/delete/PDF buttons
|
||||||
echo ("<input class=\"" . $this->type . "\" type=\"submit\" name=\"new\" value=\"" . $this->labels['newEntry'] . "\">\n");
|
echo ("<input class=\"" . $this->type . "\" type=\"submit\" name=\"new\" value=\"" . $this->labels['newEntry'] . "\">\n");
|
||||||
if (!$createOnly) {
|
if (!$createOnly) {
|
||||||
echo ("<input class=\"" . $this->type . "\" type=\"submit\" name=\"del\" value=\"" . $this->labels['deleteEntry'] . "\">\n");
|
echo ("<input class=\"" . $this->type . "\" type=\"submit\" name=\"del\" value=\"" . $this->labels['deleteEntry'] . "\">\n");
|
||||||
echo ("<br><br><br>\n");
|
|
||||||
echo "<fieldset class=\"" . $this->type . "edit\"><legend><b>PDF</b></legend>\n";
|
|
||||||
echo ("<b>" . _('PDF structure') . ":</b> <select name=\"pdf_structure\">\n");
|
|
||||||
$pdf_structures = getPDFStructureDefinitions($this->type);
|
|
||||||
foreach($pdf_structures as $pdf_structure) {
|
|
||||||
echo "<option " . (($pdf_structure == 'default') ? " selected" : "") . ">" . $pdf_structure . "</option>";
|
|
||||||
}
|
|
||||||
echo "</select> \n";
|
|
||||||
echo ("<input type=\"submit\" name=\"pdf\" value=\"" . $this->labels['createPDF'] . "\">\n");
|
|
||||||
echo " ";
|
|
||||||
echo ("<input type=\"submit\" name=\"pdf_all\" value=\"" . $this->labels['createPDFAll'] . "\">\n");
|
|
||||||
echo "</fieldset>";
|
|
||||||
}
|
}
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "<td align=\"right\">\n";
|
||||||
|
$this->listShowOUSelection();
|
||||||
|
echo "</td>\n";
|
||||||
|
echo "</tr>\n";
|
||||||
|
echo "</table>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prints the PDF button bar.
|
||||||
|
*/
|
||||||
|
function listPrintPDFButtons() {
|
||||||
|
echo "<fieldset class=\"" . $this->type . "edit\"><legend><b>PDF</b></legend>\n";
|
||||||
|
echo ("<b>" . _('PDF structure') . ":</b> <select name=\"pdf_structure\">\n");
|
||||||
|
$pdf_structures = getPDFStructureDefinitions($this->type);
|
||||||
|
foreach($pdf_structures as $pdf_structure) {
|
||||||
|
echo "<option " . (($pdf_structure == 'default') ? " selected" : "") . ">" . $pdf_structure . "</option>";
|
||||||
|
}
|
||||||
|
echo "</select> \n";
|
||||||
|
echo ("<input type=\"submit\" name=\"pdf\" value=\"" . $this->labels['createPDF'] . "\">\n");
|
||||||
|
echo " ";
|
||||||
|
echo ("<input type=\"submit\" name=\"pdf_all\" value=\"" . $this->labels['createPDFAll'] . "\">\n");
|
||||||
|
echo "</fieldset>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -662,6 +677,13 @@ class lamList {
|
||||||
$this->possibleSuffixes = $_SESSION['ldap']->search_units($_SESSION["config"]->get_Suffix($this->type));
|
$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
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -182,8 +182,6 @@ class lamGroupList extends lamList {
|
||||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo ("</table>");
|
echo ("</table>");
|
||||||
|
|
||||||
echo ("<br>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -218,16 +218,12 @@ class lamUserList extends lamList {
|
||||||
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
"<font color=\"black\"><b>" . _("Select all") . "</b></font></a></td>\n";
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
echo ("</table>");
|
echo ("</table>");
|
||||||
|
|
||||||
echo ("<br>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prints the create, delete and PDF buttons.
|
* Prints additional option fields for specific object types.
|
||||||
*
|
|
||||||
* @param boolean $createOnly true if only the create button should be displayed
|
|
||||||
*/
|
*/
|
||||||
function listPrintButtons($createOnly) {
|
function listPrintAdditionalOptions() {
|
||||||
// show translate GID to group name box if there is a column with gidnumber
|
// show translate GID to group name box if there is a column with gidnumber
|
||||||
if (in_array("gidnumber", $this->attrArray)) {
|
if (in_array("gidnumber", $this->attrArray)) {
|
||||||
echo "<p align=\"left\">\n";
|
echo "<p align=\"left\">\n";
|
||||||
|
@ -239,9 +235,6 @@ class lamUserList extends lamList {
|
||||||
echo (" <input class=\"" . $this->type . "\" type=\"submit\" name=\"apply_trans_primary\" value=\"" . _("Apply") . "\">");
|
echo (" <input class=\"" . $this->type . "\" type=\"submit\" name=\"apply_trans_primary\" value=\"" . _("Apply") . "\">");
|
||||||
echo "</p>\n";
|
echo "</p>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
echo ("<p> </p>\n");
|
|
||||||
parent::listPrintButtons($createOnly);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue