From 3a43fdd414ec2ad87d890baf24a23244fcdb7410 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 29 Dec 2002 16:54:31 +0000 Subject: - Usability improvement: made the access log, referrer logs and popular post tables use the new table rendering functions. - Usability improvement: a couple of strings could not be translated. --- modules/aggregator.module | 26 ++++++++++++++------------ modules/aggregator/aggregator.module | 26 ++++++++++++++------------ modules/import.module | 26 ++++++++++++++------------ 3 files changed, 42 insertions(+), 36 deletions(-) (limited to 'modules') diff --git a/modules/aggregator.module b/modules/aggregator.module index 53ce4ea68..5243ea6dc 100644 --- a/modules/aggregator.module +++ b/modules/aggregator.module @@ -383,22 +383,24 @@ function import_view() { $result = db_query("SELECT f.*, COUNT(i.iid) AS items FROM feed f LEFT JOIN item i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.timestamp, f.attributes, f.link, f.description ORDER BY f.title"); $output .= "

Feed overview

"; - $output .= "\n"; - $output .= " \n"; + + $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3)); + unset($rows); while ($feed = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(check_output($feed->title), check_output($feed->attributes), format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid))); } - $output .= "
titleattributesitemslast updatenext updateoperations
". check_output($feed->title) ."". check_output($feed->attributes) ."". format_plural($feed->items, "item", "items") ."". ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never") ."". ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never") ."". la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)) ."". la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)) ."". la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)) ."
\n"; + $output .= table($header, $rows); $result = db_query("SELECT * FROM bundle ORDER BY title"); $output .= "

Bundle overview

"; - $output .= "\n"; - $output .= " \n"; + + $header = array(t("title"), t("attributes"), t("operations")); + unset($rows); while ($bundle = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(check_output($bundle->title), check_output($bundle->attributes), la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid))); } - $output .= "
titleattributesoperations
". check_output($bundle->title) ."". check_output($bundle->attributes) ."". la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)) ."
\n"; + $output .= table($header, $rows); return $output; } @@ -407,12 +409,12 @@ function import_tag() { $result = db_query("SELECT i.*, f.title AS feed FROM item i LEFT JOIN feed f ON i.fid = f.fid ORDER BY i.iid DESC LIMIT 50"); - $output .= "\n"; - $output .= " \n"; + $header = array(t("date"), t("feed"), t("news item")); while ($item = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "link) ."\">". check_output($item->title) ."". ($item->description ? "
". check_output($item->description, 1) ."" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); } - $output .= "
timefeeditem
". format_date($item->timestamp, "custom", "m/d/y") ."
". format_date($item->timestamp, "custom", "H:i") ."
". la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)) ."link) ."\">". check_output($item->title) ."". ($item->description ? "
". check_output($item->description, 1) ."" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />
\n"; + + $output .= table($header, $rows); $output .= "\n"; return form($output); diff --git a/modules/aggregator/aggregator.module b/modules/aggregator/aggregator.module index 53ce4ea68..5243ea6dc 100644 --- a/modules/aggregator/aggregator.module +++ b/modules/aggregator/aggregator.module @@ -383,22 +383,24 @@ function import_view() { $result = db_query("SELECT f.*, COUNT(i.iid) AS items FROM feed f LEFT JOIN item i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.timestamp, f.attributes, f.link, f.description ORDER BY f.title"); $output .= "

Feed overview

"; - $output .= "\n"; - $output .= " \n"; + + $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3)); + unset($rows); while ($feed = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(check_output($feed->title), check_output($feed->attributes), format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid))); } - $output .= "
titleattributesitemslast updatenext updateoperations
". check_output($feed->title) ."". check_output($feed->attributes) ."". format_plural($feed->items, "item", "items") ."". ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never") ."". ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never") ."". la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)) ."". la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)) ."". la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)) ."
\n"; + $output .= table($header, $rows); $result = db_query("SELECT * FROM bundle ORDER BY title"); $output .= "

Bundle overview

"; - $output .= "\n"; - $output .= " \n"; + + $header = array(t("title"), t("attributes"), t("operations")); + unset($rows); while ($bundle = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(check_output($bundle->title), check_output($bundle->attributes), la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid))); } - $output .= "
titleattributesoperations
". check_output($bundle->title) ."". check_output($bundle->attributes) ."". la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)) ."
\n"; + $output .= table($header, $rows); return $output; } @@ -407,12 +409,12 @@ function import_tag() { $result = db_query("SELECT i.*, f.title AS feed FROM item i LEFT JOIN feed f ON i.fid = f.fid ORDER BY i.iid DESC LIMIT 50"); - $output .= "\n"; - $output .= " \n"; + $header = array(t("date"), t("feed"), t("news item")); while ($item = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "link) ."\">". check_output($item->title) ."". ($item->description ? "
". check_output($item->description, 1) ."" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); } - $output .= "
timefeeditem
". format_date($item->timestamp, "custom", "m/d/y") ."
". format_date($item->timestamp, "custom", "H:i") ."
". la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)) ."link) ."\">". check_output($item->title) ."". ($item->description ? "
". check_output($item->description, 1) ."" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />
\n"; + + $output .= table($header, $rows); $output .= "\n"; return form($output); diff --git a/modules/import.module b/modules/import.module index 53ce4ea68..5243ea6dc 100644 --- a/modules/import.module +++ b/modules/import.module @@ -383,22 +383,24 @@ function import_view() { $result = db_query("SELECT f.*, COUNT(i.iid) AS items FROM feed f LEFT JOIN item i ON f.fid = i.fid GROUP BY f.fid, f.title, f.url, f.refresh, f.timestamp, f.attributes, f.link, f.description ORDER BY f.title"); $output .= "

Feed overview

"; - $output .= "\n"; - $output .= " \n"; + + $header = array(t("title"), t("attributes"), t("items"), t("last update"), t("next update"), array("data" => t("operations"), "colspan" => 3)); + unset($rows); while ($feed = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(check_output($feed->title), check_output($feed->attributes), format_plural($feed->items, "item", "items"), ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never"), ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never"), la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)), la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)), la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid))); } - $output .= "
titleattributesitemslast updatenext updateoperations
". check_output($feed->title) ."". check_output($feed->attributes) ."". format_plural($feed->items, "item", "items") ."". ($feed->timestamp ? format_interval(time() - $feed->timestamp) ." ago" : "never") ."". ($feed->timestamp ? format_interval($feed->timestamp + $feed->refresh - time()) ." left" : "never") ."". la(t("edit feed"), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $feed->fid)) ."". la(t("remove items"), array("mod" => "import", "type" => "feed", "op" => "remove", "id" => $feed->fid)) ."". la(t("update items"), array("mod" => "import", "type" => "feed", "op" => "update", "id" => $feed->fid)) ."
\n"; + $output .= table($header, $rows); $result = db_query("SELECT * FROM bundle ORDER BY title"); $output .= "

Bundle overview

"; - $output .= "\n"; - $output .= " \n"; + + $header = array(t("title"), t("attributes"), t("operations")); + unset($rows); while ($bundle = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(check_output($bundle->title), check_output($bundle->attributes), la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid))); } - $output .= "
titleattributesoperations
". check_output($bundle->title) ."". check_output($bundle->attributes) ."". la(t("edit bundle"), array("mod" => "import", "type" => "bundle", "op" => "edit", "id" => $bundle->bid)) ."
\n"; + $output .= table($header, $rows); return $output; } @@ -407,12 +409,12 @@ function import_tag() { $result = db_query("SELECT i.*, f.title AS feed FROM item i LEFT JOIN feed f ON i.fid = f.fid ORDER BY i.iid DESC LIMIT 50"); - $output .= "\n"; - $output .= " \n"; + $header = array(t("date"), t("feed"), t("news item")); while ($item = db_fetch_object($result)) { - $output .= " \n"; + $rows[] = array(array("data" => format_date($item->timestamp, "small"), "nowrap" => "nowrap", "valign" => "top"), array("data" => la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)), "valign" => "top"), "link) ."\">". check_output($item->title) ."". ($item->description ? "
". check_output($item->description, 1) ."" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />"); } - $output .= "
timefeeditem
". format_date($item->timestamp, "custom", "m/d/y") ."
". format_date($item->timestamp, "custom", "H:i") ."
". la(check_output($item->feed), array("mod" => "import", "type" => "feed", "op" => "edit", "id" => $item->fid)) ."link) ."\">". check_output($item->title) ."". ($item->description ? "
". check_output($item->description, 1) ."" : "") ."
iid]\" value=\"". check_form($item->attributes) ."\" size=\"50\" />
\n"; + + $output .= table($header, $rows); $output .= "\n"; return form($output); -- cgit v1.2.3