Add pointers to special support methods from page to submit a new generic support...
[hcoop/zz_old/portal.git] / user.mlt
index 7316db6..bf9e1c6 100644 (file)
--- a/user.mlt
+++ b/user.mlt
@@ -3,12 +3,12 @@ val user = Init.lookupUser id;
 
 @header[("title", [#name user])] %>
 
-<table>
-<tr> <td align="right"><b>Member</b>:</td> <td><% #name user %></td> </tr>
-<tr> <td align="right"><b>Real name</b>:</td> <td><% Web.html (#rname user) %></td> </tr>
-<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>
-<tr> <td align="right"><b>Joined</b>:</td> <td><% #joined user %></td> </tr>
-<tr> <td align="right"><b>Locations</b>:</td> <td><%
+<table class="blanks">
+<tr> <td>Member:</td> <td><% #name user %></td> </tr>
+<tr> <td>Real name:</td> <td><% Web.html (#rname user) %></td> </tr>
+<tr> <td>Hcoop e-mail:</td> <td><a href="mailto:<% #name user %><% Init.emailSuffix %>"><tt><% #name user %><% Init.emailSuffix %></tt></a></td> </tr>
+<tr> <td>Joined:</td> <td><% #joined user %></td> </tr>
+<tr> <td>Locations:</td> <td><%
        ref first = true;
        foreach loc in Location.userLocations id do
                if first then
@@ -19,16 +19,36 @@ val user = Init.lookupUser id;
                %><a href="location?id=<% #id loc %>"><% Web.html (#name loc) %></a><%
        end %></td> </tr>
 
+<% val links = Link.listUserLinks id;
+
+switch links of
+       (_::_) => %>
 <tr> </tr>
 
-<tr> <td><b>Contact information</b></td> </tr>
+<tr> <td><b>Hosted sites</b></td> </tr>
+
+<% foreach link in links do %>
+       <tr> <td></td> <td><b><a href="<% Web.html (#url link) %>"><% Web.html (#title link) %></a></b><%
+               if #descr link <> "" then %>: <% Web.html (#descr link) end
+       %></td> </tr>
+<% end
+end;
+
+val level = iff Group.inGroupName "contact" then Contact.ADMINS else Contact.MEMBERS;
 
-<% val level = iff Group.inGroupName "contact" then Contact.ADMINS else Contact.MEMBERS;
+val contacts = Contact.listUserContacts (id, level);
+
+switch contacts of
+       (_::_) => %>
+<tr> </tr>
+
+<tr> <td><b>Contact information</b></td> </tr>
 
-foreach (kind, cont) in Contact.listUserContacts (id, level) do %>
+<% foreach (kind, cont) in contacts  do %>
        <tr> <td align="right" valign="top"><b><% Web.html (#name kind) %></b>:</td>
        <td><% Contact.format (kind, cont) %></td> </tr>
-<% end %>
+<% end
+end %>
 
 </table>