2009-12-30 10:12:18 -06:00
|
|
|
<metal:searchInteger define-macro="searchInteger">
|
2010-01-07 13:25:18 -06:00
|
|
|
<label tal:content="python: tool.translate(appyType['label'])"></label><br>
|
|
|
|
<tal:from define="fromName python: '%s*int' % widgetName">
|
|
|
|
<label tal:attributes="for fromName" tal:content="python: tool.translate('search_from')"></label>
|
|
|
|
<input type="text" tal:attributes="name fromName" size="4"/>
|
|
|
|
</tal:from>
|
|
|
|
<tal:to define="toName python: '%s_to' % fieldName">
|
|
|
|
<label tal:attributes="for toName" tal:content="python: tool.translate('search_to')"></label>
|
|
|
|
<input type="text" tal:attributes="name toName" size="4"/>
|
|
|
|
</tal:to><br/>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchInteger>
|
|
|
|
|
|
|
|
<metal:searchFloat define-macro="searchFloat">
|
2010-01-14 10:54:18 -06:00
|
|
|
<label tal:content="python: tool.translate(appyType['label'])"></label><br>
|
|
|
|
<tal:from define="fromName python: '%s*float' % widgetName">
|
|
|
|
<label tal:attributes="for fromName" tal:content="python: tool.translate('search_from')"></label>
|
|
|
|
<input type="text" tal:attributes="name fromName" size="4"/>
|
|
|
|
</tal:from>
|
|
|
|
<tal:to define="toName python: '%s_to' % fieldName">
|
|
|
|
<label tal:attributes="for toName" tal:content="python: tool.translate('search_to')"></label>
|
|
|
|
<input type="text" tal:attributes="name toName" size="4"/>
|
|
|
|
</tal:to><br/>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchFloat>
|
|
|
|
|
|
|
|
<metal:searchString define-macro="searchString">
|
2010-01-06 11:36:16 -06:00
|
|
|
<label tal:attributes="for widgetName" tal:content="python: tool.translate(appyType['label'])"></label><br>
|
|
|
|
<tal:comment replace="nothing">Show a simple search field for most String fields.</tal:comment>
|
|
|
|
<tal:simpleSearch condition="not: appyType/isSelect">
|
|
|
|
<input type="text" tal:attributes="name widgetName"/>
|
|
|
|
</tal:simpleSearch>
|
2010-03-19 07:13:36 -05:00
|
|
|
<tal:comment replace="nothing">Show a multi-selection box for fields whose validator defines a list of values, with a "AND/OR" checkbox.</tal:comment>
|
2010-01-06 11:36:16 -06:00
|
|
|
<tal:selectSearch condition="appyType/isSelect">
|
2010-03-19 07:13:36 -05:00
|
|
|
<tal:comment replace="nothing">The "and" / "or" radio buttons</tal:comment>
|
|
|
|
<tal:operator define="operName python: 'o_%s' % fieldName;
|
|
|
|
orName python: '%s_or' % operName;
|
|
|
|
andName python: '%s_and' % operName;"
|
|
|
|
condition="python: appyType['multiplicity'][1]!=1">
|
|
|
|
<input type="radio" class="noborder" tal:attributes="name operName; id orName" checked="checked" value="or"/>
|
|
|
|
<label tal:attributes="for orName" tal:content="python: tool.translate('search_or')"></label>
|
|
|
|
<input type="radio" class="noborder" tal:attributes="name operName; id andName" value="and"/>
|
|
|
|
<label tal:attributes="for andName" tal:content="python: tool.translate('search_and')"></label><br/>
|
|
|
|
</tal:operator>
|
|
|
|
<tal:comment replace="nothing">The list of values</tal:comment>
|
2010-01-06 11:36:16 -06:00
|
|
|
<select tal:attributes="name widgetName" multiple="multiple" size="5">
|
2010-01-09 12:09:13 -06:00
|
|
|
<option tal:repeat="v python:tool.getSelectValues(appyType)"
|
|
|
|
tal:attributes="value python:v[0]" tal:content="python: v[1]">
|
2010-01-06 11:36:16 -06:00
|
|
|
</option>
|
|
|
|
</select>
|
2010-01-07 13:25:18 -06:00
|
|
|
</tal:selectSearch><br/>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchString>
|
|
|
|
|
2010-01-07 13:25:18 -06:00
|
|
|
<metal:searchBoolean define-macro="searchBoolean"
|
|
|
|
tal:define="typedWidget python:'%s*bool' % widgetName">
|
2010-01-06 11:36:16 -06:00
|
|
|
<label tal:attributes="for widgetName" tal:content="python: tool.translate(appyType['label'])"></label><br>
|
|
|
|
<tal:yes define="valueId python:'%s_yes' % fieldName">
|
|
|
|
<input type="radio" class="noborder" value="True" tal:attributes="name typedWidget; id valueId"/>
|
|
|
|
<label tal:attributes="for valueId" i18n:translate="yes" i18n:domain="plone"></label>
|
|
|
|
</tal:yes>
|
|
|
|
<tal:no define="valueId python:'%s_no' % fieldName">
|
|
|
|
<input type="radio" class="noborder" value="False" tal:attributes="name typedWidget; id valueId"/>
|
|
|
|
<label tal:attributes="for valueId" i18n:translate="no" i18n:domain="plone"></label>
|
|
|
|
</tal:no>
|
|
|
|
<tal:whatever define="valueId python:'%s_whatever' % fieldName">
|
|
|
|
<input type="radio" class="noborder" value="" tal:attributes="name typedWidget; id valueId" checked="checked"/>
|
|
|
|
<label tal:attributes="for valueId" tal:content="python: tool.translate('whatever')"></label>
|
2010-01-07 13:25:18 -06:00
|
|
|
</tal:whatever><br/>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchBoolean>
|
|
|
|
|
|
|
|
<metal:searchDate define-macro="searchDate">
|
2010-01-07 13:25:18 -06:00
|
|
|
<label tal:content="python: tool.translate(appyType['label'])"></label>
|
|
|
|
<table cellpadding="0" cellspacing="0">
|
|
|
|
<tal:comment replace="nothing">From</tal:comment>
|
|
|
|
<tr tal:define="fromName python: '%s*date' % widgetName">
|
|
|
|
<td width="10px"> </td>
|
|
|
|
<td>
|
|
|
|
<label tal:content="python: tool.translate('search_from')"></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<select tal:attributes="name fromName">
|
|
|
|
<option value="">--</option>
|
|
|
|
<option tal:repeat="value python:range(appyType['startYear'], appyType['endYear']+1)"
|
|
|
|
tal:content="value" tal:attributes="value value"></option>
|
|
|
|
</select> /
|
|
|
|
<select tal:attributes="name python: '%s_from_month' % fieldName">
|
|
|
|
<option value="">--</option>
|
|
|
|
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 13)]"
|
|
|
|
tal:content="python:tool.getMonthName(value)" tal:attributes="value value"></option>
|
|
|
|
</select> /
|
|
|
|
<select tal:attributes="name python: '%s_from_day' % fieldName">
|
|
|
|
<option value="">--</option>
|
|
|
|
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 32)]"
|
|
|
|
tal:content="value" tal:attributes="value value"></option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tal:comment replace="nothing">To</tal:comment>
|
|
|
|
<tr>
|
|
|
|
<td></td>
|
|
|
|
<td>
|
|
|
|
<label tal:content="python: tool.translate('search_to')"></label>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<select tal:attributes="name python: '%s_to_year' % fieldName">
|
|
|
|
<option value="">--</option>
|
|
|
|
<option tal:repeat="value python:range(appyType['startYear'], appyType['endYear']+1)"
|
|
|
|
tal:content="value" tal:attributes="value value"></option>
|
|
|
|
</select> /
|
|
|
|
<select tal:attributes="name python: '%s_to_month' % fieldName">
|
|
|
|
<option value="">--</option>
|
|
|
|
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 13)]"
|
|
|
|
tal:content="python:tool.getMonthName(value)" tal:attributes="value value"></option>
|
|
|
|
</select> /
|
|
|
|
<select tal:attributes="name python: '%s_to_day' % fieldName">
|
|
|
|
<option value="">--</option>
|
|
|
|
<option tal:repeat="value python: [str(v).zfill(2) for v in range(1, 32)]"
|
|
|
|
tal:content="value" tal:attributes="value value"></option>
|
|
|
|
</select>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchDate>
|
|
|
|
|
|
|
|
<metal:searchFile define-macro="searchFile">
|
2010-01-07 13:25:18 -06:00
|
|
|
<p tal:content="fieldName"></p>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchFile>
|
|
|
|
|
|
|
|
<metal:searchRef define-macro="searchRef">
|
2010-01-07 13:25:18 -06:00
|
|
|
<p tal:content="fieldName"></p>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchRef>
|
|
|
|
|
|
|
|
<metal:searchComputed define-macro="searchComputed">
|
2010-01-07 13:25:18 -06:00
|
|
|
<p tal:content="fieldName"></p>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchComputed>
|
|
|
|
|
|
|
|
<metal:searchAction define-macro="searchAction">
|
2010-01-07 13:25:18 -06:00
|
|
|
<p tal:content="fieldName"></p>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchAction>
|
|
|
|
|
|
|
|
<metal:searchInfo define-macro="searchInfo">
|
2010-01-07 13:25:18 -06:00
|
|
|
<p tal:content="fieldName"></p>
|
2009-12-30 10:12:18 -06:00
|
|
|
</metal:searchInfo>
|