1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 09:55:56 +00:00

implement a simple pseudo-dashboard feed; display feeds having update errors there instead of client-based 'no feed selected' whiteBox plug (closes #189)

This commit is contained in:
Andrew Dolgov
2010-11-04 19:11:54 +03:00
parent 85a922895f
commit fe1087fbb7
5 changed files with 45 additions and 6 deletions

View File

@@ -6828,4 +6828,31 @@
return $headlines;
}
function generate_dashboard_feed($link) {
print "<headlines id=\"-5\" is_cat=\"\">";
print '<![CDATA[<div id="headlinesContainer">';
print "<div class='whiteBox'>".__('No feed selected.');
$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 "<p><a class=\"insensitive\" href=\"#\" onclick=\"showFeedsWithErrors()\">".
__('Some feeds have update errors (click for details)')."</a>";
}
print "</div>]]>";
print "</headlines>";
print "<headlines-count value=\"0\"/>";
print "<vgroup-last-feed value=\"0\"/>";
print "<headlines-unread value=\"0\"/>";
print "<disable-cache value=\"1\"/>";
}
?>