diff --git a/admin/groups.php b/admin/groups.php
index b60a4bb0d2..a2b6cb3259 100755
--- a/admin/groups.php
+++ b/admin/groups.php
@@ -15,6 +15,9 @@
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
include("../header.inc.php");
+ $phpgw->template->set_file(array("list" => "groups.tpl",
+ "row" => "groups_row.tpl"));
+
if (! $start)
$start = 0;
@@ -35,42 +38,40 @@
$total = $phpgw->db->f(0);
$limit = $phpgw->nextmatchs->sql_limit($start);
+
+ $phpgw->template->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
+ $phpgw->template->set_var("left_nextmatchs",$phpgw->nextmatchs->left("groups.php",$start,$total));
+ $phpgw->template->set_var("right_nextmatchs",$phpgw->nextmatchs->right("groups.php",$start,$total));
+ $phpgw->template->set_var("lang_groups",lang("user groups"));
- echo '
'
- . '' . $phpgw->nextmatchs->left("groups.php",$start,$total) . ' | '
- . '' . lang("user groups") . ' | '
- . '' . $phpgw->nextmatchs->right("groups.php",$start,$total) . ' | '
- . '
';
-
- echo ""
- . ""
- . $phpgw->nextmatchs->show_sort_order($sort,"group_name",$order,"groups.php",
- lang("name")) . " | "
- . " " . lang("Edit") . " | " . lang("Delete")
- . " |
";
+ $phpgw->template->set_var("sort_name",$phpgw->nextmatchs->show_sort_order($sort,"group_name",$order,"groups.php",lang("name")));
+ $phpgw->template->set_var("header_edit",lang("Edit"));
+ $phpgw->template->set_var("header_delete",lang("Delete"));
$phpgw->db->query("select * from groups $querymethod $ordermethod limit $limit");
while ($phpgw->db->next_record()) {
- $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
+ $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
+
+ $phpgw->template->set_var("tr_color",$tr_color);
+
+ $group_name = $phpgw->db->f("group_name");
+
+ if (! $group_name) $group_name = ' ';
- $group_name = $phpgw->db->f("group_name");
-
- if (! $group_name) $group_name = ' ';
-
- echo "$group_name | "
- . "link("editgroup.php","group_id=" . $phpgw->db->f("group_id"))
- . "\"> " . lang("Edit") . " | " . "link("deletegroup.php","group_id=" . $phpgw->db->f("group_id"))
- . "\"> " . lang("Delete") . " | ";
+ $phpgw->template->set_var("group_name",$group_name);
+ $phpgw->template->set_var("edit_link",'db->f("group_id")) . '"> ' . lang("Edit") . ' ');
+ $phpgw->template->set_var("delete_link",'db->f("group_id")) . '"> ' . lang("Delete") . ' ');
+
+ $phpgw->template->parse("rows","row",True);
}
- echo "\n
"
- . "";
+ $phpgw->template->set_var("new_action",$phpgw->link("newgroup.php"));
+ $phpgw->template->set_var("lang_add",lang("add"));
+
+ $phpgw->template->set_var("search_action",$phpgw->link("groups.php"));
+ $phpgw->template->set_var("lang_search",lang("search"));
+
+ $phpgw->template->pparse("out","list");
$phpgw->common->phpgw_footer();
?>
diff --git a/admin/templates/default/groups.tpl b/admin/templates/default/groups.tpl
new file mode 100644
index 0000000000..5a249731c4
--- /dev/null
+++ b/admin/templates/default/groups.tpl
@@ -0,0 +1,36 @@
+
+
+
+
+ {left_nextmatchs} |
+ {lang_groups} |
+ {right_nextmatchs} |
+
+
+
+
+
+ {sort_name} |
+ {header_edit} |
+ {header_delete} |
+
+
+ {rows}
+
+
+
+
+
+
+
+ |
+ {lang_search}
+
+ |
+
+
+
diff --git a/admin/templates/default/groups_row.tpl b/admin/templates/default/groups_row.tpl
new file mode 100644
index 0000000000..7d42fa1f67
--- /dev/null
+++ b/admin/templates/default/groups_row.tpl
@@ -0,0 +1,8 @@
+
+
+
+ {group_name} |
+ {edit_link} |
+ {delete_link} |
+
+