Source: site.view [edit]
Function name: resultsRender
Arguments: results
Description: Home page for mappintosh
Page type: html
Render function:  
Module: mapp

Page source:

<webl>     WubCall("mapp.incHeader", []);      </webl>
<webl>     WubCall("mapp.incTop", ["home"]);         </webl>




		<div id="page">
			<div id="content">
				<div class="post">
					<!-- h2 class="title">mappintosh -- app search</h2 -->
					<p class="meta"><span class="date">Apps matching: <webl>results.query</webl></span><span class="posted">
                                             <webl>Size(results.apps);</webl> returned
                                        </span></p>
					<div style="clear: both;"></div>
			       </div>
					
<webl>

var s = "";
every res in results.apps do
   var dlist = Str_Split(res.description, "\n");
   var a = `<a href="` + res.view + `" target="_blank">`;
   s = s + `<div class="post"><table><tr><td>` + a + `<img src="` + res.artsmall + `"/></a></td><td width=5>&nbsp;</td><td>` + 
                a + `<h3 class="title"> ` + res.title + `</h3></a><p class="meta">&nbsp;&nbsp;&nbsp;By: ` + res.artist + `<br></br>&nbsp;&nbsp;&nbsp;(` + res.devices + `)</p></td></tr></table>` 
                + dlist[0] + "<p>rank: " + res.rank + "  " + res.boost + "</p></div>\n";				
end;
s;

</webl>

			</div>
			<!-- end #content -->
			<div id="sidebar">
				<ul>
					<li>
						<h2>Search</h2>
<UL>
<form action="/webl/WubHub_DoIt" method="post">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   <input name="cmdline" value="mapp.searchapps(query, device)" type="hidden"/>
   <input name="query" type="text" value="<webl>results.query</webl>"
      size="40" >

<p>
<webl>

   var isCheckedDevice = fun(deviceName)
      var s = `<input name="device" type="radio" value="` + Str_ToLowerCase(deviceName) + `"`;
      if results.device == Str_ToLowerCase(deviceName) then
          s = s + " checked=true "
      end;
      s = s + "> " + deviceName + "</input>\n";
      return s;
   end;

   isCheckedDevice("All") + "Devices<br>" + isCheckedDevice("IPhone") + isCheckedDevice("IPad") +  isCheckedDevice("IPod") +isCheckedDevice("MAC");

</webl>
<br>
  <input type="submit" value="Search">
</form>						
</UL>
                                        </li>
				</ul></div>
			<!-- end #sidebar -->
			<div style="clear: both;"></div>
		</div>
		<!-- end #page -->


<webl>     WubCall("mapp.incFooter", []);         </webl>