X-Git-Url: http://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/1fe415e08e00c6d35d0561f8213914d3c15532a4..b45f26c921c9c2824496852bd2d493b5dbeb77fa:/users.mlt diff --git a/users.mlt b/users.mlt index cd7582b..1cd37f0 100644 --- a/users.mlt +++ b/users.mlt @@ -17,7 +17,7 @@ if $"cmd" = "Create" then "" => Balance.addBalance ($"name") | s => Web.stoi s); - val id = Init.addUser ($"name", $"rname", bal, ap); + val id = Init.addUser ($"name", $"rname", bal, ap, 1); Group.addToGroups (id, map Web.stoi (Web.getMultiParam "grp")); if $"amount" <> "" then @@ -74,9 +74,8 @@ elseif $"mod" <> "" then Init.grandfatherUsers() %>

Grandfathered

-<% end %> - -<% if showNormal then %> +<% elseif $"cmd" = "addform" then + showNormal := false %>

New member

@@ -101,6 +100,61 @@ elseif $"mod" <> "" then
+<% elseif $"cmd" = "unmigrated" then + showNormal := false; + ref negative = 0; + val users = Init.unmigratedUsers () %> + +

Unmigrated members (<% length users %>)

+ + +<% foreach user in users do %> + +<% val bal = Balance.lookupBalance (#bal user); +if Balance.isNegative bal then + negative := negative + 1 +end %> + +<% end %> +
<% Web.html (#name user) %><% #amount bal %> +<%if #name bal <> #name user then %> + <% Web.html (#name bal) %> +<% end %> +
+ +

<% negative %> have negative balances.

+ +<% elseif $"cmd" = "diff" then + showNormal := false; + + val against = (case $"against" of + "" => Init.usersInAfs () + | x => String.tokens Char.isSpace x); + + val diff = Init.usersDiff (Init.listUsernames (), against) %> + +

User diff

+ +

Only on the portal:

+ + +

Only in AFS:

+ + +<% end %> + +<% if showNormal then %> + +Add a user manually
+

Manage current members

@@ -115,6 +169,8 @@ if #name bal <> #name user then %>

Grandfather old users to have applications
+Who hasn't migrated yet?
+How does the set of users in AFS compare with the set of active portal users?
<% end %>