From 1fc8a18c2d74ec4ce5247b6abedddaadbcde3e34 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 29 May 2003 10:18:38 +0000 Subject: - 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). --- modules/cloud.module | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'modules/cloud.module') 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 .= "
"; 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 .= ""; + $inlist = false; + } if ($hour == 0) { - $output .= "
". t("Updated less than one hour ago:"); - } - else { - $output .= "
". 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 .= "
". format_plural($hour, "Updated more than an hour ago:", "Updated more than %count hours ago:"); + if ($inlist) { + $output .= ""; + $inlist = false; + } + $output .= format_plural($hour, "Updated more than an hour ago:", "Updated more than %count hours ago:"); $list = 0; } } - $output .= "
link\">$site->name
"; + if (!$inlist) { + $output .= ""; + $output .= "
"; return $output; } @@ -180,7 +195,7 @@ function cloud_block($op = "list", $delta = 0) { } else { $block["subject"] = t("Site cloud"); - $block["content"] = cloud_list(20) ."
". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."
"; + $block["content"] = cloud_list(20) ."
". l(t("more"), "cloud", array("title" => t("Monitor other sites in the cloud."))) ."
"; return $block; } } -- cgit v1.2.3