mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:28 +01:00
Converted groups list to templates
This commit is contained in:
parent
a7eb74b77d
commit
c4fe1069d5
@ -15,6 +15,9 @@
|
|||||||
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
$phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True);
|
||||||
include("../header.inc.php");
|
include("../header.inc.php");
|
||||||
|
|
||||||
|
$phpgw->template->set_file(array("list" => "groups.tpl",
|
||||||
|
"row" => "groups_row.tpl"));
|
||||||
|
|
||||||
if (! $start)
|
if (! $start)
|
||||||
$start = 0;
|
$start = 0;
|
||||||
|
|
||||||
@ -36,41 +39,39 @@
|
|||||||
$total = $phpgw->db->f(0);
|
$total = $phpgw->db->f(0);
|
||||||
$limit = $phpgw->nextmatchs->sql_limit($start);
|
$limit = $phpgw->nextmatchs->sql_limit($start);
|
||||||
|
|
||||||
echo '<p><table border="0" width="45%" align="center"><tr bgcolor="'
|
$phpgw->template->set_var("th_bg",$phpgw_info["theme"]["th_bg"]);
|
||||||
. $phpgw_info["theme"][bg_color] . '">'
|
$phpgw->template->set_var("left_nextmatchs",$phpgw->nextmatchs->left("groups.php",$start,$total));
|
||||||
. '<td align="left">' . $phpgw->nextmatchs->left("groups.php",$start,$total) . '</td>'
|
$phpgw->template->set_var("right_nextmatchs",$phpgw->nextmatchs->right("groups.php",$start,$total));
|
||||||
. '<td align="center">' . lang("user groups") . '</td>'
|
$phpgw->template->set_var("lang_groups",lang("user groups"));
|
||||||
. '<td align="right">' . $phpgw->nextmatchs->right("groups.php",$start,$total) . '</td>'
|
|
||||||
. '</tr></table>';
|
|
||||||
|
|
||||||
echo "<table border=0 width=45% align=center>"
|
$phpgw->template->set_var("sort_name",$phpgw->nextmatchs->show_sort_order($sort,"group_name",$order,"groups.php",lang("name")));
|
||||||
. "<tr bgcolor=" . $phpgw_info["theme"]["th_bg"] . "><td>"
|
$phpgw->template->set_var("header_edit",lang("Edit"));
|
||||||
. $phpgw->nextmatchs->show_sort_order($sort,"group_name",$order,"groups.php",
|
$phpgw->template->set_var("header_delete",lang("Delete"));
|
||||||
lang("name")) . "</td>"
|
|
||||||
. "<td> " . lang("Edit") . " </td> <td> " . lang("Delete")
|
|
||||||
. " </td> </tr>";
|
|
||||||
|
|
||||||
$phpgw->db->query("select * from groups $querymethod $ordermethod limit $limit");
|
$phpgw->db->query("select * from groups $querymethod $ordermethod limit $limit");
|
||||||
while ($phpgw->db->next_record()) {
|
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");
|
$group_name = $phpgw->db->f("group_name");
|
||||||
|
|
||||||
if (! $group_name) $group_name = ' ';
|
if (! $group_name) $group_name = ' ';
|
||||||
|
|
||||||
echo "<tr bgcolor=$tr_color><td>$group_name</td>"
|
$phpgw->template->set_var("group_name",$group_name);
|
||||||
. "<td width=5%><a href=\"" . $phpgw->link("editgroup.php","group_id=" . $phpgw->db->f("group_id"))
|
$phpgw->template->set_var("edit_link",'<a href="' . $phpgw->link("editgroup.php","group_id=" . $phpgw->db->f("group_id")) . '"> ' . lang("Edit") . ' </a>');
|
||||||
. "\"> " . lang("Edit") . " </a></td>" . "<td width=5%><a href=\""
|
$phpgw->template->set_var("delete_link",'<a href="' . $phpgw->link("deletegroup.php","group_id=" . $phpgw->db->f("group_id")) . '"> ' . lang("Delete") . ' </a>');
|
||||||
. $phpgw->link("deletegroup.php","group_id=" . $phpgw->db->f("group_id"))
|
|
||||||
. "\"> " . lang("Delete") . " </a></td>";
|
$phpgw->template->parse("rows","row",True);
|
||||||
}
|
}
|
||||||
|
|
||||||
echo "\n<form method=POST action=\"".$phpgw->link("newgroup.php")."\">"
|
$phpgw->template->set_var("new_action",$phpgw->link("newgroup.php"));
|
||||||
. "</table></center>"
|
$phpgw->template->set_var("lang_add",lang("add"));
|
||||||
. "<table border=0 width=45% align=center><tr><td align=left><input type=\"submit\" "
|
|
||||||
. "value=\"" . lang("Add") . "\"></form><form action=\"".$phpgw->link("groups.php")."\"></td>"
|
$phpgw->template->set_var("search_action",$phpgw->link("groups.php"));
|
||||||
. "<td align=right>" . lang("search") . " "
|
$phpgw->template->set_var("lang_search",lang("search"));
|
||||||
. "<input name=\"query\"></td></tr></form></table>";
|
|
||||||
|
$phpgw->template->pparse("out","list");
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
36
admin/templates/default/groups.tpl
Normal file
36
admin/templates/default/groups.tpl
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<!-- BEGIN list -->
|
||||||
|
<p>
|
||||||
|
<table border="0" width="45%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="left">{left_nextmatchs}</td>
|
||||||
|
<td align="center">{lang_groups}</td>
|
||||||
|
<td align="right">{right_nextmatchs}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table border="0" width="45%" align="center">
|
||||||
|
<tr bgcolor="{th_bg}">
|
||||||
|
<td>{sort_name}</td>
|
||||||
|
<td>{header_edit}</td>
|
||||||
|
<td>{header_delete}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
{rows}
|
||||||
|
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<table border="0" width="45%" align="center">
|
||||||
|
<tr>
|
||||||
|
<td align="left">
|
||||||
|
<form method="POST" action="{new_action}">
|
||||||
|
<input type="submit" value="{lang_add}">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
<td align="right">{lang_search}
|
||||||
|
<form action="{search_action}">
|
||||||
|
<input name="query">
|
||||||
|
</form>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
<!-- END list -->
|
8
admin/templates/default/groups_row.tpl
Normal file
8
admin/templates/default/groups_row.tpl
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
<!-- BEGIN row -->
|
||||||
|
<tr bgcolor="{tr_color}">
|
||||||
|
<td>{group_name}</td>
|
||||||
|
<td width="5%">{edit_link}</td>
|
||||||
|
<td width="5%">{delete_link}</td>
|
||||||
|
</tr>
|
||||||
|
<!-- END row -->
|
Loading…
Reference in New Issue
Block a user