appypod-rattail/gen/ui/search.pt

49 lines
2.3 KiB
Plaintext
Raw Normal View History

<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);
cssJs python: {};
dummy python: tool.getCssJs(searchInfo['fields'], 'edit', cssJs)">
<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>
<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/>
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">
<input type="hidden" name="action" value="SearchObjects"/>
2011-11-25 11:01:20 -06:00
<input type="hidden" name="className" tal:attributes="value className"/>
<input tal:condition="refInfo" type="hidden" name="ref" tal:attributes="value refInfo"/>
2011-09-18 08:00:05 -05:00
<table width="100%">
<tr tal:repeat="searchRow python: tool.tabularize(searchInfo['fieldDicts'], searchInfo['nbOfColumns'])"
valign="top">
<td tal:repeat="widget searchRow" tal:attributes="width python:'%d%%' % (100/searchInfo['nbOfColumns'])">
<tal:field condition="widget">
<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']"/>
</tal:show>
2010-01-07 13:25:18 -06:00
</tal:field><br class="discreet"/>
</td>
</tr>
</table>
<tal:comment replace="nothing">Submit button</tal:comment>
<p tal:attributes="align dright"><br/>
2012-06-03 11:34:56 -05:00
<input type="submit" tal:attributes="value python: _('search_button')"/>
</p>
</form>
2011-09-18 08:00:05 -05:00
</metal:fill>
</html>
2011-09-18 08:00:05 -05:00
</tal:main>