From df650e54a1b81e36a17c268706b84ac3dcd8696e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 29 Dec 2002 16:59:45 +0000 Subject: - Usability improvement: made the cloud module table use the new table rendering functions. - Usability improvement: a couple of strings could not be translated. - Bugfix: removed redundant links. --- modules/cloud.module | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'modules/cloud.module') diff --git a/modules/cloud.module b/modules/cloud.module index 522756bc1..426cb51d7 100644 --- a/modules/cloud.module +++ b/modules/cloud.module @@ -124,14 +124,12 @@ function cloud_save($edit) { function cloud_display() { $result = db_query("SELECT * FROM site ORDER BY name"); - $output .= "\n"; - $output .= " \n"; + $header = array(t("site"), t("last update"), t("operations")); while ($site = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array("link\">$site->name", ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never"), la(t("edit site"), array("mod" => "cloud", "op" => "edit", "id" => $site->sid)), la(t("update site"), array("mod" => "cloud", "op" => "update", "id" => $site->sid))); } - $output .= "
sitelast updateoperations
link) ."\">". check_output($site->name) ."". ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never") ."". la(t("edit site"), array("mod" => "cloud", "op" => "edit", "id" => $site->sid)) ."". la(t("update site"), array("mod" => "cloud", "op" => "update", "id" => $site->sid)) ."
\n"; - return $output; + return table($header, $rows); } function cloud_list($limit = 10) { @@ -187,8 +185,6 @@ function cloud_admin() { global $op, $id, $edit; if (user_access("administer site cloud")) { - print "". la(t("add new site"), array("mod" => "cloud", "op" => "add")) ." | ". la(t("overview"), array("mod" => "cloud")) ." | ". la(t("help"), array("mod" => "cloud", "op" => "help")) ."
\n"; - switch ($op) { case "add": print cloud_form(); -- cgit v1.2.3