diff --git a/admin/accounts.php b/admin/accounts.php index 9f6da40f5d..d3d45025c8 100755 --- a/admin/accounts.php +++ b/admin/accounts.php @@ -17,8 +17,8 @@ include($phpgw_info["server"]["server_root"] . "/admin/inc/accounts_" . $phpgw_info["server"]["account_repository"] . ".inc.php"); - $phpgw->template->set_file(array("list" => "accounts.tpl", - "row" => "accounts_row.tpl")); + $phpgw->template->set_file(array("list" => "accounts.tpl", + "row" => "accounts_row.tpl")); $total = account_total(); diff --git a/admin/applications.php b/admin/applications.php index e531be811f..ec337c5bdd 100644 --- a/admin/applications.php +++ b/admin/applications.php @@ -15,50 +15,54 @@ $phpgw_info["flags"] = array("currentapp" => "admin", "enable_nextmatchs_class" => True); include("../header.inc.php"); - if ($order) - $ordermethod = "order by $order $sort"; - else - $ordermethod = "order by app_title asc"; + $phpgw->template->set_file(array("list" => "applications.tpl", + "row" => "applications_row.tpl")); - if (! $sort) - $sort = "desc"; - - echo '

' . lang("Installed applications") . '


'; - echo '

'; - - echo ""; - - $phpgw->db->query("select * from applications $ordermethod",__LINE__,__FILE__); - - while ($phpgw->db->next_record()) { - $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); - $name = $phpgw->db->f("app_title"); - - if (! $phpgw->db->f("app_title")) $name = $phpgw->db->f("app_name"); - if (! $name) $name = " "; - - echo ""; - - echo ""; - - echo "\n"; + if ($order) { + $ordermethod = "order by $order $sort"; + } else { + $ordermethod = "order by app_title asc"; } - echo "
" - . $phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"applications.php",lang("title")) . "" - . lang("Edit") . " " . lang("Delete") . " " - . lang("Enabled") . "
$namelink("editapplication.php","app_name=" . urlencode($phpgw->db->f("app_name"))) - . "\"> " . lang("Edit") . " link("deleteapplication.php", - "app_name=" . urlencode($phpgw->db->f("app_name"))) . "\"> " . lang("Delete") - . " "; - if ($phpgw->db->f("app_enabled") != 0) { - echo lang("Yes"); - } else { - echo "" . lang("No") . ""; - } - echo "

link("newapplication.php")."\">" - . "
"; + if (! $sort) { + $sort = "desc"; + } + $phpgw->template->set_var("lang_installed",lang("Installed applications")); + $phpgw->template->set_var("bg_color",$phpgw_info["theme"]["bg_color"]); + $phpgw->template->set_var("th_bg",$phpgw_info["theme"]["th_bg"]); + + $phpgw->template->set_var("sort_title",$phpgw->nextmatchs->show_sort_order($sort,"app_title",$order,"applications.php",lang("title"))); + $phpgw->template->set_var("lang_edit",lang("Edit")); + $phpgw->template->set_var("lang_delete",lang("Delete")); + $phpgw->template->set_var("lang_enabled",lang("Enabled")); + + $phpgw->db->query("select * from applications $ordermethod",__LINE__,__FILE__); + while ($phpgw->db->next_record()) { + $tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color); + $name = $phpgw->db->f("app_title"); + + if (! $phpgw->db->f("app_title")) $name = $phpgw->db->f("app_name"); + if (! $name) $name = " "; + + $phpgw->template->set_var("tr_color",$tr_color); + $phpgw->template->set_var("name",$name); + $phpgw->template->set_var("edit",' ' . lang("Edit") . ' '); + $phpgw->template->set_var("delete",' ' . lang("Delete") . ' '); + + if ($phpgw->db->f("app_enabled") != 0) { + $status = lang("Yes"); + } else { + $status = "" . lang("No") . ""; + } + $phpgw->template->set_var("status",$status); + + $phpgw->template->parse("rows","row",True); + } + + $phpgw->template->set_var("new_action",$phpgw->link("newapplication.php")); + $phpgw->template->set_var("lang_add",lang("add")); + + $phpgw->template->pparse("out","list"); $phpgw->common->phpgw_footer(); +?> \ No newline at end of file diff --git a/admin/templates/default/applications.tpl b/admin/templates/default/applications.tpl new file mode 100644 index 0000000000..5c9056c963 --- /dev/null +++ b/admin/templates/default/applications.tpl @@ -0,0 +1,30 @@ + + +

{lang_installed}


+ +

+ + + + + + + + + + + {rows} + +
{sort_title} {lang_edit} {lang_delete} {lang_enabled}
+ + + + + +
+
+ +
+
+ + diff --git a/admin/templates/default/applications_row.tpl b/admin/templates/default/applications_row.tpl new file mode 100644 index 0000000000..bd017612f9 --- /dev/null +++ b/admin/templates/default/applications_row.tpl @@ -0,0 +1,9 @@ + + + + {name} + {edit} + {delete} + {status} + +