Skip to content

Commit 6c01a7e

Browse files
author
Richard Jones
committed
make search page useful for popup listings
1 parent 66f1d2e commit 6c01a7e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

templates/classic/html/issue.search.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<span metal:fill-slot="body_title" tal:omit-tag="python:1">Issue searching</span>
44
<td class="content" metal:fill-slot="content">
55

6-
<form method="GET" tal:attributes="action request/classname">
6+
<form method="GET" name="itemSynopsis"
7+
tal:attributes="action request/classname">
78

89
<table class="form" tal:define="
910
cols python:request.columns or 'id activity title status assignedto'.split();

templates/classic/html/page.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,30 @@ <h2><span metal:define-slot="body_title">body title</span></h2>
115115
</html>
116116
</tal:block>
117117

118+
<!--
119+
The following macros are intended to be used in search pages.
120+
121+
The invoking context must define a "name" variable which names the
122+
property being searched.
123+
124+
See issue.search.html in the classic template for examples.
125+
-->
118126
<td metal:define-macro="search_input">
119127
<input tal:attributes="value python:request.form.getvalue(name) or nothing;
120128
name name">
121129
</td>
122130

131+
<td metal:define-macro="search_popup">
132+
<!--
133+
context needs to specify the popup "columns" as a comma-separated
134+
string (eg. "id,title" or "id,name,description") as well as name
135+
-->
136+
<input tal:attributes="value python:request.form.getvalue(name) or nothing;
137+
name name">
138+
<span tal:replace="structure python:db.issue.classhelp(columns,
139+
property=name)" />
140+
</td>
141+
123142
<td metal:define-macro="search_select">
124143
<select tal:attributes="name name"
125144
tal:define="value python:request.form.getvalue(name)">

0 commit comments

Comments
 (0)