]> git.wh0rd.org - tt-rss.git/commitdiff
viewfeed: show dashboard contents when there are no headlines to display
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 08:56:30 +0000 (11:56 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 12 Nov 2010 08:56:30 +0000 (11:56 +0300)
functions.php
tt-rss.css

index fc0f4c1e06a6284089fbc250875aaa316204781b..7bfb40277a475ddd47bd9fb8a2d0c6a511c5fdf0 100644 (file)
                                        }
                        }
 
-                       if (!$offset) print "<div class='whiteBox'>$message</div>";
+                       if (!$offset && $message) {
+                               print "<div class='whiteBox'>$message";
+
+                               print "<p class=\"small\"><span class=\"insensitive\">";
+
+                               $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 "<br/>";
+                                       print "<a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">".
+                                               __('Some feeds have update errors (click for details)')."</a>";
+                               }
+                               print "</span></p></div>";
+                       }
                }
 
                if (!$offset) {
index 09a1957ec2eb8bd4032de2d0744e53a5566006d4..de097042f5da38a234fb79963d9af79f95d677ad 100644 (file)
@@ -1065,7 +1065,6 @@ div.loadingPrompt {
 }
 
 div.whiteBox {
-       background-color : white;
        margin-left : 1px;
        text-align : center;
        padding : 1em;