loops/expert/browser/report.pt

133 lines
4.6 KiB
XML
Executable file

<html i18n:domain="loops">
<div metal:define-macro="main">
<div tal:define="report item/reportInstance;
reportView nocall:item"
tal:attributes="class string:content-$level;">
<div metal:use-macro="item/report_macros/header" />
<div metal:use-macro="item/resultsRenderer" />
</div>
</div>
<div metal:define-macro="main_params">
<div tal:define="report item/reportInstance;
reportView nocall:item"
tal:attributes="class string:content-$level;">
<div metal:use-macro="item/report_macros/header" />
<tal:results condition="request/show_results|nothing">
<div metal:use-macro="item/resultsRenderer" />
</tal:results>
</div>
</div>
<div metal:define-macro="header">
<metal:block use-macro="view/concept_macros/concepttitle" />
<form method="post" name="report_data" class="report-meta">
<input type="hidden" name="show_results" value="True" />
<tal:hidden define="params item/dynamicParams"
tal:condition="nothing">
<input type="hidden"
tal:repeat="name params"
tal:attributes="name name;
value params/?name" /></tal:hidden>
<div metal:use-macro="item/report_macros/params" />
<div metal:define-macro="buttons">
<input type="submit" name="report_execute" value="Execute Report"
tal:attributes="value item/reportExecuteTitle|string:Execute Report"
i18n:attributes="value" />
<input type="submit"
tal:condition="item/reportDownload"
tal:attributes="name string:${item/reportDownload}:method;
value item/reportDownloadTitle"
i18n:attributes="value" />
</div>
<br />
</form>
</div>
<metal:block define-macro="params">
<metal:block use-macro="item/report_macros/query" />
</metal:block>
<metal:block define-macro="query"
tal:define="criteria
item/reportInstance/queryCriteria/parts|nothing">
<table>
<tr tal:repeat="field item/queryFields">
<tal:field define="fieldType field/fieldType;
crit python:criteria and criteria.get(field.name)">
<td><b><span tal:content="field/title"
i18n:translate="" />:&nbsp;</b></td>
<td><metal:field use-macro="item/report_macros/?fieldType" /></td>
</tal:field>
</tr>
</table>
<br />
</metal:block>
<metal:field define-macro="textline">
<input tal:attributes="name string:${field/name};
value crit/comparisonValue|nothing" />
</metal:field>
<metal:field define-macro="number">
<input tal:attributes="name string:query.field.${field/name};
value crit/comparisonValue|nothing" />
</metal:field>
<metal:field define-macro="date">
<input dojoType="dijit.form.DateTextBox" style="width: 8em"
constraints="{datePattern: 'd.M.y',
min: '1980-01-01', max: '2020-12-31'}"
tal:attributes="name string:${field/name};
value crit/comparisonValue|nothing" />
</metal:field>
<metal:field define-macro="selection">
<metal:use use-macro="item/report_macros/textline" />
</metal:field>
<metal:input define-macro="relation"
tal:define="name field/name;
value crit/comparisonValue|nothing;
uid value/uid|nothing;
title value/longName|value/title|nothing;">
<div dojoType="dojox.data.QueryReadStore"
tal:attributes="url string:${field/storeUrl}&project=${item/adapted/uid};
jsId string:${name}_search_store" >
</div>
<input type="hidden"
name="nodeUrl"
id="nodeUrl"
tal:attributes="value item/view/nodeView/url" />
<div tal:attributes="id string:${name}_values">
<div>
<input dojoType="dijit.form.FilteringSelect"
autoComplete="False"
labelAttr="label"
searchDelay="400"
scrollOnFocus="false"
tal:attributes="store string:${name}_search_store;
name string:${name}_search;
id string:${name}_search;
onChange string:setEnhancedRelation('$name');" />
</div>
</div>
<script lang="javascript"
tal:condition="value"
tal:content="string:setEnhancedRelation('$name', '$uid', '$title');">
</script>
</metal:input>
</html>