2010-12-17 07:46:55 -06:00
|
|
|
<tal:search metal:define-macro="master"
|
|
|
|
define="appFolder context/getParentNode;
|
|
|
|
contentType request/type_name;
|
|
|
|
refInfo request/ref|nothing;
|
|
|
|
tool python: here.portal_url.getPortalObject().get('portal_%s' % appFolder.id.lower());
|
|
|
|
searchInfo python: tool.getSearchInfo(contentType, refInfo);
|
|
|
|
cssJs python: tool.getCssAndJs(searchInfo['fields'], 'edit')">
|
|
|
|
|
2009-12-30 10:12:18 -06:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
|
|
|
|
lang="en" xmlns:tal="http://xml.zope.org/namespaces/tal"
|
|
|
|
xmlns:metal="http://xml.zope.org/namespaces/metal"
|
|
|
|
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
|
|
|
|
metal:use-macro="here/main_template/macros/master">
|
|
|
|
|
2010-12-17 07:46:55 -06:00
|
|
|
<tal:comment replace="nothing">Disable standard Plone green tabs</tal:comment>
|
|
|
|
<div metal:fill-slot="top_slot">
|
|
|
|
<metal:block metal:use-macro="here/global_defines/macros/defines" />
|
|
|
|
<div tal:define="dummy python:request.set('disable_border', 1)" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<tal:comment replace="nothing">Include type-specific CSS and JS.</tal:comment>
|
|
|
|
<metal:js fill-slot="javascript_head_slot">
|
|
|
|
<tal:js condition="cssJs/js" repeat="jsFile cssJs/js">
|
|
|
|
<script type="text/javascript" charset="iso-8859-1"
|
|
|
|
tal:condition="python:exists('portal/%s' % jsFile)"
|
|
|
|
tal:attributes="src string:$portal_url/$jsFile">
|
|
|
|
</script>
|
|
|
|
</tal:js>
|
|
|
|
</metal:js>
|
|
|
|
<metal:css fill-slot="css_slot">
|
|
|
|
<tal:css condition="cssJs/css" repeat="cssFile cssJs/css">
|
|
|
|
<style type="text/css" media="all"
|
|
|
|
tal:condition="python:exists('portal/%s' % cssFile)"
|
|
|
|
tal:content="structure string:<!-- @import url($portal_url/$cssFile); -->">
|
|
|
|
</style>
|
|
|
|
</tal:css>
|
|
|
|
</metal:css>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<metal:fill fill-slot="main">
|
2009-12-30 10:12:18 -06:00
|
|
|
|
|
|
|
<tal:comment replace="nothing">Search title</tal:comment>
|
2010-01-06 11:36:16 -06:00
|
|
|
<h1><span tal:replace="python: tool.translate('%s_plural' % contentType)"/> —
|
|
|
|
<span tal:replace="python: tool.translate('search_title')"/></h1><br/>
|
2009-12-30 10:12:18 -06:00
|
|
|
|
|
|
|
<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"/>
|
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
|
|
|
|
2010-12-06 04:11:40 -06:00
|
|
|
<table class="no-style-table" cellpadding="0" cellspacing="0" width="100%">
|
2010-12-17 07:46:55 -06:00
|
|
|
<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'])">
|
2010-08-05 11:23:17 -05:00
|
|
|
<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"/>
|
2010-01-06 11:36:16 -06:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2009-12-30 10:12:18 -06:00
|
|
|
|
|
|
|
<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>
|
|
|
|
</metal:fill>
|
|
|
|
</body>
|
|
|
|
</html>
|
2010-12-17 07:46:55 -06:00
|
|
|
</tal:search>
|