diff options
author | Andrew Dolgov <[email protected]> | 2008-08-14 06:52:04 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2008-08-14 06:52:04 +0100 |
commit | db5c7f5ddfe3d6094bd818d121fdded87979d5ea (patch) | |
tree | b48102e42faf6bd9d61b6bbac56bac3f5fde91ec /modules/pref-feed-browser.php | |
parent | 23582ce2b4fbcbce4c4f3326788f5b848d7929e9 (diff) |
tweak feed browser UI
Diffstat (limited to 'modules/pref-feed-browser.php')
-rw-r--r-- | modules/pref-feed-browser.php | 100 |
1 files changed, 52 insertions, 48 deletions
diff --git a/modules/pref-feed-browser.php b/modules/pref-feed-browser.php index 0cbb06e9e..d213268a7 100644 --- a/modules/pref-feed-browser.php +++ b/modules/pref-feed-browser.php @@ -82,7 +82,7 @@ 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"]); @@ -112,62 +112,66 @@ onclick=\"updateBigFeedBrowser()\" value=\"".__('Show')."\"> </div>"; - print "<div id=\"fbrOpToolbar\"> - <input type='submit' class='button' onclick=\"feedBrowserSubscribe()\" - disabled=\"true\" value=\"".__('Subscribe')."\"></div>"; + if (db_num_rows($result) > 0) { - print "<ul class='nomarks' id='browseBigFeedList'>"; - - $feedctr = 0; - - while ($line = db_fetch_assoc($result)) { - $feed_url = $line["feed_url"]; - $subscribers = $line["subscribers"]; - - // mysql returns NULL records first by default - if (DB_TYPE == "mysql") $order_fix = "DESC"; - - $det_result = db_query($link, "SELECT site_url,title,id - FROM ttrss_feeds WHERE feed_url = '$feed_url' - ORDER BY last_updated $order_fix LIMIT 1"); - - $details = db_fetch_assoc($det_result); - - $icon_file = ICONS_DIR . "/" . $details["id"] . ".ico"; - - 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 "<div id=\"fbrOpToolbar\"> + <input type='submit' class='button' onclick=\"feedBrowserSubscribe()\" + disabled=\"true\" value=\"".__('Subscribe')."\"></div>"; + + print "<ul class='nomarks' id='browseBigFeedList'>"; + + $feedctr = 0; + + while ($line = db_fetch_assoc($result)) { + $feed_url = $line["feed_url"]; + $subscribers = $line["subscribers"]; + + // mysql returns NULL records first by default + if (DB_TYPE == "mysql") $order_fix = "DESC"; + + $det_result = db_query($link, "SELECT site_url,title,id + FROM ttrss_feeds WHERE feed_url = '$feed_url' + ORDER BY last_updated $order_fix LIMIT 1"); + + $details = db_fetch_assoc($det_result); - print "<div class=\"browserDetails\" style=\"display : none\" id=\"BRDET-" . $details["id"] . "\">"; - print "</div>"; + $icon_file = ICONS_DIR . "/" . $details["id"] . ".ico"; + + 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; + } + + print "</ul>"; + } if ($feedctr == 0) { - print "<li>".__('No feeds found to subscribe.')."</li>"; + print "<div>".__('No feeds found.')."</div>"; } - print "</ul>"; - print "</div>"; } ?> |