Xing 4 TWiki

Function: RenderSkills

Render the skills tab in a TriPage

Documentation

This function renders the skills modul

Parameters
  • SOURCE: topic for which we render the skills data

Css

Implementation

%STARTINCLUDE%
~~~ <h2>Skills</h2>
~~~ %CALC{"$SET(count,0)"}%
~~~ <noautolink>
~~~ <table class="empDetailsTable" cellspacing="0" cellpadding="0">
%~~   DBQUERY{"TopicType=~'\bCategory\b' AND Category=~'\bSkillsCategory\b'"
~~~     web="%BASEWEB%"
~~~     format="
~~~       <tr class='$percntCALC{\"$IF($ODD($GET(count)),empTableOdd,empTableEven)$SETM(count,+1)\"}$percnt'>
~~~         <th class='empTableFirstCol' valign='top'>
~~~           <a title='$formfield(Summary)' href='%SCRIPTURLPATH{"view"}%/$web/$topic'>$formfield(Title)</a>
~~~           </th>
~~~         <td id='$topic'></td>
~~~       </tr>"
~~~    }%
%~~   DBQUERY{
~~~     web="%BASEWEB%"
~~~     topic="%IFDEFINED{"%SOURCE%" then="%SOURCE%" else="%BASEWEB%.%BASETOPIC%"}%"
~~~     remote="force"
~~~     format="
~~~       <tr class='$percntCALC{\"$IF($ODD($GET(count)),empTableOdd,empTableEven)$SETM(count,+1)\"}$percnt'>
~~~         <th class=\"empTableFirstCol\">Others</th>
~~~         <td> $formfield(OtherSkills) </td>
~~~       </tr>
~~~       </table>
~~~       $percntIFDEFINEDTHEN{\"$formfield(SkillsTimeStamp)\"}$percnt
~~~         <div class=\"empTimeStamp\">Last modified $formatTime(SkillsTimeStamp)</div>
~~~       $percntFIDEFINED$percnt
~~~       <div class=\"empSkillsLegend\">
~~~         Legend: 
~~~           <span class=\"skillvalue wish\">wish</span>,
~~~           <span class=\"skillvalue theory\">theory</span>,
~~~           <span class=\"skillvalue practice\">practice</span>,
~~~           <span class=\"skillvalue expert\">expert</span>
~~~       </div>
~~~     <script type=\"text/javascript\">
~~~       $(function() {
~~~         var skillsLevel;
~~~         skillsLevel = 
~~~           Array(
~~~             $percntFORMATLIST{\"$formfield(SkillsLevel1)\" 
~~~               format=\"
~~~                 $dollarpercntDBQUERY{topic=\\"$web.$1\\" 
~~~                   format=\\"{
~~~                     skill:'$dollarformfield(Category)',
~~~                     value:'$dollarformfield(Title)',
~~~                     tooltip:'$dollarexpand(Summary or Title)',
~~~                     topic:'$dollartopic'
~~~                   }\\"
~~~                 }$dollarpercnt
~~~               \" 
~~~               separator=\",\"
~~~             }$percnt
~~~           );
~~~         for (var i = 0; i < skillsLevel.length; i++) {
~~~           $(\"#\"+skillsLevel[i].skill).
~~~             append(\"<a href='%SCRIPTURLPATH{"view"}%/$web/SkillsCloud?search=\"+
~~~               skillsLevel[i].topic+
~~~               \"' class='skillvalue wish' title='\"+skillsLevel[i].tooltip+\" (wish)'>\"+
~~~               skillsLevel[i].value+'</a>');
~~~         }
~~~         skillsLevel = 
~~~           Array(
~~~             $percntFORMATLIST{\"$formfield(SkillsLevel2)\" 
~~~               format=\"
~~~                 $dollarpercntDBQUERY{topic=\\"$web.$1\\" 
~~~                   format=\\"{
~~~                     skill:'$dollarformfield(Category)',
~~~                     value:'$dollarformfield(Title)',
~~~                     tooltip:'$dollarexpand(Summary or Title)',
~~~                     topic:'$dollartopic'
~~~                   }\\"
~~~                 }$dollarpercnt
~~~               \" 
~~~               separator=\",\"
~~~             }$percnt
~~~           );
~~~         for (var i = 0; i < skillsLevel.length; i++) {
~~~           $(\"#\"+skillsLevel[i].skill).
~~~             append(\"<a href='%SCRIPTURLPATH{"view"}%/$web/SkillsCloud?search=\"+
~~~               skillsLevel[i].topic+
~~~               \"' class='skillvalue theory' title='\"+skillsLevel[i].tooltip+\" (theory)'>\"+
~~~               skillsLevel[i].value+'</a>');
~~~         }
~~~         skillsLevel = 
~~~           Array(
~~~             $percntFORMATLIST{\"$formfield(SkillsLevel3)\" 
~~~               format=\"
~~~                 $dollarpercntDBQUERY{topic=\\"$web.$1\\" 
~~~                   format=\\"{
~~~                     skill:'$dollarformfield(Category)',
~~~                     value:'$dollarformfield(Title)',
~~~                     tooltip:'$dollarexpand(Summary or Title)',
~~~                     topic:'$dollartopic'
~~~                   }\\"
~~~                 }$dollarpercnt
~~~               \" 
~~~               separator=\",\"
~~~             }$percnt
~~~           );
~~~         for (var i = 0; i < skillsLevel.length; i++) {
~~~           $(\"#\"+skillsLevel[i].skill).
~~~             append(\"<a href='%SCRIPTURLPATH{"view"}%/$web/SkillsCloud?search=\"+
~~~               skillsLevel[i].topic+
~~~               \"' class='skillvalue practice' title='\"+skillsLevel[i].tooltip+\" (practice)'>\"+
~~~               skillsLevel[i].value+'</a>');
~~~         }
~~~         skillsLevel = 
~~~           Array(
~~~             $percntFORMATLIST{\"$formfield(SkillsLevel4)\" 
~~~               format=\"
~~~                 $dollarpercntDBQUERY{topic=\\"$web.$1\\" 
~~~                   format=\\"{
~~~                     skill:'$dollarformfield(Category)',
~~~                     value:'$dollarformfield(Title)',
~~~                     tooltip:'$dollarexpand(Summary or Title)',
~~~                     topic:'$dollartopic'
~~~                   }\\"
~~~                 }$dollarpercnt
~~~               \" 
~~~               separator=\",\"
~~~             }$percnt
~~~           );
~~~         for (var i = 0; i < skillsLevel.length; i++) {
~~~           $(\"#\"+skillsLevel[i].skill).
~~~             append(\"<a href='%SCRIPTURLPATH{"view"}%/$web/SkillsCloud?search=\"+
~~~               skillsLevel[i].topic+
~~~               \"' class='skillvalue expert' title='\"+skillsLevel[i].tooltip+\" (expert)'>\"+
~~~               skillsLevel[i].value+'</a>');
~~~         }
~~~         $('a.skillvalue').Tooltip({
~~~           delay:250,
~~~           track:true,
~~~           showURL:false,
~~~           extraClass:'twiki',
~~~           showBody:': '
~~~         });
~~~       });
~~~     </script>
~~~     "
~~~   }%
~~~ </noautolink>
~~~
%STOPINCLUDE%

Test

Skills

Application Frameworks
Architectures
Business Comunication
Business Intelligence
Competences
Databases
Development tools
Middleware
Operating Systems
Programming
Security
Solution Components
Solution
System Engineering
Others Wing Tsung, Jazz Guitar, Composition, Painting
Last modified 22 Aug 2007 - 07:55
Legend: wish, theory, practice, expert

Calls to 'RenderSkills'

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: Render the skills tab in a TriPage
TWikiApplication: EmployeePortalApp
r0 - 26 Aug 2007 - 07:28:25 - TWikiContributor
© giant orange extension cord that reeks hip-hop, funk & soul