lists now show the number of found objects

This commit is contained in:
Roland Gruber 2003-05-27 15:59:53 +00:00
parent 1ff99ce512
commit 6ae512e69e
3 changed files with 43 additions and 12 deletions

View File

@ -29,7 +29,6 @@ $Id$
*/
h1,h2,h3,h4,p,ul,ol,li,div,td,th,address,blockquote,nobr,b,i {
font-family:Arial,Verdana,sans-serif;
font-size:14px;
}
body {
@ -129,12 +128,24 @@ th.userlist_activecolumn {
*
*/
/* */
/* navigation bar */
table.groupnav {
background-color:#a8c3ff;
border-width:1px;
border-style:solid;
border-color:#7167bf;//#0050ff;
border-color:#7167bf;
}
/* text in navigation bar */
td.groupnav_text {
color:green;
font-family:Verdana;
font-size:x-small;
}
/* color for active page digit */
td.groupnav_activepage {
color:red;
}
/* table preferences */
@ -182,6 +193,18 @@ table.hostnav {
border-color:#911a1a;
}
/* text in navigation bar */
td.hostnav_text {
color:green;
font-family:Verdana;
font-size:x-small;
}
/* color for active page digit */
td.hostnav_activepage {
color:red;
}
/* table preferences */
table.hostlist {
border-width:1px;

View File

@ -70,7 +70,7 @@ $hash_table = $_SESSION["ldap"]->attributeGroupArray();
// get current page
$page = $_GET["page"];
if (!$page) $page = 1;
// take maximum count of user entries shown on one page out of session
// take maximum count of group entries shown on one page out of session
if ($_SESSION["config"]->get_MaxListEntries() <= 0)
$max_pageentrys = 10; // default setting, if not yet set
else
@ -230,22 +230,26 @@ function draw_navigation_bar ($count) {
echo ("<tr>\n");
echo ("<td><input type=\"submit\" name=\"refresh\" value=\"" . _("Refresh") . "\">&nbsp;&nbsp;");
if ($page != 1)
echo ("<a class=\"userlist\" href=\"listgroups.php?page=" . ($page - 1) . "&list=" . $list . $searchfilter . "\">&lt;=</a>\n");
echo ("<a href=\"listgroups.php?page=" . ($page - 1) . "&list=" . $list . $searchfilter . "\">&lt;=</a>\n");
else
echo ("&lt;=");
echo ("&nbsp;");
if ($page < ($count / $max_pageentrys))
echo ("<a class=\"userlist\" href=\"listgroups.php?page=" . ($page + 1) . "&list=" . $list . $searchfilter . "\">=&gt;</a>\n");
echo ("<a href=\"listgroups.php?page=" . ($page + 1) . "&list=" . $list . $searchfilter . "\">=&gt;</a>\n");
else
echo ("=&gt;</td>");
echo ("<td class=\"userlist_activepage\" align=\"right\">");
echo ("<td class=\"groupnav_text\">");
echo "&nbsp;" . $count . " " . _("Group(s) found");
echo ("</td>");
echo ("<td class=\"groupnav_activepage\" align=\"right\">");
for ($i = 0; $i < ($count / $max_pageentrys); $i++) {
if ($i == $page - 1)
echo ("&nbsp;" . ($i + 1));
else
echo ("&nbsp;<a class=\"userlist\" href=\"listgroups.php?page=" . ($i + 1) .
echo ("&nbsp;<a href=\"listgroups.php?page=" . ($i + 1) .
"&list=" . $list . "\">" . ($i + 1) . "</a>\n");
}
echo ("</td></tr></table>\n");

View File

@ -213,22 +213,26 @@ function draw_navigation_bar ($count) {
echo ("<tr>\n");
echo ("<td><input type=\"submit\" name=\"refresh\" value=\"" . _("Refresh") . "\">&nbsp;&nbsp;");
if ($page != 1)
echo ("<a class=\"userlist\" href=\"listhosts.php?page=" . ($page - 1) . "&list=" . $list . $searchfilter . "\">&lt;=</a>\n");
echo ("<a href=\"listhosts.php?page=" . ($page - 1) . "&list=" . $list . $searchfilter . "\">&lt;=</a>\n");
else
echo ("&lt;=");
echo ("&nbsp;");
if ($page < ($count / $max_pageentrys))
echo ("<a class=\"userlist\" href=\"listhosts.php?page=" . ($page + 1) . "&list=" . $list . $searchfilter . "\">=&gt;</a>\n");
echo ("<a href=\"listhosts.php?page=" . ($page + 1) . "&list=" . $list . $searchfilter . "\">=&gt;</a>\n");
else
echo ("=&gt;</td>");
echo ("<td class=\"userlist_activepage\" align=\"right\">");
echo ("<td class=\"hostnav_text\">");
echo "&nbsp;" . $count . " " . _("Samba Host(s) found");
echo ("</td>");
echo ("<td class=\"hostlist_activepage\" align=\"right\">");
for ($i = 0; $i < ($count / $max_pageentrys); $i++) {
if ($i == $page - 1)
echo ("&nbsp;" . ($i + 1));
else
echo ("&nbsp;<a class=\"userlist\" href=\"listhosts.php?page=" . ($i + 1) .
echo ("&nbsp;<a href=\"listhosts.php?page=" . ($i + 1) .
"&list=" . $list . "\">" . ($i + 1) . "</a>\n");
}
echo ("</td></tr></table>\n");