X-Git-Url: https://git.hcoop.net/hcoop/portal.git/blobdiff_plain/a4ccdb5e625953aa6ece8874b34c811353144426..220735007a2888e918244b1e2aadfbfbcb18cb4c:/roll.mlt diff --git a/roll.mlt b/roll.mlt index 16db145..8945697 100644 --- a/roll.mlt +++ b/roll.mlt @@ -14,66 +14,66 @@ if $"cmd" = "respond" then if code = #code rc then Roll.respond (rol, you); - %>

Your response has been saved. Thank you!

<% + %>

Your response has been saved. Thank you!

<% else - %>

Incorrect code!

<% + %>

Incorrect code!

<% end elseif $"cmd" = "add" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; val title = $"title"; val msg = $"msg"; if title = "" then - %>

Your roll call must have a title.

<% + %>

Your roll call must have a title.

<% else val id = Roll.addRollCall (title, msg); viewingCall := SOME id; - %>

Roll call added!

<% + %>

Roll call added!

<% end elseif $"mod" <> "" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; showNormal := false; val rc = Roll.lookupRollCall (Web.stoi ($"mod")) %> -

Modify roll call

+

Modify roll call

"> - - - +
Title:
Message:
+ +
Title:
Message:
<% elseif $"cmd" = "Save" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; val rc = Roll.lookupRollCall (Web.stoi ($"id")); val title = $"title"; val msg = $"msg"; if title = "" then - %>

Your rol call must have a title.

<% + %>

Your rol call must have a title.

<% else Roll.modRollCall {rc with title = title, msg = msg}; viewingCall := SOME (#id rc); - %>

Roll call saved.

<% + %>

Roll call saved.

<% end elseif $"del" <> "" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; showNormal := false; val rc = Roll.lookupRollCall (Web.stoi ($"del")) %> -

Are you sure you want to delete roll call "<% Web.html (#title rc) %>"?

+

Are you sure you want to delete roll call "<% Web.html (#title rc) %>"?

">Yes, delete <% Web.html (#title rc) %>! <% elseif $"del2" <> "" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; val rc = Roll.lookupRollCall (Web.stoi ($"del2")); Roll.deleteRollCall (Web.stoi ($"del2")) %> -

<% Web.html (#title rc) %> deleted!

+

<% Web.html (#title rc) %> deleted!

<% elseif $"cmd" = "mailall" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; showNormal := false; ref first = true %> @@ -87,29 +87,29 @@ elseif $"del" <> "" then end %>">Mail everyone! <% elseif $"view" <> "" then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; val id = Web.stoi ($"view"); viewingCall := SOME id end; if showNormal then - Group.requireGroupNum 0; + Group.requireAnyGroupName ["root", "board"]; switch viewingCall of NONE => %> -

Existing roll calls

+

Existing roll calls

<% foreach rc in Roll.listRollCalls () do %>
  • <% Web.html (#title rc) %> (<% #started rc %>)
  • <% end %> -

    New roll call

    +

    New roll call

    - - - +
    Title:
    Message:
    + +
    Title:
    Message:
    @@ -118,21 +118,21 @@ if showNormal then <% | SOME id => val rc = Roll.lookupRollCall id %> -

    Roll call "<% Web.html (#title rc) %>"

    - - - +

    Roll call "<% Web.html (#title rc) %>"

    +
    Started: <% #started rc %>
    Message: <% Web.htmlNl (#msg rc) %>
    + +
    Started: <% #started rc %>
    Message: <% Web.htmlNl (#msg rc) %>
    [ Modify | Delete ]
    <% val (didnt, did) = Roll.listEntries id %> -

    Didn't respond yet:

    +

    Didn't respond yet:

    <% foreach (usr, ent) in didnt do %>
  • <% Web.html (#name usr) %>
  • <% end %> -

    Responded:

    +

    Responded:

    <% foreach (usr, ent) in did do %>
  • <% Web.html (#name usr) %> (<% switch #responded ent of SOME st => st end %>)