From: Andrew Dolgov Date: Fri, 12 Nov 2010 08:56:30 +0000 (+0300) Subject: viewfeed: show dashboard contents when there are no headlines to display X-Git-Tag: 1.5.0~265 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=8f7c631ed8f3bf4f0938d412af55a4b0d5ea4995;p=tt-rss.git viewfeed: show dashboard contents when there are no headlines to display --- diff --git a/functions.php b/functions.php index fc0f4c1e..7bfb4027 100644 --- a/functions.php +++ b/functions.php @@ -5536,7 +5536,31 @@ } } - if (!$offset) print "
$message
"; + if (!$offset && $message) { + print "
$message"; + + print "

"; + + $result = db_query($link, "SELECT ".SUBSTRING_FOR_DATE."(MAX(last_updated), 1, 19) AS last_updated FROM ttrss_feeds + WHERE owner_uid = " . $_SESSION['uid']); + + $last_updated = db_fetch_result($result, 0, "last_updated"); + $last_updated = make_local_datetime($link, $last_updated, false); + + printf(__("Feeds last updated at %s"), $last_updated); + + $result = db_query($link, "SELECT COUNT(id) AS num_errors + FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); + + $num_errors = db_fetch_result($result, 0, "num_errors"); + + if ($num_errors > 0) { + print "
"; + print "". + __('Some feeds have update errors (click for details)').""; + } + print "

"; + } } if (!$offset) { diff --git a/tt-rss.css b/tt-rss.css index 09a1957e..de097042 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1065,7 +1065,6 @@ div.loadingPrompt { } div.whiteBox { - background-color : white; margin-left : 1px; text-align : center; padding : 1em;