mirror of
https://tt-rss.org/git/tt-rss.git
synced 2024-06-25 11:57:42 +02:00
tweak feed browser UI
This commit is contained in:
parent
23582ce2b4
commit
db5c7f5ddf
|
@ -82,7 +82,7 @@
|
||||||
|
|
||||||
set_pref($link, "_PREFS_ACTIVE_TAB", "feedBrowser");
|
set_pref($link, "_PREFS_ACTIVE_TAB", "feedBrowser");
|
||||||
|
|
||||||
print "<div>".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
|
print "<div class=\"insensitive\">".__('This panel shows feeds subscribed by other users of this system, just in case you are interested in them too.')."</div>";
|
||||||
|
|
||||||
$limit = db_escape_string($_GET["limit"]);
|
$limit = db_escape_string($_GET["limit"]);
|
||||||
|
|
||||||
|
@ -112,62 +112,66 @@
|
||||||
onclick=\"updateBigFeedBrowser()\" value=\"".__('Show')."\">
|
onclick=\"updateBigFeedBrowser()\" value=\"".__('Show')."\">
|
||||||
</div>";
|
</div>";
|
||||||
|
|
||||||
print "<div id=\"fbrOpToolbar\">
|
if (db_num_rows($result) > 0) {
|
||||||
<input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
|
|
||||||
disabled=\"true\" value=\"".__('Subscribe')."\"></div>";
|
|
||||||
|
|
||||||
print "<ul class='nomarks' id='browseBigFeedList'>";
|
print "<div id=\"fbrOpToolbar\">
|
||||||
|
<input type='submit' class='button' onclick=\"feedBrowserSubscribe()\"
|
||||||
$feedctr = 0;
|
disabled=\"true\" value=\"".__('Subscribe')."\"></div>";
|
||||||
|
|
||||||
while ($line = db_fetch_assoc($result)) {
|
print "<ul class='nomarks' id='browseBigFeedList'>";
|
||||||
$feed_url = $line["feed_url"];
|
|
||||||
$subscribers = $line["subscribers"];
|
$feedctr = 0;
|
||||||
|
|
||||||
// mysql returns NULL records first by default
|
while ($line = db_fetch_assoc($result)) {
|
||||||
if (DB_TYPE == "mysql") $order_fix = "DESC";
|
$feed_url = $line["feed_url"];
|
||||||
|
$subscribers = $line["subscribers"];
|
||||||
$det_result = db_query($link, "SELECT site_url,title,id
|
|
||||||
FROM ttrss_feeds WHERE feed_url = '$feed_url'
|
// mysql returns NULL records first by default
|
||||||
ORDER BY last_updated $order_fix LIMIT 1");
|
if (DB_TYPE == "mysql") $order_fix = "DESC";
|
||||||
|
|
||||||
$details = db_fetch_assoc($det_result);
|
$det_result = db_query($link, "SELECT site_url,title,id
|
||||||
|
FROM ttrss_feeds WHERE feed_url = '$feed_url'
|
||||||
$icon_file = ICONS_DIR . "/" . $details["id"] . ".ico";
|
ORDER BY last_updated $order_fix LIMIT 1");
|
||||||
|
|
||||||
if (file_exists($icon_file) && filesize($icon_file) > 0) {
|
$details = db_fetch_assoc($det_result);
|
||||||
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL .
|
|
||||||
"/".$details["id"].".ico\">";
|
|
||||||
} else {
|
|
||||||
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
|
|
||||||
}
|
|
||||||
|
|
||||||
$check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB'
|
|
||||||
type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
|
|
||||||
|
|
||||||
$class = ($feedctr % 2) ? "even" : "odd";
|
|
||||||
|
|
||||||
print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
|
|
||||||
"$feed_icon ";
|
|
||||||
|
|
||||||
print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" .
|
|
||||||
$details["title"] ."</a> " .
|
|
||||||
"<span class='subscribers'>($subscribers)</span>";
|
|
||||||
|
|
||||||
print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">";
|
$icon_file = ICONS_DIR . "/" . $details["id"] . ".ico";
|
||||||
print "</div>";
|
|
||||||
|
if (file_exists($icon_file) && filesize($icon_file) > 0) {
|
||||||
|
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"" . ICONS_URL .
|
||||||
|
"/".$details["id"].".ico\">";
|
||||||
|
} else {
|
||||||
|
$feed_icon = "<img class=\"tinyFeedIcon\" src=\"images/blank_icon.gif\">";
|
||||||
|
}
|
||||||
|
|
||||||
|
$check_box = "<input onclick='toggleSelectFBListRow(this)' class='feedBrowseCB'
|
||||||
|
type=\"checkbox\" id=\"FBCHK-" . $details["id"] . "\">";
|
||||||
|
|
||||||
|
$class = ($feedctr % 2) ? "even" : "odd";
|
||||||
|
|
||||||
|
print "<li class='$class' id=\"FBROW-".$details["id"]."\">$check_box".
|
||||||
|
"$feed_icon ";
|
||||||
|
|
||||||
|
print "<a href=\"javascript:browserToggleExpand('".$details["id"]."')\">" .
|
||||||
|
$details["title"] ."</a> " .
|
||||||
|
"<span class='subscribers'>($subscribers)</span>";
|
||||||
|
|
||||||
print "</li>";
|
print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">";
|
||||||
|
print "</div>";
|
||||||
|
|
||||||
|
print "</li>";
|
||||||
|
|
||||||
++$feedctr;
|
++$feedctr;
|
||||||
|
}
|
||||||
|
|
||||||
|
print "</ul>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($feedctr == 0) {
|
if ($feedctr == 0) {
|
||||||
print "<li>".__('No feeds found to subscribe.')."</li>";
|
print "<div>".__('No feeds found.')."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</ul>";
|
|
||||||
|
|
||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user