filter select

This commit is contained in:
j 2007-04-06 19:22:24 +00:00
parent 5c247d77ed
commit ef5d27e432

View file

@ -28,6 +28,11 @@ selectList = [
('Screenings', 'List: Screenings'), ('Screenings', 'List: Screenings'),
] ]
selectFilter = [
('kind', 'Filter: Type'),
('rights', 'Filter: Rights'),
]
def search_link(search, n = None, o = None): def search_link(search, n = None, o = None):
link = "/search?" link = "/search?"
if n: if n:
@ -110,6 +115,13 @@ def search_link(search, n = None, o = None):
<div class="headTop" style="left: 680px"> <div class="headTop" style="left: 680px">
<input id="inputFind" type="search" placeholder="Find" autosave="find" results="10" onBlur="submitFind()" value="${search['q']}"/> <input id="inputFind" type="search" placeholder="Find" autosave="find" results="10" onBlur="submitFind()" value="${search['q']}"/>
</div> </div>
<div class="headTop" style="left: 0px">
<select id="selectFilter" onChange="changeFilter()">
<option py:for="value, content in selectFilter"
py:content="content"
py:attrs="dict(value=value, selected=(value==search['f'] and 'selected' or None))" />
</select>
</div>
<div py:if="search['length'] > 30" id="numberDiv" class="headBottom textSmall"> <div py:if="search['length'] > 30" id="numberDiv" class="headBottom textSmall">
Items per Page<br/> <span py:for="n in [30, 60, 90, 120]"> Items per Page<br/> <span py:for="n in [30, 60, 90, 120]">
<a py:if="n != search['n']" href="${search_link(search, n=n)}">${n}</a> <a py:if="n != search['n']" href="${search_link(search, n=n)}">${n}</a>