put query fields side by side; work in progress: field groups
This commit is contained in:
		
							parent
							
								
									d44b388b67
								
							
						
					
					
						commit
						e4df135f5c
					
				
					 1 changed files with 39 additions and 22 deletions
				
			
		|  | @ -58,28 +58,48 @@ | ||||||
|              tal:define="criteria  |              tal:define="criteria  | ||||||
|                   item/reportInstance/queryCriteria/parts|nothing"> |                   item/reportInstance/queryCriteria/parts|nothing"> | ||||||
|   <table> |   <table> | ||||||
|     <tr tal:repeat="field item/queryFields"> |     <tr> | ||||||
|       <tal:field define="fieldType field/fieldType; |       <tal:column repeat="field item/queryFields"> | ||||||
|                          crit python:criteria and criteria.get(field.name)"> |         <td style="padding-right: 5pt"> | ||||||
|         <td><b><span tal:content="field/title" |           <tal:field define="fieldType field/fieldType; | ||||||
|                      i18n:translate="" />: </b></td> |                              name field/name; | ||||||
|         <td><metal:field use-macro="item/report_macros/?fieldType" /></td> |                              crit python:criteria and criteria.get(name); | ||||||
|       </tal:field> |                              value crit/comparisonValue|nothing"> | ||||||
|  |             <b><span tal:content="field/title" | ||||||
|  |                          i18n:translate="" />: </b><br /> | ||||||
|  |             <metal:field use-macro="item/report_macros/?fieldType" /> | ||||||
|  |           </tal:field> | ||||||
|  |         </td> | ||||||
|  |       </tal:column> | ||||||
|     </tr> |     </tr> | ||||||
|   </table> |   </table> | ||||||
|   <br /> |   <br /> | ||||||
| </metal:block> | </metal:block> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | <table metal:define-macro="field_group"> | ||||||
|  |   <tr tal:repeat="field field/subfields">  | ||||||
|  |     <tal:field define="fieldType field/fieldType; | ||||||
|  |                        name field/name; | ||||||
|  |                        crit python:criteria and criteria.get(name); | ||||||
|  |                        value crit/comparisonValue|nothing"> | ||||||
|  |       <td><b><span tal:content="field/title" | ||||||
|  |                    i18n:translate="" />: </b></td> | ||||||
|  |       <td><metal:field use-macro="item/report_macros/?fieldType" /></td> | ||||||
|  |     </tal:field> | ||||||
|  |   </tr> | ||||||
|  | </table> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| <metal:field define-macro="textline"> | <metal:field define-macro="textline"> | ||||||
|   <input tal:attributes="name string:${field/name}; |   <input tal:attributes="name name; | ||||||
|                          value crit/comparisonValue|nothing" /> |                          value value" /> | ||||||
| </metal:field> | </metal:field> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <metal:field define-macro="number"> | <metal:field define-macro="number"> | ||||||
|   <input tal:attributes="name string:query.field.${field/name}; |   <input tal:attributes="name name; | ||||||
|                          value crit/comparisonValue|nothing" /> |                          value value" /> | ||||||
| </metal:field> | </metal:field> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -87,8 +107,8 @@ | ||||||
|   <input dojoType="dijit.form.DateTextBox" style="width: 8em" |   <input dojoType="dijit.form.DateTextBox" style="width: 8em" | ||||||
|          constraints="{datePattern: 'd.M.y', |          constraints="{datePattern: 'd.M.y', | ||||||
|                        min: '1980-01-01', max: '2020-12-31'}" |                        min: '1980-01-01', max: '2020-12-31'}" | ||||||
|          tal:attributes="name string:${field/name}; |          tal:attributes="name name; | ||||||
|                          value crit/comparisonValue|nothing" /> |                          value value" /> | ||||||
| </metal:field> | </metal:field> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -97,18 +117,15 @@ | ||||||
| </metal:field> | </metal:field> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| <metal:input define-macro="relation" | <div style="width: 170px" | ||||||
|              tal:define="name field/name; |      metal:define-macro="relation" | ||||||
|                          value crit/comparisonValue|nothing; |      tal:define="uid value/uid|nothing; | ||||||
|                          uid value/uid|nothing; |                  title value/longName|value/title|nothing;"> | ||||||
|                          title value/longName|value/title|nothing;"> |  | ||||||
|     <div dojoType="dojox.data.QueryReadStore" |     <div dojoType="dojox.data.QueryReadStore" | ||||||
|          tal:attributes="url string:${field/storeUrl}&project=${item/adapted/uid}; |          tal:attributes="url string:${field/storeUrl}&project=${item/adapted/uid}; | ||||||
|                          jsId string:${name}_search_store" > |                          jsId string:${name}_search_store" > | ||||||
|     </div> |     </div> | ||||||
|     <input type="hidden" |     <input type="hidden" name="nodeUrl" id="nodeUrl" | ||||||
|            name="nodeUrl" |  | ||||||
|            id="nodeUrl" |  | ||||||
|            tal:attributes="value item/view/nodeView/url" /> |            tal:attributes="value item/view/nodeView/url" /> | ||||||
|     <div tal:attributes="id string:${name}_values"> |     <div tal:attributes="id string:${name}_values"> | ||||||
|       <div> |       <div> | ||||||
|  | @ -127,7 +144,7 @@ | ||||||
|             tal:condition="value" |             tal:condition="value" | ||||||
|             tal:content="string:setEnhancedRelation('$name', '$uid', '$title');"> |             tal:content="string:setEnhancedRelation('$name', '$uid', '$title');"> | ||||||
|     </script> |     </script> | ||||||
| </metal:input> | </div> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| </html> | </html> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue