summaryrefslogtreecommitdiff
path: root/backend.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-11-28 10:57:47 +0100
committerAndrew Dolgov <[email protected]>2005-11-28 10:57:47 +0100
commitf56ec297e429f9b6185960929af129d4d82b437d (patch)
treee45fbfb1f7da393f54e245ca394287d99e9cfdb9 /backend.php
parent12d7c4cdeed12543c4b282f46294af0afee19f29 (diff)
headlines: hide subtoolbar when there are no articles to display
Diffstat (limited to 'backend.php')
-rw-r--r--backend.php83
1 files changed, 39 insertions, 44 deletions
diff --git a/backend.php b/backend.php
index e22dfe8ef..7ea9bb2f8 100644
--- a/backend.php
+++ b/backend.php
@@ -915,48 +915,6 @@
$feed_title = "?";
}
- print "<table class=\"headlinesSubToolbar\"
- width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
-
- print "<td class=\"headlineActions\">
- Select:
- <a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
- 'RROW-', 'RCHK-', true)\">All</a>,
- <a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
- 'RROW-', 'RCHK-', true, 'Unread')\">Unread</a>,
- <a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
- 'RROW-', 'RCHK-', false)\">None</a>
- &nbsp;&nbsp;
- Toggle: <a href=\"javascript:toggleUnread()\">Unread</a>,
- <a href=\"javascript:toggleStarred()\">Starred</a>";
-
-/* print "&nbsp;&nbsp;
- View:
- <a href=\"javascript:limitView('All')\">All</a>,
- <a href=\"javascript:limitView('Unread')\">Unread</a>,
- <a href=\"javascript:limitView('Starred')\">Starred</a>
- &nbsp;&nbsp;
- Feed:
- <a href=\"javascript:updateCurrentFeed()\">Update</a>,
- <a href=\"javascript:catchupCurrentFeed()\">Mark as read</a>"; */
-
- print "</td>";
-
- print "<td class=\"headlineTitle\">";
-
- if ($feed_site_url) {
- print "<a target=\"_blank\" href=\"$feed_site_url\">$feed_title</a>";
- } else {
- print $feed_title;
- }
-
- print "</td>";
- print "</tr></table>";
-
- print "<table class=\"headlinesList\" id=\"headlinesList\"
- cellspacing=\"0\" width=\"100%\">";
-
-
if ($feed < -10) error_reporting (0);
if (sprintf("%d", $feed) != 0) {
@@ -1018,11 +976,48 @@
}
if (!$result) {
- print "<tr><td colspan='4' align='center'>
- Could not display feed (query failed). Please check match syntax or local configuration.</td></tr>";
+ print "<div align='center'>
+ Could not display feed (query failed). Please check match syntax or local configuration.</div>";
return;
}
+ if (db_num_rows($result) > 0) {
+
+ print "<table class=\"headlinesSubToolbar\"
+ width=\"100%\" cellspacing=\"0\" cellpadding=\"0\"><tr>";
+
+ print "<td class=\"headlineActions\">
+ Select:
+ <a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
+ 'RROW-', 'RCHK-', true)\">All</a>,
+ <a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
+ 'RROW-', 'RCHK-', true, 'Unread')\">Unread</a>,
+ <a href=\"javascript:selectTableRowsByIdPrefix('headlinesList',
+ 'RROW-', 'RCHK-', false)\">None</a>
+ &nbsp;&nbsp;
+ Toggle: <a href=\"javascript:toggleUnread()\">Unread</a>,
+ <a href=\"javascript:toggleStarred()\">Starred</a>";
+
+ print "</td>";
+
+ print "<td class=\"headlineTitle\">";
+
+ if ($feed_site_url) {
+ print "<a target=\"_blank\" href=\"$feed_site_url\">$feed_title</a>";
+ } else {
+ print $feed_title;
+ }
+
+ print "</td>";
+ print "</tr></table>";
+
+ }
+
+ print "<table class=\"headlinesList\" id=\"headlinesList\"
+ cellspacing=\"0\" width=\"100%\">";
+
+
+
$lnum = 0;
error_reporting (DEFAULT_ERROR_LEVEL);