7316db6e14eccc8333c2e96cc46a752895d21930
[bpt/portal.git] / user.mlt
1 <% val id = Web.stoi ($"id");
2 val user = Init.lookupUser id;
3
4 @header[("title", [#name user])] %>
5
6 <table>
7 <tr> <td align="right"><b>Member</b>:</td> <td><% #name user %></td> </tr>
8 <tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname user) %></td> </tr>
9 <tr> <td align="right"><b>Hcoop e-mail</b>:</td> <td><a href="mailto:<% #name user %>@hcoop.net"><tt><% #name user %>@hcoop.net</tt></a></td> </tr>
10 <tr> <td align="right"><b>Joined</b>:</td> <td><% #joined user %></td> </tr>
11 <tr> <td align="right"><b>Locations</b>:</td> <td><%
12 ref first = true;
13 foreach loc in Location.userLocations id do
14 if first then
15 first := false
16 else
17 %>, <%
18 end
19 %><a href="location?id=<% #id loc %>"><% Web.html (#name loc) %></a><%
20 end %></td> </tr>
21
22 <tr> </tr>
23
24 <tr> <td><b>Contact information</b></td> </tr>
25
26 <% val level = iff Group.inGroupName "contact" then Contact.ADMINS else Contact.MEMBERS;
27
28 foreach (kind, cont) in Contact.listUserContacts (id, level) do %>
29 <tr> <td align="right" valign="top"><b><% Web.html (#name kind) %></b>:</td>
30 <td><% Contact.format (kind, cont) %></td> </tr>
31 <% end %>
32
33 </table>
34
35 <% @footer[] %>