Source: site.view [edit]
Function name: matchResults2
Arguments: results
Description: Format match results
Page type: html
Render function:   searchRender
Module: collabExt

Page source:

<a name="content"></a>

<h1>Who Ranks Higher?</h1>

Order the people below from best (left-most) to least (right-most).<p>

<webl>

var res = "";

if Type(results) == "string" then
   res = "<h1>No results found.</h1>"
else
   res = "<h1>Who's better at: '" + results.skill + "'?</h1>\n";

   res = res + `<div><ol id="sortable">`;

   var i = 0;
   every person in results.people do
       i = i + 1;
       var pic = person["picture-url"] ? "";
       pic = WubCall("collabExt.lookupPic", [person["name"]]);
       if (pic == "") then
          pic = "http://www.talkingpointsmemo.com/assets_c/2009/12/AnonymousHead-cropped-proto-custom_5.jpg";
       end;
       res = res + `<li id="` + person["id"] + `"><img width="80" src="` + pic + `"/><br><center><a target="_blank" href="` +
          person["site-standard-profile-request"] + `">` + person["name"] + `</a></center></li>` + "\n";
   end;

   res = res + "</ol></div>" + ToString(results.people);
end;



res;

</webl>

<p>
<table>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
<tr><td>&nbsp;</td></tr>
</table>
 
<webl>

var res = "";
if Type(results) != "string" then
   res = `  <form action="/webl/WubHub_DoIt" method="post">` + "\n" +
          `    <input name="cmdline" value="cmdChoosePerson(people,skill)" type="hidden"/>` + "\n";

   res = res +  `    <input type="submit" value="Choose!">` + "\n" + `</form>`
end;

res = res + `  <form action="/webl/WubHub_DoIt" method="post">` + "\n" +
          `    <input name="cmdline" value="cmdRankSkill(skill)" type="hidden"/>` + "\n" +
          `    <input name="skill" value="" size="15" type="hidden" title="skill"/>` + "\n" +
          `    <input type="submit" value="Spin again!">` + "\n" +
          `</form></td></tr>`;
</webl>