]> git.wh0rd.org Git - tt-rss.git/commitdiff
display article labels in headlines buffer
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 13:54:40 +0000 (14:54 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 13:54:40 +0000 (14:54 +0100)
functions.php
modules/backend-rpc.php
schema/ttrss_schema_mysql.sql
schema/ttrss_schema_pgsql.sql
tt-rss.css
viewfeed.js

index 793fa5f40a48b3a3e577bcde7acd9098e5e701ca..2084e632612f24dc65b8d1d4515e6d1c8549b0c6 100644 (file)
 
        function initialize_user($link, $uid) {
 
-               db_query($link, "INSERT INTO ttrss_labels2 (owner_uid, caption)
+/*             db_query($link, "INSERT INTO ttrss_labels2 (owner_uid, caption)
                        VALUES ('$uid', 'All Articles')");
 
                db_query($link, "INSERT INTO ttrss_filters 
                        (owner_uid, feed_id, filter_type, reg_exp, enabled, 
                                action_id, action_param, filter_param) 
-                       VALUES ('$uid', NULL, 1, '.', true, 7, 'All Articles', 'before')");
+                       VALUES ('$uid', NULL, 1, '.', true, 7, 'All Articles', 'before')"); */
 
                db_query($link, "insert into ttrss_feeds (owner_uid,title,feed_url)
                        values ('$uid', 'Tiny Tiny RSS: New Releases',
                                $id = $line["id"];
                                $feed_id = $line["feed_id"];
 
+                               $labels = get_article_labels($link, $id);
+                               $labels_str = "";
+
+                               foreach ($labels as $l) {
+                                       $labels_str .= "<span 
+                                               class='hlLabelRef'>".
+                                               $l[1]."</span>";
+                               }
+
                                if (count($topmost_article_ids) < 5) {
                                        array_push($topmost_article_ids, $id);
                                }
 
                                        print "</a>";
 
+                                       print $labels_str;
+
 #                                                      <a href=\"javascript:viewfeed($feed_id, '', false)\">".
 #                                                      $line["feed_title"]."</a>       
 
                                                }
                                        }
 
+                                       print $labels_str;
+
                                        print "</span></div>";
 
                                        if (get_pref($link, 'OPEN_LINKS_IN_NEW_WINDOW')) {
                                FROM ttrss_labels2, ttrss_user_labels2 
                        WHERE id = label_id 
                                AND article_id = '$id' 
-                               AND owner_uid = ".$_SESSION["uid"]);
+                               AND owner_uid = ".$_SESSION["uid"] . "
+                       ORDER BY caption");
 
                $rv = array();
 
index 4b67e1b38bef6e85dc62c1a0ea9ef5e7c6ed906f..918f8ca9084c6248c79b00eefc3bb43de2c12549 100644 (file)
                                }
                        }
 
-                       print "<rpc-reply><counters>";
-
-                       if ($label) {
-                               getGlobalCounters($link);
-                               getLabelCounters($link);
-                               if (get_pref($link, 'ENABLE_FEED_CATS')) {
-                                       getCategoryCounters($link);
-                               }
-                       }
-
-                       print "</counters></rpc-reply>";
+                       print "<rpc-reply>OK</rpc-reply>";
 
                        return;
                }
index 8ba72e8f488c4de5bc0ded1f1b9c28cb625d1c07..11b2106e09013b27ceb336bd2d0a0a15dce253ba 100644 (file)
@@ -400,12 +400,12 @@ create table ttrss_labels2 (id integer not null primary key auto_increment,
        foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE
 ) TYPE=InnoDB;
 
-INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
-
-INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled, 
-    action_id, action_param, filter_param) 
-    VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
-
+--INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
+--
+--INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled, 
+--    action_id, action_param, filter_param) 
+--    VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
+--
 create table ttrss_user_labels2 (label_id integer not null,
        article_id integer not null,
        foreign key (label_id) references ttrss_labels2(id) ON DELETE CASCADE,
index 6c7f9d98a3ad05747fa5a6862c2b65b57c998be5..b2ea2a596af1006f96ebaa5bd01e406379a98c16 100644 (file)
@@ -368,11 +368,11 @@ create table ttrss_labels2 (id serial not null primary key,
        caption varchar(250) not null
 );
 
-INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
-
-INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled, 
-    action_id, action_param, filter_param) 
-    VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
+--INSERT INTO ttrss_labels2 (owner_uid, caption) VALUES (1, 'All Articles');
+--
+--INSERT INTO ttrss_filters (owner_uid, feed_id, filter_type, reg_exp, enabled, 
+--    action_id, action_param, filter_param) 
+--    VALUES (1, NULL, 1, '.', true, 7, 'All Articles', 'before');
 
 create table ttrss_user_labels2 (
        label_id integer not null references ttrss_labels2(id) ON DELETE CASCADE,
index 7cf2bcf5e716da99095cb924005fd4a6e1115a55..69516b8f1ca5dd954908d15ff53c0675366c9d12 100644 (file)
@@ -866,6 +866,16 @@ table.headlinesList {
        width : 100%;
 }
 
+table.headlinesList span.hlLabelRef, div.cdmHeader span.hlLabelRef {
+       background-color : #fff7d5;     
+       font-height : 8px;
+       color : #063064;
+       font-weight : normal;
+       margin : 0px 3px 0px 3px;
+       padding : 0px 4px 0px 4px;
+       white-space: nowrap;
+}
+
 table.headlinesList td.hlFeedIcon {
        width : 25px;
        text-align : center;
index 5251eeb5d2e6d381adbaac3f6a94c8691006f9d4..8ac79a870ad15d7b57137d180fb779a27fd1d166 100644 (file)
@@ -907,7 +907,7 @@ function selectionAssignLabel(id) {
 
                        new Ajax.Request(query, {
                                onComplete: function(transport) { 
-                                       all_counters_callback2(transport); 
+                                       viewCurrentFeed();
                                } });
 
                }