Source: site.view [edit]
Function name: playSkillsrank
Arguments:
Description: Play page for SkillsRank
Page type: html
Render function:   searchRender
Module: collabExt

Page source:

	
<h1>Play SkillsRank</h1>

<webl>

var res = "";
var uname = (wubinfo.fullname ? nil);
if (uname != nil) then
   res = "";
   var accessToken = Wub_GetVaultValue("skillsrankLinkedInToken") ? nil;
   if (accessToken == nil) then
      res = res + `<a href="/webl/WubHub_DoIt?cmdline=skillsrank.oauthLinkedIn">Login to LinkedIn</a> to begin playing.<p>`;
   else
      var alreadyLoaded = (Wub_GetVaultValue("skillsrankLinkedInLoaded") == "true" ? false);
      if (!alreadyLoaded) then
         res = res + `You must first <a href="/webl/WubHub_DoIt?cmdline=getConnections">Load Connections</a> before you can play.  This will take several minutes...<p>`;
      else
         res = res + `  <form action="/webl/WubHub_DoIt" method="post">` + "\n" +
          `    <input name="cmdline" value="cmdRankSkill(skill)" type="hidden"/>` + "\n" +
          `    Enter a skill, or leave empty to have SkillsRank choose one for you: <p>
                <input name="skill" value="" size="15" title="skill"/>` + "\n" +
          `    <input type="submit" value="Play!">` + "\n" +
          `</form><p>`;
      end
   end
else
   res = `Please <a href="/webl/WubHub_DoIt?cmdline=skillsrank.login">Login</a> first to access this page.`
end;

res;

</webl>