45f95cf5 |
1 | <% if $"id" = "" then |
2 | @header [("title", ["Contact information directory"])] |
3 | |
4 | foreach kind in Contact.listKinds () do %> |
5 | <a href="dir?id=<% #id kind %>"><% Web.html (#name kind) %></a><br> |
6 | <% end |
7 | else |
8 | val id = Web.stoi ($"id"); |
9 | val kind = Contact.lookupKind id; |
10 | @header [("title", [Web.html (#name kind) ^ " directory"])]; |
11 | |
12 | val level = iff Group.inGroupName "contact" then Contact.ADMINS else Contact.MEMBERS; |
13 | |
14 | %><table><% |
15 | foreach (name, cont) in Contact.listContactsByKind (id, level) do %> |
16 | <tr> <td align="right"><a href="user?id=<% #usr cont %>"><% name %></a></td> |
17 | <td><% Contact.format (kind, cont) %></td> </tr> |
18 | <% end |
19 | %></table><% |
20 | end; |
21 | |
22 | @footer[] %> |