% @header [("title", ["Membership applications"])];
val you = Init.getUserId ();
val board = Group.reallyInGroupName "board";
val root = Group.inGroupNum 0;
ref showNormal = true;
if $"show" <> "" then
showNormal := false;
val usr = Web.stoi ($"show");
val user = Init.lookupUser usr;
val appl = App.lookupApp (#app user) %>
<%
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
%><% name %><%
if id = you then
found := true
%> [Unvote]<%
end
end %> <% if (iff board then not found else false) then %>[Vote]<% end %>
<%
ref first = true;
ref found = false;
foreach (id, name) in App.votes (#id appl) do
if first then
first := false
else
%>, <%
end
%><% name %><%
end %>
<% if #forward appl then %>yes<% else %>no<% end %>
Proposed uses:
<% Web.htmlNl (#uses appl) %>
Other information:
<% Web.htmlNl (#other appl) %>
<% if #status appl = App.BEING_ADDED then %>
WARNING: Someone already followed the add link for this application. Maybe he forgot to finish.
<% end %>
<% if root then %>
Add this member.
<% end
end
elseif $"add" <> "" then
Group.requireGroupNum 0;
showNormal := false;
val id = Web.stoi ($"add");
val appl = App.lookupApp id;
App.preAdd id %>
First, run this on deleuze:
new-user <% #name appl %> "<% #rname appl %>"<% if #forward appl then %> "<% #email appl %>"<% end %>
<%
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
%><% name %><%
if id = you then
found := true
%> [Unvote]<%
end
end %> <% if (iff board then not found else false) then %>[Vote]<% end %>