From: Andrew Dolgov Date: Fri, 1 Dec 2006 06:26:05 +0000 (+0100) Subject: tweak feed errors notification X-Git-Tag: 1.2.6~38 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=a3656a415f2e557014eef45a395ad19e10771ff5;p=tt-rss.git tweak feed errors notification --- diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index 02282f46..d3933ae7 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -240,6 +240,36 @@ } + if ($id == "feedUpdateErrors") { + + print "
Update Errors
"; + print "
"; + + print "These feeds have not been updated because of errors:"; + + $result = db_query($link, "SELECT id,title,feed_url,last_error + FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); + + print ""; + print "
"; + + print "
"; + + print ""; + + print "
"; + + } + print ""; } ?> diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index af8fd093..0572978d 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -710,31 +710,16 @@ if ($quiet) return; -// print "

Edit Feeds

"; - - $result = db_query($link, "SELECT id,title,feed_url,last_error + $result = db_query($link, "SELECT COUNT(id) AS num_errors FROM ttrss_feeds WHERE last_error != '' AND owner_uid = ".$_SESSION["uid"]); - if (db_num_rows($result) > 0) { - - print "
"; - -// print""; - - print " - Some feeds have update errors (click for details)"; - - print ""; - print "
"; + if ($num_errors > 0) { + print "Some feeds have update errors (click + for details)"; } $feed_search = db_escape_string($_GET["search"]); diff --git a/prefs.js b/prefs.js index 85ae91af..6b772b1c 100644 --- a/prefs.js +++ b/prefs.js @@ -1544,3 +1544,7 @@ function editFeedCats() { xmlhttp.onreadystatechange=infobox_callback; xmlhttp.send(null); } + +function showFeedsWithErrors() { + displayDlg('feedUpdateErrors'); +} diff --git a/tt-rss.css b/tt-rss.css index 3459ac38..fa99ebfe 100644 --- a/tt-rss.css +++ b/tt-rss.css @@ -1307,3 +1307,9 @@ div.return a:hover { bottom : 2px; right : 2px; } + +a.feedUpdErrLink { + color : #ff0000; + display : block; + margin-bottom : 0.5em; +}