mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
Cleainging up templates
This commit is contained in:
parent
29ca6287d1
commit
1690434306
@ -17,11 +17,8 @@
|
||||
include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_"
|
||||
. $phpgw_info["server"]["account_repository"] . ".inc.php");
|
||||
|
||||
$phpgw->template->set_file(array("header" => "accounts.tpl",
|
||||
"row" => "accounts.tpl",
|
||||
"footer" => "accounts.tpl"));
|
||||
|
||||
$phpgw->template->set_block("header","row","footer");
|
||||
$phpgw->template->set_file(array("list" => "accounts.tpl",
|
||||
"row" => "accounts_row.tpl"));
|
||||
|
||||
$total = account_total();
|
||||
|
||||
@ -40,8 +37,6 @@
|
||||
$phpgw->template->set_var("lang_delete",lang("Delete"));
|
||||
$phpgw->template->set_var("lang_view",lang("View"));
|
||||
|
||||
$phpgw->template->parse("out","header");
|
||||
|
||||
$account_info = account_read($method,$start,$sort,$order);
|
||||
|
||||
while (list($null,$account) = each($account_info)) {
|
||||
@ -69,7 +64,7 @@
|
||||
$phpgw->template->set_var("row_firstname",$firstname);
|
||||
$phpgw->template->set_var("row_lastname",$lastname);
|
||||
$phpgw->template->set_var("row_edit",'<a href="'.$phpgw->link("editaccount.php","account_id="
|
||||
. $account_id) . '"> ' . lang("Edit") . ' </a>');
|
||||
. $account_id) . '"> ' . lang("Edit") . ' </a>');
|
||||
|
||||
if ($phpgw_info["user"]["userid"] != $account["account_lid"]) {
|
||||
$phpgw->template->set_var("row_delete",'<a href="' . $phpgw->link("deleteaccount.php",'account_id='
|
||||
@ -79,21 +74,16 @@
|
||||
}
|
||||
|
||||
$phpgw->template->set_var("row_view",'<a href="' . $phpgw->link("viewaccount.php", "account_id="
|
||||
. $account_id) . '"> ' . lang("View") . ' </a>');
|
||||
. $account_id) . '"> ' . lang("View") . ' </a>');
|
||||
|
||||
if ($total == 1) {
|
||||
$phpgw->template->set_var("output","");
|
||||
}
|
||||
if ($total != ++$i) {
|
||||
$phpgw->template->parse("output","row",True);
|
||||
}
|
||||
$phpgw->template->parse("rows","row",True);
|
||||
}
|
||||
|
||||
$phpgw->template->set_var("actionurl",$phpgw->link("newaccount.php"));
|
||||
$phpgw->template->set_var("lang_add",lang("add"));
|
||||
$phpgw->template->set_var("lang_search",lang("search"));
|
||||
|
||||
$phpgw->template->pparse("out","footer");
|
||||
$phpgw->template->pparse("out","list");
|
||||
|
||||
$phpgw->common->phpgw_footer();
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- BEGIN header -->
|
||||
<!-- BEGIN list -->
|
||||
<p>
|
||||
<table border="0" width="70%" align="center">
|
||||
<tr bgcolor="{bg_color}">
|
||||
@ -18,22 +18,9 @@
|
||||
<td>{lang_delete}</td>
|
||||
<td>{lang_view}</td>
|
||||
</tr>
|
||||
<!-- END header -->
|
||||
|
||||
{output}
|
||||
{rows}
|
||||
|
||||
<!-- BEGIN row -->
|
||||
<tr bgcolor="{tr_color}">
|
||||
<td>{row_loginid}</td>
|
||||
<td>{row_lastname}</td>
|
||||
<td>{row_firstname}</td>
|
||||
<td width="5%">{row_edit}</td>
|
||||
<td width="5%">{row_delete}</td>
|
||||
<td width="5%">{row_view}</td>
|
||||
</tr>
|
||||
<!-- END row -->
|
||||
|
||||
<!-- BEGIN footer -->
|
||||
</table>
|
||||
</center>
|
||||
|
||||
@ -52,4 +39,4 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- END footer -->
|
||||
<!-- END list -->
|
||||
|
11
admin/templates/default/accounts_row.tpl
Normal file
11
admin/templates/default/accounts_row.tpl
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
<!-- BEGIN row -->
|
||||
<tr bgcolor="{tr_color}">
|
||||
<td>{row_loginid}</td>
|
||||
<td>{row_lastname}</td>
|
||||
<td>{row_firstname}</td>
|
||||
<td width="5%">{row_edit}</td>
|
||||
<td width="5%">{row_delete}</td>
|
||||
<td width="5%">{row_view}</td>
|
||||
</tr>
|
||||
<!-- END row -->
|
Loading…
Reference in New Issue
Block a user