]> git.wh0rd.org Git - tt-rss.git/commitdiff
group-by-feed tweaks
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 30 Apr 2008 03:37:56 +0000 (04:37 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 30 Apr 2008 03:37:56 +0000 (04:37 +0100)
functions.php
tt-rss.css

index 426566eccb6779c0a569af0888f544404bc31031..a93b36a677781532d8b2ed24db958efc2eb8a2ac 100644 (file)
 
                                if ($vfeed_query_part && defined('_VFEED_GROUP_BY_FEED')) {
                                        if (!$override_order) {
-                                               $order_by = "ttrss_feeds.id, $order_by";
+                                               $order_by = "ttrss_feeds.title, $order_by";     
+                                       }
+
+                                       if ($feed == -3) {
+                                               $group_limit_part = "(select count(*) from 
+                                                       ttrss_user_entries AS t1, ttrss_entries AS t2 where
+                                                               t1.ref_id = t2.id and t1.owner_uid = 2 and
+                                                               t1.feed_id = ttrss_user_entries.feed_id and
+                                                               t2.updated > ttrss_entries.updated) <= 5 AND";
                                        }
                                }
 
                                        FROM
                                                ttrss_entries,ttrss_user_entries,ttrss_feeds
                                        WHERE
+                                       $group_limit_part
                                        ttrss_feeds.hidden = false AND
                                        ttrss_user_entries.feed_id = ttrss_feeds.id AND
                                        ttrss_user_entries.ref_id = ttrss_entries.id AND
 
                                        if (defined('_VFEED_GROUP_BY_FEED')) {
                                                if ($line["feed_title"] != $cur_feed_title) {
+/*                                                     print "<tr class='feedTitle'><td colspan='7'>".
+                                                               $line["feed_title"].
+                                                               " (<a href=\"javascript:viewfeed($feed_id, '', false)\">".
+                                                               "more</a>)</td></tr>"; */
+
                                                        print "<tr class='feedTitle'><td colspan='7'>".
                                                                "<a href=\"javascript:viewfeed($feed_id, '', false)\">".
                                                                $line["feed_title"]."</a>:</td></tr>";
+
                                                        $cur_feed_title = $line["feed_title"];
                                                }
                                        }
index d01ac5d65978b779502e99a08979b836b1ae6ea7..1cb36247f63a7d8b4df1412ba99d1611e93f0543 100644 (file)
@@ -1744,7 +1744,6 @@ a.visibleLink {
 }
 
 table.headlinesList tr.feedTitle td a, div.cdmFeedTitle a {
-       padding-left : 5px;
        color : #4684ff;
 }
 
@@ -1752,10 +1751,11 @@ div.cdmFeedTitle {
        border-color : #a0a0a0;
        border-width : 0px 0px 1px 0px;
        border-style : solid;
-       padding : 5px 5px 5px 0px;
+       padding : 5px;
 }
 
 table.headlinesList tr.feedTitle td {
 /*     text-align : right;
        margin-top : 10px; */
+       padding-left : 5px;
 }