appypod-rattail/gen/plone25/skin/search.pt

48 lines
2.3 KiB
Plaintext
Raw Normal View History

2011-09-18 08:00:05 -05:00
<tal:main define="tool context/getParentNode">
<html metal:use-macro="context/skyn/template/macros/main">
<metal:fill fill-slot="content"
tal:define="contentType request/type_name;
refInfo request/ref|nothing;
searchInfo python: tool.getSearchInfo(contentType, refInfo);
cssJs python: tool.getCssAndJs(searchInfo['fields'], 'edit')">
<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"
tal:attributes="href string:$appUrl/skyn/$cssFile"/>
<script tal:repeat="jsFile cssJs/js" type="text/javascript"
tal:attributes="src string:$appUrl/skyn/$jsFile"></script>
<tal:comment replace="nothing">Search title</tal:comment>
<h1><span tal:replace="python: tool.translate('%s_plural' % contentType)"/> —
<span tal:replace="python: tool.translate('search_title')"/></h1><br/>
<tal:comment replace="nothing">Form for searching objects of request/type_name.</tal:comment>
<form name="search" tal:attributes="action python: appFolder.absolute_url()+'/skyn/do'" method="post">
<input type="hidden" name="action" value="SearchObjects"/>
<input type="hidden" name="type_name" tal:attributes="value contentType"/>
<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()">
<metal:call use-macro="python: appFolder.skyn.widgets.get(macroPage).macros.get('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 align="right"><br/>
<input type="submit" tal:attributes="value python:tool.translate('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>