diff templates/classic/html/page.html @ 2269:bb152a04bee7 maint-0.7

make search page useful for popup listings
author Richard Jones <richard@users.sourceforge.net>
date Fri, 07 May 2004 00:48:08 +0000
parents 638600b0d682
children 35b4435d2ef2 5cc6e1d295e1
line wrap: on
line diff
--- a/templates/classic/html/page.html	Thu May 06 23:23:20 2004 +0000
+++ b/templates/classic/html/page.html	Fri May 07 00:48:08 2004 +0000
@@ -115,11 +115,30 @@
 </html>
 </tal:block>
 
+<!--
+The following macros are intended to be used in search pages.
+
+The invoking context must define a "name" variable which names the
+property being searched.
+
+See issue.search.html in the classic template for examples.
+-->
 <td metal:define-macro="search_input">
   <input tal:attributes="value python:request.form.getvalue(name) or nothing;
                          name name">
 </td>
 
+<td metal:define-macro="search_popup">
+  <!-- 
+    context needs to specify the popup "columns" as a comma-separated
+    string (eg. "id,title" or "id,name,description") as well as name
+  -->
+  <input tal:attributes="value python:request.form.getvalue(name) or nothing;
+                         name name">
+  <span tal:replace="structure python:db.issue.classhelp(columns,
+                                      property=name)" />
+</td>
+
 <td metal:define-macro="search_select">
   <select tal:attributes="name name"
           tal:define="value python:request.form.getvalue(name)">

Roundup Issue Tracker: http://roundup-tracker.org/