src/pyams_thesaurus/zmi/widget/templates/terms-tree-input.pt
changeset 114 e7e4b4146a91
parent 86 04f176e237cc
child 122 c7a6f6cd50af
equal deleted inserted replaced
113:ab8863529acf 114:e7e4b4146a91
     1 <tal:loop repeat="term view/top_terms">
     1 <div data-ams-plugins="pyams_thesaurus"
     2 	<div class="col col-xs-6 col-sm-4 col-md-3 col-lg-3">
     2 	 data-ams-plugin-pyams_thesaurus-src="${tales:resource_path('pyams_thesaurus.zmi:pyams_thesaurus')}"
     3 		<div class="ams-widget" data-ams-widget-toggle-button="false"
     3 	 data-ams-plugin-pyams_thesaurus-callback="PyAMS_thesaurus.widget.initTree">
     4 			 id="them_${repeat/term/index}">
     4 	<tal:loop repeat="term view/top_terms">
     5 			<header class="no-margin">
     5 		<div class="col col-xs-6 col-sm-4 col-md-3 col-lg-3">
     6 				<h2>${python:term.alt or term.label}</h2>
     6 			<div class="ams-widget" data-ams-widget-toggle-button="false"
     7  			</header>
     7 				 id="them_${repeat/term/index}">
     8 			<div class="widget-body no-padding viewport-y viewport-200 viewport-x-none"
     8 				<header class="no-margin">
     9 				 style="height: 200px; width: calc(100% - 2px);">
     9 					<h2>${python:term.alt or term.label}</h2>
    10 				<tal:loop repeat="subterm python:view.get_subterms(term)">
    10 				</header>
    11 					<div style="padding-left: ${python:(subterm.level - 1) * 20}px; line-height: 1em;">
    11 				<div class="widget-body no-padding viewport-y viewport-200 viewport-x-none"
    12 						<label class="checkbox"
    12 					 style="height: 200px; width: calc(100% - 2px);">
    13 							   tal:define="published python:subterm.status == 'published'"
    13 					<tal:loop repeat="subterm python:view.get_subterms(term)">
    14 							   tal:omit-tag="not:published">
    14 						<div style="padding-left: ${python:(subterm.level - 1) * 20}px; line-height: 1em;">
    15 							<input tal:condition="published"
    15 							<label class="checkbox"
    16 								   type="checkbox"
    16 								   tal:define="published python:subterm.status == 'published'"
    17 								   name="${view/name}:list"
    17 								   tal:omit-tag="not:published">
    18 								   id="term_${subterm/label}"
    18 								<input tal:condition="published"
    19 								   name="${view/name}:list"
    19 									   type="checkbox"
    20 								   value="${subterm/label}"
    20 									   name="${view/name}:list"
    21 								   checked="${python:'checked' if subterm.label in (view.value or ()) else None}" />
    21 									   id="term_${subterm/label}"
    22 							<i></i>
    22 									   name="${view/name}:list"
    23 							<div class="${python:'' if published else 'bold margin-top-5'}">
    23 									   value="${subterm/label}"
    24 								${python:subterm.alt or subterm.label}
    24 									   checked="${python:'checked' if subterm.label in (view.value or ()) else None}"
    25 							</div>
    25 									   data-ams-change-handler="PyAMS_thesaurus.widget.updateSelection"/>
    26 						</label>
    26 								<i></i>
    27 					</div>
    27 								<div class="${python:'' if published else 'bold margin-top-5'}">
    28 				</tal:loop>
    28 									${python:subterm.alt or subterm.label}
       
    29 								</div>
       
    30 							</label>
       
    31 						</div>
       
    32 					</tal:loop>
       
    33 				</div>
    29 			</div>
    34 			</div>
    30 		</div>
    35 		</div>
    31 	</div>
    36 	</tal:loop>
    32 </tal:loop>
    37 </div>