loops/knowledge/knowledge_macros.pt

117 lines
4.5 KiB
XML

<html i18n:domain="loops">
<metal:providers define-macro="requirement_providers">
<metal:block use-macro="view/concept_macros/conceptdata" />
<div>
<metal:listing define-macro="requirementslisting2">
<h3>Requirements</h3>
<table class="listing">
<tr>
<th i18n:translate="">Requirement</th>
<th i18n:translate="">Providers</th>
</tr>
<tr tal:repeat="related item/myKnowledgeProvidersForTask">
<td>
<a tal:attributes="href
string:${view/url}/.target${related/required/uniqueId}"
tal:content="related/required/title">Concept Title</a>
</td>
<td>
<tal:provider repeat="prov related/providers">
<a tal:attributes="href string:${view/url}/.target${prov/uniqueId}"
tal:content="prov/title">Provider Title</a>
</tal:provider>
</td>
</tr>
</table>
</metal:listing>
</div>
</metal:providers>
<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>
</metal:candidates>
<!-- forms -->
<metal:block define-macro="create_qualification">
<form method="post" id="addQualification_form" class="dialog"
dojoType="dijit.form.Form">
<input type="hidden" name="form.action" value="create_qualification" />
<input type="hidden" name="id"
tal:attributes="value request/form/id|nothing" />
<div class="heading" i18n:translate="">Add Qualification Record</div>
<div>
<label i18n:translate="" for="title">Title</label>
<div>
<input name="title" id="title" style="width: 60em"
dojoType="dijit.form.ValidationTextBox" required
tal:attributes="value view/title" /></div>
</div>
<div>
<label i18n:translate="" for="action">Action</label>
<select name="workitem.action" id="action" style="display:none">
<option tal:repeat="action view/actions"
tal:attributes="value action/name"
tal:content="action/title"
i18n:translate="" />
</select>
<span id="target_competence">&nbsp;
<label i18n:translate="assign_to_competence" for="input_competence"
style="display: inline">Assign to Competence</label>
<span dojoType="dojox.data.QueryReadStore"
jsId="competence_search_store"
tal:define="types python:
view.getTypesParamsForFilteringSelect(['competence'])"
tal:attributes="url string:listConceptsForComboBox.js$types;" >
</span>
<input dojoType="dijit.form.FilteringSelect"
autoComplete="False" labelAttr="label" searchDelay="400"
name="competence" id="input_competence"
store="competence_search_store" />
</span>
</div>
<div>
<label i18n:translate="" for="comment">Comment</label>
<div>
<textarea name="comment" cols="80" rows="4" id="comment"
dojoType="dijit.form.SimpleTextarea"
style="width: 60em"
tal:content="view/comment"></textarea></div>
</div>
<div class="buttons">
<input value="Save" type="submit"
i18n:attributes="value">
<input type="button" value="Cancel"
onClick="return closeDialog(false)"
i18n:attributes="value"></div>
</form>
</metal:block>
</html>