diff --git a/lam/lib/lists.inc b/lam/lib/lists.inc
index e9fdbd1f..571a39e1 100644
--- a/lam/lib/lists.inc
+++ b/lam/lib/lists.inc
@@ -107,7 +107,6 @@ function listDrawNavigationBar($count, $max_page_entries, $page, $sort, $searchF
}
echo("
");
- //echo" " . $count . " " . _("Group(s) found");
echo" ";
printf($text, $count);
echo(" | ");
@@ -124,6 +123,45 @@ function listDrawNavigationBar($count, $max_page_entries, $page, $sort, $searchF
echo("\n");
}
+/**
+* Prints the attribute and filter row at the account table head
+*
+* @param string $scope account type (user, group, host)
+* @param string $searchFilter search filter for hyperlinks
+* @param array $desc_array list of attribute descriptions
+* @param array $attr_array list of attribute names
+* @param array $_POST HTTP-POST values
+* @param string $sort sort attribute
+*/
+function listPrintTableHeader($scope, $searchFilter, $desc_array, $attr_array, $_POST, $sort) {
+ // print table header
+ echo "\n";
+ echo "\n | \n | \n";
+ // table header
+ for ($k = 0; $k < sizeof($desc_array); $k++) {
+ if (strtolower($attr_array[$k]) == $sort) {
+ echo "" . $desc_array[$k] . " | \n";
+ }
+ else echo "" . $desc_array[$k] . " | \n";
+ }
+ echo "
\n";
+
+ // print filter row
+ echo "\n | \n";
+ echo "";
+ echo " | \n";
+ // print input boxes for filters
+ for ($k = 0; $k < sizeof ($desc_array); $k++) {
+ echo "";
+ echo ("");
+ echo " | \n";
+ }
+ echo "
\n";
+}
+
/**
* Returns the LDAP attribute names and their description for the user list
diff --git a/lam/style/500_layout.css b/lam/style/500_layout.css
index 00f9f52d..eb54eca3 100644
--- a/lam/style/500_layout.css
+++ b/lam/style/500_layout.css
@@ -129,7 +129,7 @@ td.usernav-text {
}
/* style of active column */
-th.userlist-activecolumn {
+th.userlist-sort {
background-color:#fffde2;
}
diff --git a/lam/templates/lists/listgroups.php b/lam/templates/lists/listgroups.php
index daca4e4e..7c32fde4 100644
--- a/lam/templates/lists/listgroups.php
+++ b/lam/templates/lists/listgroups.php
@@ -207,32 +207,8 @@ listDrawNavigationBar(sizeof($grp_info), $max_page_entries, $page, $sort, $searc
echo ("
");
}
-// print group table header
-echo "\n";
-echo " | | ";
-// table header
-for ($k = 0; $k < sizeof($desc_array); $k++) {
- if (strtolower($attr_array[$k]) == $sort) {
- echo "" . $desc_array[$k] . " | ";
- }
- else echo "" . $desc_array[$k] . " | ";
-}
-echo "
\n";
-
-// print filter row
-echo " | ";
-echo "";
-echo " | ";
-// print input boxes for filters
-for ($k = 0; $k < sizeof ($desc_array); $k++) {
- echo "";
- echo ("");
- echo " | ";
-}
-echo "
\n";
+// account table head
+listPrintTableHeader("group", $searchFilter, $desc_array, $attr_array, $_POST, $sort);
// calculate which rows to show
$table_begin = ($page - 1) * $max_page_entries;
diff --git a/lam/templates/lists/listhosts.php b/lam/templates/lists/listhosts.php
index 36b8b9ba..74763cee 100644
--- a/lam/templates/lists/listhosts.php
+++ b/lam/templates/lists/listhosts.php
@@ -203,32 +203,8 @@ listDrawNavigationBar(sizeof($hst_info), $max_page_entries, $page, $sort, $searc
echo ("
\n");
}
-// print host table header
-echo "