]> git.wh0rd.org Git - tt-rss.git/commitdiff
display last update times in PrefFeedTree (closes #284)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 28 Dec 2010 08:39:12 +0000 (11:39 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 28 Dec 2010 08:39:12 +0000 (11:39 +0300)
PrefFeedTree.js
modules/pref-feeds.php
tt-rss.css

index 27709cdb7028348df4055366d40edea6f81194cd..db59b5081b83d030da4b2c9c59f63e195afee0b1 100644 (file)
@@ -26,6 +26,15 @@ dojo.declare("fox.PrefFeedTree", lib.CheckBoxTree, {
                if (args.item.icon)
                        tnode.iconNode.src = args.item.icon[0];
 
+               var param = this.model.store.getValue(args.item, 'param');
+
+               if (param) {
+                       param = dojo.doc.createElement('span');
+                       param.className = 'feedParam';
+                       param.innerHTML = args.item.param[0];
+                       dojo.place(param, tnode.labelNode, 'after');
+               }
+
                return tnode;
        },
        onDndDrop: function() {
index f97c6987af043bb59a3d54c3c2d6f50d61447f90..66902d4412323d14e6f3a705f639e3c3448d022f 100644 (file)
@@ -55,7 +55,8 @@
                                        $cat['items'] = array();
                                        $cat['type'] = 'category';
        
-                                       $feed_result = db_query($link, "SELECT id, title, last_error 
+                                       $feed_result = db_query($link, "SELECT id, title, last_error,
+                                               ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
                                                FROM ttrss_feeds
                                                WHERE cat_id = '".$line['id']."' AND owner_uid = ".$_SESSION["uid"].
                                                " ORDER BY order_id, title");
@@ -68,6 +69,8 @@
                                                $feed['checkbox'] = false;
                                                $feed['error'] = $feed_line['last_error'];
                                                $feed['icon'] = getFeedIcon($feed_line['id']);
+                                               $feed['param'] = make_local_datetime($link, 
+                                                       $feed_line['last_updated'], true);
 
                                                array_push($cat['items'], $feed);
                                        }
@@ -84,7 +87,8 @@
                                $cat['items'] = array();
                                $cat['type'] = 'category';
 
-                               $feed_result = db_query($link, "SELECT id, title,last_error 
+                               $feed_result = db_query($link, "SELECT id, title,last_error,
+                                       ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
                                        FROM ttrss_feeds
                                        WHERE cat_id IS NULL AND owner_uid = ".$_SESSION["uid"].
                                        " ORDER BY order_id, title");
                                        $feed['checkbox'] = false;
                                        $feed['error'] = $feed_line['last_error'];
                                        $feed['icon'] = getFeedIcon($feed_line['id']);
+                                       $feed['param'] = make_local_datetime($link, 
+                                               $feed_line['last_updated'], true);
 
                                        array_push($cat['items'], $feed);
                                }
        
                                array_push($root['items'], $cat);
                        } else {
-                               $feed_result = db_query($link, "SELECT id, title, last_error 
+                               $feed_result = db_query($link, "SELECT id, title, last_error,
+                                       ".SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
                                        FROM ttrss_feeds
                                        WHERE owner_uid = ".$_SESSION["uid"].
                                        " ORDER BY order_id, title");
                                        $feed['checkbox'] = false;
                                        $feed['error'] = $feed_line['last_error'];
                                        $feed['icon'] = getFeedIcon($feed_line['id']);
+                                       $feed['param'] = make_local_datetime($link, 
+                                               $feed_line['last_updated'], true);
 
                                        array_push($root['items'], $feed);
                                }
index 3137cbd52009913a3b46cd35d51340b3d97327bf..928a5e94fa55b73c94ef6bb9971f718890046a43 100644 (file)
@@ -1592,6 +1592,12 @@ div.fatalError textarea {
        font-weight : bold;
 }
 
+.feedParam {
+       color : gray;
+       float : right;
+       margin-right : 1em;
+}
+
 .dijitTreeLabel.Disabled, .labelParam.Disabled {
        color : gray;
 }