list nested concept structure, controlled by URL parameter 'list_nested'
This commit is contained in:
		
							parent
							
								
									a085da0050
								
							
						
					
					
						commit
						b24619fcd7
					
				
					 1 changed files with 25 additions and 2 deletions
				
			
		|  | @ -138,7 +138,8 @@ | ||||||
| <metal:children define-macro="conceptchildren"> | <metal:children define-macro="conceptchildren"> | ||||||
|     <div tal:attributes="class string:content-$level; |     <div tal:attributes="class string:content-$level; | ||||||
|                          ondblclick python: item.openEditWindow('configure.html')" |                          ondblclick python: item.openEditWindow('configure.html')" | ||||||
|          tal:define="children python: list(item.unique(item.children()))" |          tal:define="list_nested request/list_nested|nothing; | ||||||
|  |                      children children|python:list(item.unique(item.children()))" | ||||||
|          tal:condition="children"> |          tal:condition="children"> | ||||||
|       <h2 i18n:translate="" |       <h2 i18n:translate="" | ||||||
|           tal:condition="show_headline|python:True">Children</h2> |           tal:condition="show_headline|python:True">Children</h2> | ||||||
|  | @ -171,7 +172,7 @@ | ||||||
|                 <td valign="top"> |                 <td valign="top"> | ||||||
|                   <a tal:attributes="href python: view.getUrlForTarget(related); |                   <a tal:attributes="href python: view.getUrlForTarget(related); | ||||||
|                                      title related/relationInfo"> |                                      title related/relationInfo"> | ||||||
|                     <span tal:replace="related/title">Resource Title</span> |                     <span tal:replace="related/title">Concept Title</span> | ||||||
|                   </a> |                   </a> | ||||||
|                 </td> |                 </td> | ||||||
|                 <td class="center"><span tal:content="related/typeTitle" |                 <td class="center"><span tal:content="related/typeTitle" | ||||||
|  | @ -188,6 +189,14 @@ | ||||||
|                          tal:attributes="value related/uidToken" /> |                          tal:attributes="value related/uidToken" /> | ||||||
|                 </td> |                 </td> | ||||||
|               </tr> |               </tr> | ||||||
|  |               <tr tal:define="children python:list(related.unique(related.children())); | ||||||
|  |                               resources python:list(related.resources())" | ||||||
|  |                   tal:condition="python:list_nested and (children or resources)"> | ||||||
|  |                 <td tal:condition="item/showCheckboxes|nothing" /> | ||||||
|  |                 <td colspan="5"> | ||||||
|  |                   <metal:list use-macro="item/template/macros/list_nested" /> | ||||||
|  |                 </td> | ||||||
|  |               </tr> | ||||||
|             </tal:item> |             </tal:item> | ||||||
|           </tal:items> |           </tal:items> | ||||||
|           </tbody> |           </tbody> | ||||||
|  | @ -329,6 +338,20 @@ | ||||||
| </metal:listing> | </metal:listing> | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | <metal:listing define-macro="list_nested"> | ||||||
|  |   <div style="margin-left: 20px" | ||||||
|  |        tal:define="item nocall:related; | ||||||
|  |                    level python:level + 1"> | ||||||
|  |     <tal:children condition="children"> | ||||||
|  |       <metal:list use-macro="item/template/macros/conceptchildren" /> | ||||||
|  |     </tal:children> | ||||||
|  |     <tal:resources condition="resources"> | ||||||
|  |       <metal:list use-macro="item/template/macros/conceptresources" /> | ||||||
|  |     </tal:resources> | ||||||
|  |   </div> | ||||||
|  | </metal:listing> | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| <!-- portlets --> | <!-- portlets --> | ||||||
| 
 | 
 | ||||||
| <metal:actions define-macro="parents"> | <metal:actions define-macro="parents"> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue