]> git.wh0rd.org Git - tt-rss.git/commitdiff
some further label editor tweaks
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 16 Aug 2006 07:32:28 +0000 (08:32 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 16 Aug 2006 07:32:28 +0000 (08:32 +0100)
backend.php

index 860fec181c1a33cd64d3c23e6571e2adc29a610a..72b563d0524db17777e682a053168393dd479f06 100644 (file)
                        
                        if ($num_matches > 0) { 
 
-                               print "<p>Query returned <b>$num_matches</b> matches, showing up to first 10:</p>";
+                               if ($num_matches > 10) {
+                                       $showing_msg = ", showing first 10";
+                               }
+
+                               print "<p>Query returned <b>$num_matches</b> matches$showing_msg:</p>";
 
                                $result = db_query($link, 
                                        "SELECT ttrss_entries.title, 
 
                        print "<tr class=\"title\">
                                                <td width=\"5%\">&nbsp;</td>
-                                               <td width=\"40%\">SQL expression
+                                               <td width=\"30%\">Caption</td>
+                                               <td width=\"50%\">SQL Expression
                                                <a class=\"helpLink\" href=\"javascript:displayHelpInfobox(1)\">(?)</a>
                                                </td>
-                                               <td width=\"40%\">Caption</td></tr>";
+                                               </tr>";
                        
                        $lnum = 0;
                        
                                print "<td align='center'><input onclick='toggleSelectPrefRow(this, \"label\");' 
                                        type=\"checkbox\" id=\"LICHK-".$line["id"]."\"></td>";
        
-                               print "<td><a href=\"javascript:editLabel($label_id);\">" . 
-                                       $line["sql_exp"] . "</td>";             
-                                               
                                print "<td><a href=\"javascript:editLabel($label_id);\">" . 
                                        $line["description"] . "</td>";                 
-                               
+
+                               print "<td><a href=\"javascript:editLabel($label_id);\">" . 
+                                       $line["sql_exp"] . "</td>";             
+
                                print "</tr>";
        
                                ++$lnum;
        
                        print "<p id=\"labelOpToolbar\">";
        
-                       if ($subop == "edit") {
-                               print "Edit label:
-                                       <input type=\"submit\" class=\"button\" 
-                                               onclick=\"javascript:labelTest()\" value=\"Test\">
-                                       <input type=\"submit\" class=\"button\" 
-                                               onclick=\"javascript:labelEditSave()\" value=\"Save\">
-                                       <input type=\"submit\" class=\"button\" 
-                                               onclick=\"javascript:labelEditCancel()\" value=\"Cancel\">";
-                                               
-                       } else {        
-                               print "
+                       print "
                                        Selection:
                                <input type=\"submit\" class=\"button\" disabled=\"true\"
                                        onclick=\"javascript:editSelectedLabel()\" value=\"Edit\">
                                <input type=\"submit\" class=\"button\" disabled=\"true\"
-                                       onclick=\"javascript:removeSelectedLabels()\" value=\"Remove\">";
-                       }
+                               onclick=\"javascript:removeSelectedLabels()\" value=\"Remove\">";
+
                } else {
                        print "<p>No labels defined.</p>";
                }