2012-02-18 12:48:00 -06:00
|
|
|
<tal:main define="tool python: context.config">
|
2011-11-25 11:01:20 -06:00
|
|
|
<html metal:use-macro="context/ui/template/macros/main">
|
2011-09-18 08:00:05 -05:00
|
|
|
<metal:fill fill-slot="content"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:define="className request/className;
|
2011-09-18 08:00:05 -05:00
|
|
|
refInfo request/ref|nothing;
|
2011-11-25 11:01:20 -06:00
|
|
|
searchInfo python: tool.getSearchInfo(className, refInfo);
|
2012-05-05 10:04:19 -05:00
|
|
|
cssJs python: {};
|
|
|
|
dummy python: tool.getCssJs(searchInfo['fields'], 'edit', cssJs)">
|
2010-12-17 07:46:55 -06:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">Include type-specific CSS and JS.</tal:comment>
|
2011-09-18 08:00:05 -05:00
|
|
|
<link tal:repeat="cssFile cssJs/css" rel="stylesheet" type="text/css"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="href string:$appUrl/ui/$cssFile"/>
|
2011-09-18 08:00:05 -05:00
|
|
|
<script tal:repeat="jsFile cssJs/js" type="text/javascript"
|
2011-11-25 11:01:20 -06:00
|
|
|
tal:attributes="src string:$appUrl/ui/$jsFile"></script>
|
2009-12-30 10:12:18 -06:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">Search title</tal:comment>
|
2012-06-03 11:34:56 -05:00
|
|
|
<h1><span tal:replace="python: _('%s_plural' % className)"/> —
|
|
|
|
<span tal:replace="python: _('search_title')"/></h1><br/>
|
2009-12-30 10:12:18 -06:00
|
|
|
|
2011-11-25 11:01:20 -06:00
|
|
|
<tal:comment replace="nothing">Form for searching objects of request/className.</tal:comment>
|
|
|
|
<form name="search" tal:attributes="action python: tool.absolute_url()+'/do'" method="post">
|
2009-12-30 10:12:18 -06:00
|
|
|
<input type="hidden" name="action" value="SearchObjects"/>
|
2011-11-25 11:01:20 -06:00
|
|
|
<input type="hidden" name="className" tal:attributes="value className"/>
|
2010-12-06 04:11:40 -06:00
|
|
|
<input tal:condition="refInfo" type="hidden" name="ref" tal:attributes="value refInfo"/>
|
2009-12-30 10:12:18 -06:00
|
|
|
|
2011-09-18 08:00:05 -05:00
|
|
|
<table width="100%">
|
2012-12-14 02:23:33 -06:00
|
|
|
<tr tal:repeat="searchRow python: tool.getGroupedSearchFields(searchInfo)"
|
2010-12-17 07:46:55 -06:00
|
|
|
valign="top">
|
2012-12-14 02:23:33 -06:00
|
|
|
<tal:widgets repeat="widget searchRow">
|
|
|
|
<td tal:define="scolspan widget/scolspan|python: 1"
|
|
|
|
tal:attributes="width python:'%d%%' % ((100/searchInfo['nbOfColumns'])*scolspan);
|
|
|
|
colspan scolspan">
|
|
|
|
<tal:field condition="widget">
|
2010-08-05 11:23:17 -05:00
|
|
|
<tal:show define="name widget/name;
|
|
|
|
widgetName python: 'w_%s' % name;
|
|
|
|
macroPage python: widget['type'].lower()">
|
2011-11-25 11:01:20 -06:00
|
|
|
<metal:call use-macro="python: getattr(appFolder.ui.widgets, macroPage).macros['search']"/>
|
2010-08-05 11:23:17 -05:00
|
|
|
</tal:show>
|
2010-01-07 13:25:18 -06:00
|
|
|
</tal:field><br class="discreet"/>
|
2012-12-14 02:23:33 -06:00
|
|
|
</td>
|
|
|
|
</tal:widgets>
|
2010-01-06 11:36:16 -06:00
|
|
|
</tr>
|
|
|
|
</table>
|
2009-12-30 10:12:18 -06:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">Submit button</tal:comment>
|
2012-06-27 06:27:24 -05:00
|
|
|
<p tal:attributes="align dright"><br/>
|
2012-06-03 11:34:56 -05:00
|
|
|
<input type="submit" tal:attributes="value python: _('search_button')"/>
|
2009-12-30 10:12:18 -06:00
|
|
|
</p>
|
|
|
|
</form>
|
2011-09-18 08:00:05 -05:00
|
|
|
</metal:fill>
|
2009-12-30 10:12:18 -06:00
|
|
|
</html>
|
2011-09-18 08:00:05 -05:00
|
|
|
</tal:main>
|