From 5889c92167154c7456b0255a7f95bcf8e905b6e5 Mon Sep 17 00:00:00 2001 From: jengo Date: Sat, 19 Aug 2000 06:32:09 +0000 Subject: [PATCH] Cleaned up groups form, added search field and next matchs icons --- admin/accounts.php | 6 +++--- admin/groups.php | 50 ++++++++++++++++++++++++++++++++++++++-------- doc/CHANGELOG | 1 + 3 files changed, 46 insertions(+), 11 deletions(-) diff --git a/admin/accounts.php b/admin/accounts.php index 79710ea63d..c41007be0b 100755 --- a/admin/accounts.php +++ b/admin/accounts.php @@ -17,14 +17,14 @@ if (! $start) $start = 0; - if (! $sort) - $sort = "desc"; - if ($order) $ordermethod = "order by $order $sort"; else $ordermethod = "order by lastname,firstname,loginid asc"; + if (! $sort) + $sort = "desc"; + if ($query) { $querymethod = " where firstname like '%$query%' OR lastname like '%$query%' OR loginid " . "like '%$query%' "; diff --git a/admin/groups.php b/admin/groups.php index 950c214f36..e251ac3622 100755 --- a/admin/groups.php +++ b/admin/groups.php @@ -13,12 +13,43 @@ $phpgw_flags["currentapp"] = "admin"; include("../header.inc.php"); - echo "

" . lang_admin("User groups") . "
" - . "" + + if (! $start) + $start = 0; + + if ($order) + $ordermethod = "order by $order $sort"; + else + $ordermethod = "order by group_name asc"; + + if (! $sort) + $sort = "asc"; + + if ($query) { + $querymethod = " where group_name like '%$query%'"; + } + + $phpgw->db->query("select count(*) from groups $querymethod"); + $phpgw->db->next_record(); + + $total = $phpgw->db->f(0); + $limit = $phpgw->nextmatchs->sql_limit($start); + + echo '

" . lang_common("Name") . "
' + . '' + . '' + . '' + . '
' . $phpgw->nextmatchs->left("groups.php",$start,$total) . '' . lang_admin("user groups") . '' . $phpgw->nextmatchs->right("groups.php",$start,$total) . '
'; + + echo "" + . "" . ""; - $phpgw->db->query("select * from groups order by group_name"); + $phpgw->db->query("select * from groups $querymethod $ordermethod limit $limit"); while ($phpgw->db->next_record()) { $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); @@ -32,10 +63,13 @@ . $phpgw->link("deletegroup.php","group_id=" . $phpgw->db->f("group_id")) . "\"> " . lang_common("Delete") . " "; } - echo "" - . $phpgw->session->hidden_var() - . "" - . "
" + . $phpgw->nextmatchs->show_sort_order($sort,"group_name",$order,"groups.php", + lang_common("name")) . " " . lang_common("Edit") . " " . lang_common("Delete") . "
"; + + echo "\n
" + . $phpgw->session->hidden_var() . "" + . "" + . $phpgw->session->hidden_var() . "
" . lang_common("search") . " " + . "
"; include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); -?> + diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 7adef12fb9..ad1e06e81f 100755 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -21,6 +21,7 @@ - Added feature to check for new releases of phpGW - Added feature to filter out entrys only within a certain group. This is for the todo list and addressbook. + - Added a search field and next matchs icons to account form. [08152000] - Fixed a problem with the calendar not showing the months in the users langague preference.