Code

added search_checkboxes as an option for the search form
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 7 Apr 2004 23:32:59 +0000 (23:32 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 7 Apr 2004 23:32:59 +0000 (23:32 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2266 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
templates/classic/html/page.html
templates/classic/html/style.css

index f718a390432ae02e448b88d98987e4db77854a60..14d8a923f230fe7819f33297b88b99bdb5a88e85 100644 (file)
@@ -10,6 +10,7 @@ Feature:
 - tracker name at end of page title (sf rfe 926840)
 - roundup-server now uses the ForkingMixin
 - added another sample detector "creator_resolution"
+- added search_checkboxes as an option for the search form
 
 Fixed:
 - web CSV export was busted (as was any action returning a result)
index a1eb910751371f778f8371429f0f4b57c9263bd4..1ff5a1bdb1d891509d2e15b104051a2d6421a17d 100644 (file)
   </select>
 </td>
 
+<td metal:define-macro="search_checkboxes">
+ <ul class="search-checkboxes"
+     tal:define="value python:request.form.getvalue(name)">
+ <li tal:repeat="s python:db[db_klass].list()">
+  <input type="checkbox" tal:attributes="name name; id string:name-${s/id};
+    value s/id; checked python:value == s.id" />
+  <label tal:attributes="for string:$name-${s/id}" tal:content="s/name" />
+ </li>
+ <li metal:define-slot="no_value_item">
+  <input type="checkbox" value="-1" tal:attributes="name name;
+     id string:$name--1; checked python:value == '-1'" />
+  <label tal:attributes="for string:$name--1">no value</label>
+ </li>
+ </ul>
+</td>
+
 <td metal:define-macro="column_input">
   <input type="checkbox" name="@columns"
          tal:attributes="value name;
index b14f63bab2923b599e453b3d7623f857c11107e3..ab1d615b17de9f30721a1845de991cb9113d13ce 100644 (file)
@@ -91,6 +91,18 @@ p.error-message {
 }
 
 
+/* style for search forms */
+ul.search-checkboxes {
+    display: inline;
+    padding: none;
+    list-style: none;
+}
+ul.search-checkboxes > li {
+    display: inline;
+    padding-right: .5em;
+}
+
+
 /* style for forms */
 table.form {
   padding: 2px;