diff options
author | Dries Buytaert <dries@buytaert.net> | 2002-12-29 16:59:45 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2002-12-29 16:59:45 +0000 |
commit | df650e54a1b81e36a17c268706b84ac3dcd8696e (patch) | |
tree | dec3d6b7723bed0492d564853f03c16b4b5b3544 | |
parent | 3a43fdd414ec2ad87d890baf24a23244fcdb7410 (diff) | |
download | brdo-df650e54a1b81e36a17c268706b84ac3dcd8696e.tar.gz brdo-df650e54a1b81e36a17c268706b84ac3dcd8696e.tar.bz2 |
- 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.
-rw-r--r-- | modules/cloud.module | 10 |
1 files changed, 3 insertions, 7 deletions
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 .= "<table border=\"1\" cellpadding=\"2\" cellspacing=\"2\">\n"; - $output .= " <tr><th>site</th><th>last update</th><th colspan=\"2\">operations</th></tr>\n"; + $header = array(t("site"), t("last update"), t("operations")); while ($site = db_fetch_object($result)) { - $output .= " <tr><td><a href=\"". check_output($site->link) ."\">". check_output($site->name) ."</a></td><td>". ($site->timestamp ? format_interval(time() - $site->timestamp) ." ago" : "never") ."</td><td>". la(t("edit site"), array("mod" => "cloud", "op" => "edit", "id" => $site->sid)) ."</td><td>". la(t("update site"), array("mod" => "cloud", "op" => "update", "id" => $site->sid)) ."</td></tr>\n"; + $rows[] = array("<a href=\"$site->link\">$site->name</a>", ($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 .= "</table>\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 "<small>". la(t("add new site"), array("mod" => "cloud", "op" => "add")) ." | ". la(t("overview"), array("mod" => "cloud")) ." | ". la(t("help"), array("mod" => "cloud", "op" => "help")) ."</small><hr />\n"; - switch ($op) { case "add": print cloud_form(); |