]> git.wh0rd.org - tt-rss.git/blobdiff - modules/popup-dialog.php
Extended Actions to include Select by tag (add local modifications, fix
[tt-rss.git] / modules / popup-dialog.php
index 6cb60eef43fa53edbdb06ade74309e202978c48a..4d2408d15197795718abb136f4d42b9446665d09 100644 (file)
                        print "</div>";
 
                        print "]]></content>";
+               }
 
-                       //return;
+               if ($id == 'printTagSelect') {
+                       print "<title>" . __('Select item(s) by tags') . "</title>";
+                       print "<content><![CDATA[";
+
+                       print __("Match:"). "&nbsp;" .
+                                 "<input class=\"noborder\" dojoType=\"dijit.form.RadioButton\" type=\"radio\" checked value=\"any\" name=\"tag_mode\">&nbsp;Any&nbsp;";
+                       print "<input class=\"noborder\" dojoType=\"dijit.form.RadioButton\" type=\"radio\" value=\"all\" name=\"tag_mode\">&nbsp;All&nbsp;";
+                       print "&nbsp;tags.";
+
+                       print "<select id=\"all_tags\" name=\"all_tags\" title=\"" . __('Which Tags?') . "\" multiple=\"multiple\" size=\"10\" style=\"width : 100%\">";
+                       $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags WHERE owner_uid = ".$_SESSION['uid']."
+                               AND LENGTH(tag_name) <= 30 ORDER BY tag_name ASC");
+
+                       while ($row = db_fetch_assoc($result)) {
+                               $tmp = htmlspecialchars($row["tag_name"]);
+                               print "<option value=\"" . str_replace(" ", "%20", $tmp) . "\">$tmp</option>";
+                       }
+
+                       print "</select>";
+
+                       print "<div align='right'>";
+                       print "<button dojoType=\"dijit.form.Button\" onclick=\"viewfeed(get_all_tags($('all_tags')),
+                               get_radio_checked($('tag_mode')));\">" . __('Display entries') . "</button>";
+                       print "&nbsp;";
+                       print "<button dojoType=\"dijit.form.Button\"
+                       onclick=\"return closeInfoBox()\">" .
+                               __('Close this window') . "</button>";
+                       print "</div>";
+
+                       print "]]></content>";
                }
 
                if ($id == "emailArticle") {