Peeking into members' applications
authoradamch <adamch>
Sat, 8 Dec 2007 20:02:07 +0000 (20:02 +0000)
committeradamch <adamch>
Sat, 8 Dec 2007 20:02:07 +0000 (20:02 +0000)
apps.mlt
user.mlt

index c59d18a..8b9d1ea 100644 (file)
--- a/apps.mlt
+++ b/apps.mlt
@@ -6,7 +6,37 @@ val root = Group.inGroupNum 0;
 
 ref showNormal = true;
 
-if $"vote" <> "" then
+if $"show" <> "" then
+       showNormal := false;
+       val usr = Web.stoi ($"show");
+       val user = Init.lookupUser usr;
+       val appl = App.lookupApp (#app user) %>
+
+       <table class="blanks">
+       <tr> <td>Received:</td> <td><% #applied appl %></td> </tr>
+       <tr> <td>Approved by:</td> <td><%
+               ref first = true;
+               ref found = false;
+               val votes = App.votes (#id appl);
+               foreach (id, name) in votes do
+                       if first then
+                               first := false
+                       else
+                               %>, <%
+                       end
+                       %><a href="user?id=<% id %>"><% name %></a><%
+                       if id = you then
+                               found := true
+                               %> <a href="apps?unvote=<% #id appl %>">[Unvote]</a><%
+                       end
+               end %> <% if (iff board then not found else false) then %><a href="apps?vote=<% #id appl %>">[Vote]</a><% end %></td> </tr>
+       <tr> <td>Username:</td> <td><% #name appl %></td> </tr>
+       <tr> <td>Real name:</td> <td><% Web.html (#rname appl) %></td> </tr>
+       <tr> <td>Forward e-mail?</td> <td><% if #forward appl then %>yes<% else %>no<% end %></td> </tr>
+       <tr> <td>Proposed uses:</td> <td><% Web.htmlNl (#uses appl) %></td> </tr>
+       <tr> <td>Other information:</td> <td><% Web.htmlNl (#other appl) %></td> </tr>
+       </table>        
+<% elseif $"vote" <> "" then
        Group.requireGroupName "board";
        App.vote (you, Web.stoi ($"vote"))
        %><h3>Vote registered</h3><%
index bf9e1c6..b590b64 100644 (file)
--- a/user.mlt
+++ b/user.mlt
@@ -52,4 +52,6 @@ end %>
 
 </table>
 
+<p><a href="apps?show=<% id %>">Show archived membership application</a></p>
+
 <% @footer[] %>