- provide controlling of rendering macro via field instance method getRenderer() - add getRelations() method to child relation set
		
			
				
	
	
		
			73 lines
		
	
	
	
		
			2.8 KiB
		
	
	
	
		
			XML
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
	
		
			2.8 KiB
		
	
	
	
		
			XML
		
	
	
		
			Executable file
		
	
	
	
	
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"
 | 
						|
      i18n:domain="loops">
 | 
						|
<body>
 | 
						|
 | 
						|
 | 
						|
<metal:display define-macro="display_relationset">
 | 
						|
    <span tal:repeat="elem value">
 | 
						|
      <a tal:attributes="href elem/url"
 | 
						|
         tal:content="elem/label"></a>
 | 
						|
      <tal:separator condition="not:repeat/elem/end"> · </tal:separator>
 | 
						|
    </span>
 | 
						|
</metal:display>
 | 
						|
 | 
						|
 | 
						|
<metal:input define-macro="input_relationset"
 | 
						|
             tal:define="fieldInstance field/getFieldInstance;
 | 
						|
                         types fieldInstance/typesParams">
 | 
						|
    <div dojoType="dojox.data.QueryReadStore" jsId="conceptSearch"
 | 
						|
         tal:attributes="url string:${fieldInstance/selection_view}$types;
 | 
						|
                         jsId string:${name}_search_store" >
 | 
						|
    </div>
 | 
						|
    <div tal:attributes="id string:${name}_values">
 | 
						|
      <div tal:repeat="obj data/?name">
 | 
						|
        <input type="checkbox" checked
 | 
						|
               tal:attributes="name string:$name:list;
 | 
						|
                               value obj/uid" />
 | 
						|
        <span tal:content="obj/title" />
 | 
						|
      </div>
 | 
						|
      <div tal:repeat="obj python:
 | 
						|
                fieldInstance.getPresetTargets(view)">
 | 
						|
        <input type="checkbox" checked
 | 
						|
               tal:attributes="name string:$name:list;
 | 
						|
                               value obj/uid" />
 | 
						|
        <span tal:content="obj/title" />
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <input dojoType="dijit.form.FilteringSelect"
 | 
						|
           autoComplete="False" labelAttr="label" searchDelay="400"
 | 
						|
           tal:attributes="store string:${name}_search_store;
 | 
						|
                           name string:${name}_search;
 | 
						|
                           id string:${name}_search;
 | 
						|
                           onChange string:addRelation('$name')" />
 | 
						|
</metal:input>
 | 
						|
 | 
						|
 | 
						|
<metal:input define-macro="input_relation"
 | 
						|
                tal:define="fieldInstance field/getFieldInstance;
 | 
						|
                            types fieldInstance/typesParams">
 | 
						|
    <div dojoType="dojox.data.QueryReadStore" jsId="conceptSearch"
 | 
						|
         tal:attributes="url string:${fieldInstance/selection_view}$types;
 | 
						|
                         jsId string:${name}_search_store" >
 | 
						|
    </div>
 | 
						|
    <div tal:define="obj data/?name"
 | 
						|
         tal:attributes="id string:${name}_values"><div>
 | 
						|
        <tal:block tal:condition="obj">
 | 
						|
          <input type="checkbox" checked
 | 
						|
                 tal:attributes="name string:$name;
 | 
						|
                               value obj/uid" />
 | 
						|
          <span tal:content="obj/title" />
 | 
						|
        </tal:block>
 | 
						|
      </div>
 | 
						|
    </div>
 | 
						|
    <input dojoType="dijit.form.FilteringSelect"
 | 
						|
           autoComplete="False" labelAttr="label"
 | 
						|
           tal:attributes="store string:${name}_search_store;
 | 
						|
                           name string:${name}_search;
 | 
						|
                           id string:${name}_search;
 | 
						|
                           onChange string:setRelation('$name')" />
 | 
						|
</metal:input>
 | 
						|
 | 
						|
 | 
						|
</body>
 | 
						|
</html>
 |