mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-02-10 16:01:33 +00:00
mobile: code cleanup; show archived feed; reinstate feedlist icons
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
define('MOBILE_FEEDLIST_ENABLE_ICONS', false);
|
|
||||||
define('TTRSS_SESSION_NAME', 'ttrss_m_sid');
|
define('TTRSS_SESSION_NAME', 'ttrss_m_sid');
|
||||||
|
|
||||||
function render_feeds_list($link) {
|
function render_feeds_list($link) {
|
||||||
@@ -50,41 +49,10 @@
|
|||||||
print "<li class=\"$holder_class\"><ul class=\"feedCatList\">";
|
print "<li class=\"$holder_class\"><ul class=\"feedCatList\">";
|
||||||
}
|
}
|
||||||
|
|
||||||
$num_total = getFeedUnread($link, -4);
|
foreach (array(-4, -3, -1, -2, 0) as $i) {
|
||||||
|
printMobileFeedEntry($i, "virt", false, false,
|
||||||
$class = "virt";
|
false, $link);
|
||||||
|
}
|
||||||
if ($num_total > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printMobileFeedEntry(-4, $class, __("All articles"), $num_total,
|
|
||||||
"../../images/fresh.png", $link);
|
|
||||||
|
|
||||||
$num_fresh = getFeedUnread($link, -3);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_fresh > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printMobileFeedEntry(-3, $class, __("Fresh articles"), $num_fresh,
|
|
||||||
"../../images/fresh.png", $link);
|
|
||||||
|
|
||||||
$num_starred = getFeedUnread($link, -1);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
if ($num_starred > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printMobileFeedEntry(-1, $class, __("Starred articles"), $num_starred,
|
|
||||||
"../../images/mark_set.png", $link);
|
|
||||||
|
|
||||||
$class = "virt";
|
|
||||||
|
|
||||||
$num_published = getFeedUnread($link, -2);
|
|
||||||
|
|
||||||
if ($num_published > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
printMobileFeedEntry(-2, $class, __("Published articles"), $num_published,
|
|
||||||
"../../images/pub_set.png", $link);
|
|
||||||
|
|
||||||
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
if (get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
print "</ul>";
|
print "</ul>";
|
||||||
@@ -125,12 +93,8 @@
|
|||||||
|
|
||||||
$class = "label";
|
$class = "label";
|
||||||
|
|
||||||
if ($count > 0) {
|
|
||||||
$class .= "Unread";
|
|
||||||
}
|
|
||||||
|
|
||||||
printMobileFeedEntry(-$line["id"]-11,
|
printMobileFeedEntry(-$line["id"]-11,
|
||||||
$class, $line["caption"], $count, "../images/label.png", $link);
|
$class, $line["caption"], $count, false, $link);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,12 +189,6 @@
|
|||||||
$class = "feed";
|
$class = "feed";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($unread > 0) $class .= "Unread";
|
|
||||||
|
|
||||||
if ($actid == $feed_id) {
|
|
||||||
$class .= "Selected";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($category != $tmp_category && get_pref($link, 'ENABLE_FEED_CATS')) {
|
if ($category != $tmp_category && get_pref($link, 'ENABLE_FEED_CATS')) {
|
||||||
|
|
||||||
if ($category) {
|
if ($category) {
|
||||||
@@ -280,7 +238,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
printMobileFeedEntry($feed_id, $class, $feed, $unread,
|
printMobileFeedEntry($feed_id, $class, $feed, $unread,
|
||||||
"../icons/$feed_id.ico", $link, $rtl_content);
|
false, $link, $rtl_content);
|
||||||
|
|
||||||
++$lnum;
|
++$lnum;
|
||||||
}
|
}
|
||||||
@@ -305,10 +263,6 @@
|
|||||||
|
|
||||||
$class = "tag";
|
$class = "tag";
|
||||||
|
|
||||||
if ($unread > 0) {
|
|
||||||
$class .= "Unread";
|
|
||||||
}
|
|
||||||
|
|
||||||
printMobileFeedEntry($tag, $class, $tag, $unread,
|
printMobileFeedEntry($tag, $class, $tag, $unread,
|
||||||
"../images/tag.png", $link);
|
"../images/tag.png", $link);
|
||||||
|
|
||||||
@@ -321,6 +275,13 @@
|
|||||||
function printMobileFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link,
|
function printMobileFeedEntry($feed_id, $class, $feed_title, $unread, $icon_file, $link,
|
||||||
$rtl_content = false) {
|
$rtl_content = false) {
|
||||||
|
|
||||||
|
if (!$feed_title) $feed_title = getFeedTitle($link, $feed_id, false);
|
||||||
|
if (!$unread) $unread = getFeedUnread($link, $feed_id);
|
||||||
|
|
||||||
|
if ($unread > 0) $class .= "Unread";
|
||||||
|
|
||||||
|
if (!$icon_file) $icon_file = "../../" . getFeedIcon($feed_id);
|
||||||
|
|
||||||
if (file_exists($icon_file) && filesize($icon_file) > 0) {
|
if (file_exists($icon_file) && filesize($icon_file) > 0) {
|
||||||
$feed_icon = "<img src=\"$icon_file\">";
|
$feed_icon = "<img src=\"$icon_file\">";
|
||||||
} else {
|
} else {
|
||||||
@@ -336,9 +297,9 @@
|
|||||||
$feed = "<a href=\"?go=vf&id=$feed_id\">$feed_title</a>";
|
$feed = "<a href=\"?go=vf&id=$feed_id\">$feed_title</a>";
|
||||||
|
|
||||||
print "<li class=\"$class\">";
|
print "<li class=\"$class\">";
|
||||||
# if (get_pref($link, 'ENABLE_FEED_ICONS')) {
|
if (get_pref($link, 'ENABLE_FEED_ICONS')) {
|
||||||
# print "$feed_icon";
|
print "$feed_icon";
|
||||||
# }
|
}
|
||||||
|
|
||||||
print "<span $rtl_tag>$feed</span> ";
|
print "<span $rtl_tag>$feed</span> ";
|
||||||
|
|
||||||
|
|||||||
@@ -27,14 +27,12 @@ h3 {
|
|||||||
#heading {
|
#heading {
|
||||||
font-size : small;
|
font-size : small;
|
||||||
|
|
||||||
/* border-width : 0px 0px 1px 0px;
|
border-width : 0px 0px 1px 0px;
|
||||||
border-style : solid;
|
border-style : solid;
|
||||||
border-color : #88b0ff;
|
border-color : #f0f0f0;
|
||||||
background : #ecf4ff; */
|
|
||||||
|
|
||||||
color : #88b0ff;
|
color : #88b0ff;
|
||||||
font-weight : bold;
|
font-weight : bold;
|
||||||
margin-bottom : 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#content {
|
#content {
|
||||||
|
|||||||
Reference in New Issue
Block a user