
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1297 fd906abe-77d9-0310-91a1-e0d9ade77398
128 lines
4.3 KiB
XML
128 lines
4.3 KiB
XML
<metal:search define-macro="search">
|
|
<div id="search"
|
|
tal:define="macros item/template/macros">
|
|
<h3 tal:attributes="class string:content-$level;
|
|
ondblclick item/openEditWindow">
|
|
Search
|
|
</h3>
|
|
|
|
<div metal:define-macro="search_form" class="searchForm"
|
|
tal:define="idPrefix string:${view/itemNum}.search;
|
|
formId string:$idPrefix.form">
|
|
<fieldset class="box">
|
|
<form action="." method="post" id="1.search.form"
|
|
tal:attributes="id formId">
|
|
<table cellpadding="3">
|
|
<tal:block repeat="search_selection python: ['type', 'text']">
|
|
<metal:row use-macro="macros/search_row" />
|
|
</tal:block>
|
|
<tr>
|
|
<td colspan="2">
|
|
<input type="button" value="Add concept filter" class="button" />
|
|
<input type="button" value="Add attribute filter" class="button" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<input type="submit" name="1.search" value="Search" class="submit"
|
|
tal:attributes="name string:$idPrefix.submit;
|
|
onclick python:
|
|
item.submitReplacing('1.results', formId, view)" />
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div metal:define-macro="search_results"
|
|
id="1.results">
|
|
<fieldset class="box">
|
|
Search results
|
|
<p tal:content="python:request.get('1.search.1.text', 'nothing')" />
|
|
</fieldset>
|
|
</div>
|
|
|
|
</div>
|
|
</metal:search>
|
|
|
|
|
|
<tr metal:define-macro="search_row" id="search.row.1.1"
|
|
tal:define="rowNum item/rowNum;
|
|
idPrefix string:$idPrefix.$rowNum;
|
|
selection search_selection | item/searchSelection"
|
|
tal:attributes="id string:$idPrefix.row">
|
|
<td style="width: 30px">
|
|
<input type="button" value="−"
|
|
title="Remove search parameter"
|
|
tal:condition="python: selection not in ['type', 'text']" />
|
|
</td>
|
|
<td>
|
|
<div metal:use-macro="macros/?selection" />
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
<metal:text define-macro="type">
|
|
<div>
|
|
<h3>Type(s) to search for</h3>
|
|
<label for="text"
|
|
tal:attributes="for string:$idPrefix.text">Type:</label>
|
|
<select name="text"
|
|
tal:attributes="name string:$idPrefix.text;
|
|
id string:$idPrefix.text;">
|
|
<option value=".loops/concepts/topic">Topic</option>
|
|
<option value="loops.resource.Document">Document</option>
|
|
</select>
|
|
<input type="button" value="+"
|
|
title="Add type" />
|
|
</div>
|
|
</metal:text>
|
|
|
|
|
|
<metal:text define-macro="text">
|
|
<div>
|
|
<h3>Search text</h3>
|
|
<input type="checkbox" checked
|
|
name="title" id="title"
|
|
tal:attributes="name string:$idPrefix.title;
|
|
id string:$idPrefix.title;" />
|
|
<label for="title"
|
|
tal:attributes="for string:$idPrefix.title">Title</label>
|
|
<input type="checkbox"
|
|
name="full" id="full"
|
|
tal:attributes="name string:$idPrefix.full;
|
|
id string:$idPrefix.full;" />
|
|
<label for="full"
|
|
tal:attributes="for string:$idPrefix.full">Full text</label>
|
|
<label for="text"
|
|
tal:attributes="for string:$idPrefix.text">Search words:</label>
|
|
<input type="text" name="text"
|
|
tal:attributes="name string:$idPrefix.text;
|
|
id string:$idPrefix.text;" />
|
|
<input type="button" value="+"
|
|
title="Add search word" />
|
|
</div>
|
|
</metal:text>
|
|
|
|
|
|
<!-- obsolete -->
|
|
<tr metal:define-macro="search_row_selectable" id="search.row.1.1">
|
|
<td>
|
|
<input type="button" value="−"
|
|
title="Remove search parameter" />
|
|
</td>
|
|
<td tal:define="selection search_selection | string:type">
|
|
<select>
|
|
<option value="type"
|
|
tal:attributes="selected python: selection=='type'">Type</option>
|
|
<option value="text"
|
|
tal:attributes="selected python: selection=='text'">Text</option>
|
|
<option value="attribute">Attribute value</option>
|
|
<option value="concept">Concept</option>
|
|
</select>
|
|
<input metal:use-macro="template/macros/?selection" />
|
|
</td>
|
|
</tr>
|
|
|
|
|