summaryrefslogtreecommitdiff
path: root/modules/cloud.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-05-29 10:18:38 +0000
committerDries Buytaert <dries@buytaert.net>2003-05-29 10:18:38 +0000
commit1fc8a18c2d74ec4ce5247b6abedddaadbcde3e34 (patch)
tree746f550c09c4a827c859d32384b055e35db1fcd0 /modules/cloud.module
parentf7e11d3bb763d0f8c3b0551b7f5848f72c557ac0 (diff)
downloadbrdo-1fc8a18c2d74ec4ce5247b6abedddaadbcde3e34.tar.gz
brdo-1fc8a18c2d74ec4ce5247b6abedddaadbcde3e34.tar.bz2
- Al's CSS patches. This commit improves the themability of some core
components such as lists, form items, removes an ugly hack from the archive module and should fix the poll problem (although it doesn't Opera/Konqueror).
Diffstat (limited to 'modules/cloud.module')
-rw-r--r--modules/cloud.module31
1 files changed, 23 insertions, 8 deletions
diff --git a/modules/cloud.module b/modules/cloud.module
index 339fedc38..45e5ae764 100644
--- a/modules/cloud.module
+++ b/modules/cloud.module
@@ -141,25 +141,40 @@ function cloud_list($limit = 10) {
$hour = -1;
$list = -1;
-
+ $inlist = false;
+ $output .= "<div class=\"item-list\">";
while ($site = db_fetch_object($result)) {
if ($hour != floor((time() - $site->timestamp) / 3600)) {
$hour = floor((time() - $site->timestamp) / 3600);
if ($hour < 12) {
+ if ($inlist) {
+ $output .= "</ul>";
+ $inlist = false;
+ }
if ($hour == 0) {
- $output .= "<br />". t("Updated less than one hour ago:");
- }
- else {
- $output .= "<br />". format_plural($hour, "Updated an hour ago:", "Updated %count hours ago:");
+ $output .= t("Updated less than one hour ago:");
+ }
+ else {
+ $output .= format_plural($hour, "Updated an hour ago:", "Updated %count hours ago:");
}
}
else if ($list) {
- $output .= "<br />". format_plural($hour, "Updated more than an hour ago:", "Updated more than %count hours ago:");
+ if ($inlist) {
+ $output .= "</ul>";
+ $inlist = false;
+ }
+ $output .= format_plural($hour, "Updated more than an hour ago:", "Updated more than %count hours ago:");
$list = 0;
}
}
- $output .= "<div style=\"padding-left: 10px;\"><a href=\"$site->link\">$site->name</a></div>";
+ if (!$inlist) {
+ $output .= "<ul>";
+ $inlist = true;
+ }
+ $output .= "<li><a href=\"$site->link\">$site->name</a></li>";
}
+ if ($inlist) $output .= "</ul>";
+ $output .= "</div>";
return $output;
}
@@ -180,7 +195,7 @@ function cloud_block($op = "list", $delta = 0) {
}
else {
$block["subject"] = t("Site cloud");
- $block["content"] = cloud_list(20) ."<br /><div align=\"right\">". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."</div>";
+ $block["content"] = cloud_list(20) ."<div align=\"right\">". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."</div>";
return $block;
}
}