From bfb3575c0950f2c0c1e22211a1efdf12e4efbd38 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 6 Jan 2003 20:51:39 +0000 Subject: - Some usability improvements requested by Michael. --- modules/admin.module | 1 + modules/watchdog.module | 12 +++++------- modules/watchdog/watchdog.module | 12 +++++------- 3 files changed, 11 insertions(+), 14 deletions(-) (limited to 'modules') diff --git a/modules/admin.module b/modules/admin.module index a2ddfe73d..7dbe72714 100644 --- a/modules/admin.module +++ b/modules/admin.module @@ -69,6 +69,7 @@ function admin_page($mod) { print module_invoke(arg(1), "admin"); } else { + print "

". t("System messages") ."

"; print watchdog_overview("actions"); } diff --git a/modules/watchdog.module b/modules/watchdog.module index e1c9b4167..8f5e044d8 100644 --- a/modules/watchdog.module +++ b/modules/watchdog.module @@ -48,18 +48,16 @@ function watchdog_overview($type) { $result = pager_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY w.timestamp DESC", 100); - $output .= ""; - $output .= " "; while ($watchdog = db_fetch_object($result)) { if ($background = $color[$watchdog->type]) { - $output .= " "; + $data .= " "; } } - if ($pager = pager_display(NULL, 100, 0, "admin")) { - $output .= " "; - } - + $output .= "
" . t("date") . "" . t("event") . "" . t("user") . "" . t("operations") . "
". format_date($watchdog->timestamp, "small") ."". substr(strip_tags($watchdog->message), 0, 64) ."". format_name($watchdog) ."$watchdog->link". l(t("view details"), "admin/watchdog/view/$watchdog->wid") ."
". format_date($watchdog->timestamp, "small") ."". substr(strip_tags($watchdog->message), 0, 64) ."". format_name($watchdog) ."$watchdog->link". l(t("view details"), "admin/watchdog/view/$watchdog->wid") ."
$pager
"; + $output .= " "; + $output .= ($data ? $data : ""); + $output .= (($pager = pager_display(NULL, 100, 0, "admin")) ? "" : ""); $output .= "
" . t("date") . "" . t("event") . "" . t("user") . "" . t("operations") . "
". t("No system messages currently available.") ."
$pager
"; return $output; diff --git a/modules/watchdog/watchdog.module b/modules/watchdog/watchdog.module index e1c9b4167..8f5e044d8 100644 --- a/modules/watchdog/watchdog.module +++ b/modules/watchdog/watchdog.module @@ -48,18 +48,16 @@ function watchdog_overview($type) { $result = pager_query("SELECT w.*, u.name, u.uid FROM watchdog w LEFT JOIN users u ON w.uid = u.uid ". ($type ? $query[$type] : "") ." ORDER BY w.timestamp DESC", 100); - $output .= ""; - $output .= " "; while ($watchdog = db_fetch_object($result)) { if ($background = $color[$watchdog->type]) { - $output .= " "; + $data .= " "; } } - if ($pager = pager_display(NULL, 100, 0, "admin")) { - $output .= " "; - } - + $output .= "
" . t("date") . "" . t("event") . "" . t("user") . "" . t("operations") . "
". format_date($watchdog->timestamp, "small") ."". substr(strip_tags($watchdog->message), 0, 64) ."". format_name($watchdog) ."$watchdog->link". l(t("view details"), "admin/watchdog/view/$watchdog->wid") ."
". format_date($watchdog->timestamp, "small") ."". substr(strip_tags($watchdog->message), 0, 64) ."". format_name($watchdog) ."$watchdog->link". l(t("view details"), "admin/watchdog/view/$watchdog->wid") ."
$pager
"; + $output .= " "; + $output .= ($data ? $data : ""); + $output .= (($pager = pager_display(NULL, 100, 0, "admin")) ? "" : ""); $output .= "
" . t("date") . "" . t("event") . "" . t("user") . "" . t("operations") . "
". t("No system messages currently available.") ."
$pager
"; return $output; -- cgit v1.2.3