show candidates list for task only if there are any
This commit is contained in:
parent
8e9b4267f2
commit
635a4e2568
1 changed files with 26 additions and 22 deletions
|
@ -53,28 +53,32 @@
|
|||
|
||||
<metal:candidates define-macro="requirement_candidates">
|
||||
<metal:block use-macro="view/concept_macros/conceptdata" />
|
||||
<h3 i18n:translate="">Candidates for Task</h3>
|
||||
<table class="listing">
|
||||
<tr>
|
||||
<th i18n:translate="">Candidate</th>
|
||||
<th i18n:translate=""
|
||||
title="coverage"
|
||||
i18n:attributes="title description_fit">Fit</th>
|
||||
<th i18n:translate="">Knowledge</th>
|
||||
</tr>
|
||||
<tr tal:repeat="candidate item/adapted/getCandidates">
|
||||
<td tal:define="person candidate/person">
|
||||
<b tal:omit-tag="python:candidate['fit'] < 1.0">
|
||||
<a tal:attributes="href python:view.getUrlForTarget(person.context)"
|
||||
tal:content="person/title" /></b></td>
|
||||
<td tal:content="candidate/fit" />
|
||||
<td>
|
||||
<tal:knowledge tal:repeat="ke candidate/required">
|
||||
<a tal:attributes="href python:view.getUrlForTarget(ke.context)"
|
||||
tal:content="ke/title" /><tal:sep condition="not:repeat/ke/end">, </tal:sep>
|
||||
</tal:knowledge></td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="candidates"
|
||||
tal:define="candidates item/adapted/getCandidates"
|
||||
tal:condition="candidates">
|
||||
<h3 i18n:translate="">Candidates for Task</h3>
|
||||
<table class="listing">
|
||||
<tr>
|
||||
<th i18n:translate="">Candidate</th>
|
||||
<th i18n:translate=""
|
||||
title="coverage"
|
||||
i18n:attributes="title description_fit">Fit</th>
|
||||
<th i18n:translate="">Knowledge</th>
|
||||
</tr>
|
||||
<tr tal:repeat="candidate item/adapted/getCandidates">
|
||||
<td tal:define="person candidate/person">
|
||||
<b tal:omit-tag="python:candidate['fit'] < 1.0">
|
||||
<a tal:attributes="href python:view.getUrlForTarget(person.context)"
|
||||
tal:content="person/title" /></b></td>
|
||||
<td tal:content="candidate/fit" />
|
||||
<td>
|
||||
<tal:knowledge tal:repeat="ke candidate/required">
|
||||
<a tal:attributes="href python:view.getUrlForTarget(ke.context)"
|
||||
tal:content="ke/title" /><tal:sep condition="not:repeat/ke/end">, </tal:sep>
|
||||
</tal:knowledge></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</metal:candidates>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue