Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: lsRender Arguments: data Description: Formatting component of "ls" command Page type: webl Render function: Module: siteutil Page source: var s = ""; var item, func; // "view" and "edit" links for m.f var actionlinks = fun(m,f,info) var mf = m + "." + f; var go = ""; if (Str_Trim(info.arglist) == "") then go = "/" + Wub_ALinkCmd2(mf, "go") end; "[" + Wub_ALinkCmd2("site.view("+mf+")", "source") + "/" + Wub_ALinkCmd2("site.edit("+mf+")", "edit") + go + "]"; end; every m in data do s = s + "<tr><td><b>Module: " + m + "</b></td></tr>\n"; every f in data[m] do if Str_IndexOf(".", f) > 1 then func = Wub_GetFunctionInfo(f); else func = Wub_GetFunctionInfo(m + "." + f) end; item = "<td> " + Wub_TruncateWithEllipsis( func.name +"("+func.arglist+")", 28) + "</td>" + "<td> " + actionlinks(m,f, func) + " </td>" + "<td>" + func.description + "</td>" ; s = s + "<tr>" + item + "</tr>\n"; end end; NewPiece("<h1>Command List</h1><table>"+s+"</table>","text/html")