Collaborama About Help Contact Anonymous [login] Source: site.view [edit] Function name: groupProfileRender Arguments: profile Description: Render a user's profile Page type: snippet Render function: Module: siteutil Page source: <table> <tr> <td width=20% valign=top> <webl> var photo = (profile.photo ? ""); if photo != "" then `<img src="` + profile.photo + `">` + " " else " " end; </webl> </td> <td> <h1><webl>profile.name</webl></h1> <webl>profile.desc</webl> </td> <webl> var homepage = (profile.homepage ? nil); if (homepage != nil) then "<td width=20% valign=top> <a href='/webl/WubHub_DoIt?cmdline=" + homepage + "'>[" + profile.name + " Homepage]</a></td>" else "" end; </webl> </tr> <tr> <webl> var wubcmd = (profile.wubinclude ? ""); if (Str_Trim(wubcmd) != "") then var P = WubCall(wubcmd, []); if Type(P) == "piece" then "<td colspan=2><br>" + Markup(P) + "</td>" else "" end else "" end; </webl> </tr> </table> <h1>Team</h1> <p>The group <b><webl>profile.name</webl></b> contains the following team members:</p> <webl> var html = "<ul>"; var members = (WubCall("groupMembers", [profile.name]) ? [. .]); every m in members do html = html + "<li>"+ Wub_ALinkCmd2(m+".profile", m) + " (" + members[m] + ")</li>\n"; end; html + "</ul>"; </webl> <h1>Features and Bugs</h1> <ul> <li>See <webl>Wub_ALinkCmd2("issues:" + profile.name, "Open Issues")</webl> or <webl>Wub_ALinkCmd2("createIssue:" + profile.name, "Request a Feature")</webl> </li> </ul> <h1>Resources</h1> <p>The group <b><webl>profile.name</webl></b> contains the following commands (resources):</p> <webl> // Remember current module wubvars.currentModule := profile.name; // "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; var html = "<table>"; var cmds = (Wub_FunctionList(profile.name) ? []); every m in cmds do var mf = profile.name + "." + m; var func = Wub_GetFunctionInfo(mf); var item = "<td> " + Wub_TruncateWithEllipsis( func.name +"("+func.arglist+")", 28) + "</td>" + "<td> " + actionlinks(func.module, func.name, func) + " </td>" // + "<td>" + "[By: " + func.createdby + "] </td>" + "<td>" + func.description + "</td>" ; html = html + "<tr>" + item + "</tr>\n"; end; html + "</table>"; </webl>