Xing 4 TWiki

Function: RenderSkillSelector

Renders a selection of skills for a TriPage skill editor

Documentation

TODO

Parameters
  • SOURCE: topic we get the current skill values from
  • SKILLS: SkillsCategory we list the subcategories for

Css
  • empTvdSkillSelector

Implementation

%STARTINCLUDE%
~~~ <div class="empSkillSelector">
~~~   <noautolink>
~~~   <table cellpadding="0" cellspacing="0">
~~~   <tr>
~~~     <th class="empSkillSelectorLabel">&nbsp;</th>
~~~     <th class="empSkillNone">none</th>
~~~     <th class="empSkillWish">wish</th>
~~~     <th class="empSkillTheory">theory</th>
~~~     <th class="empSkillPractice">practice</th>
~~~     <th class="empSkillExpert">expert</th>
~~~   </tr>%CALC{"$SET(counter,0)"}%
%~~ DBQUERY{topic="%SOURCE%" web="%BASEWEB%"
~~~   format="
*~~
%~~     DBQUERY{"TopicType =~ 'Category'"
~~~       web="%BASEWEB%"
~~~       exclude="%SKILLS%"
~~~       format="
~~~         $percntIFDEFINEDTHEN{\"$percntSUBSUMES{\"%SKILLS%\" cat=\"$topic\"}$percnt\" as=\"1\"}$percnt
~~~         <tr class='$percntCALC{\"$IF($ODD($GET(counter)),empTableOdd,empTableEven)$SETM(counter,+1)\"}$percnt'
~~~             title='$formfield(Title)$expand(': ' and Summary)'>
~~~         <td class='empSkillSelectorLabel'>$formfield(Title)</td>
~~~         <td class='empSkillNone'><input type='checkbox' name='SkillsLevel0' value='$topic'
~~~           $dollarpercntIFDEFINED{\\"$dollarformfield(SkillsLevel0)\\" 
~~~             as=\\".*\b$topic\b.*\\" 
~~~             then=\\" checked\\"
~~~           }$dollarpercnt>
~~~         </td>
~~~         <td class='empSkillWish'><input type='checkbox' name='SkillsLevel1' value='$topic'
~~~           $dollarpercntIFDEFINED{\\"$dollarformfield(SkillsLevel1)\\" 
~~~             as=\\".*\b$topic\b.*\\" 
~~~             then=\\" checked\\"
~~~           }$dollarpercnt>
~~~         </td>
~~~         <td class='empSkillTheory'><input type='checkbox' name='SkillsLevel2' value='$topic'
~~~           $dollarpercntIFDEFINED{\\"$dollarformfield(SkillsLevel2)\\" 
~~~             as=\\".*\b$topic\b.*\\" 
~~~             then=\\" checked\\"
~~~           }$dollarpercnt>
~~~         </td>
~~~         <td class='empSkillPractice'><input type='checkbox' name='SkillsLevel3' value='$topic'
~~~           $dollarpercntIFDEFINED{\\"$dollarformfield(SkillsLevel3)\\" 
~~~             as=\\".*\b$topic\b.*\\" 
~~~             then=\\" checked\\"
~~~           }$dollarpercnt>
~~~         </td>
~~~         <td class='empSkillExpert'><input type='checkbox' name='SkillsLevel4' value='$topic'
~~~           $dollarpercntIFDEFINED{\\"$dollarformfield(SkillsLevel4)\\" 
~~~             as=\\".*\b$topic\b.*\\" 
~~~             then=\\" checked\\"
~~~           }$dollarpercnt>
~~~         </td>
~~~         </tr>
~~~         $percntFIDEFINED$percnt"
~~~     }%
*~~   "
~~~ }%
~~~ </table>
~~~ </noautolink>
~~~ </div>
~~~
%STOPINCLUDE%

Test

  none wish theory practice expert

Calls to 'RenderSkillSelector'

Copyright

© 2007 Michael Daum http://wikiring.de

This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. For more details read the LICENSE.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, to the extent permitted by law; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Applications.ApplicationTopic
TopicType: DocuTopic, TopicFunction
Summary: Renders a selection of skills for a TriPage skill editor
TWikiApplication: EmployeePortalApp
r0 - 29 Jul 2007 - 08:03:59 - TWikiContributor
© giant orange extension cord that reeks hip-hop, funk & soul