Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: matchResults Arguments: results Description: Format match results Page type: html Render function: Module: skillsrank Page source: <webl> WubCall("skillsrank.incHeader", []); </webl> <webl> WubCall("skillsrank.incTop", ["play"]); </webl> <!-- content here <!-- content here ============================================================ --> <a name="content"></a> <h1>Who Ranks Higher?</h1> <webl> var res = ` <form action="/webl/WubHub_DoIt" method="post">` + "\n" + ` <input name="cmdline" value="skillsrank.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><hr>`; res = res + "<h1>Who's better at: '" + results.skill + "'?</h1>\n"; var person = results.people[0]; res = res + "<table>\n"; res = res + ` <form action="/webl/WubHub_DoIt" method="post">` + "\n" + ` <input name="cmdline" value="skillsrank.cmdChoosePerson(people,skill)" type="hidden"/>` + "\n"; every person in results.people do var pic = person["picture-url"] ? ""; if (pic == "") then pic = "http://www.talkingpointsmemo.com/assets_c/2009/12/AnonymousHead-cropped-proto-custom_5.jpg"; end; res = res + ` <tr><td> <input name="people" type="radio" value="` + person["id"] + `">` + "\n" + `<input name="skill" type="hidden" value="` + results.skill+ `">` + "\n" + `<a target="_blank" href="` + person["site-standard-profile-request"] + `">` + person["name"] + " -- " + person["headline"] + `</a></input></td><td><img src="` + pic + `"/></td></tr> `; end; res = res + "<tr><td>"; res = res + ` <input type="submit" value="Choose!">` + "\n" + `</form></td><td>`; res = res + ` <form action="/webl/WubHub_DoIt" method="post">` + "\n" + ` <input name="cmdline" value="skillsrank.cmdRankSkill(skill)" type="hidden"/>` + "\n" + ` <input name="skill" value="` + results.skill + `" size="15" type="hidden" title="skill"/>` + "\n" + ` <input type="submit" value="Spin again!">` + "\n" + `</form></td></tr>`; res = res + "</table>\n"; res; </webl> </div> <webl> WubCall("skillsrank.incBottom", []); </webl> <webl> WubCall("skillsrank.incSidemenuNavSite", ["play"]); </webl> <webl> WubCall("skillsrank.incFooter", []); </webl>