X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/ee587f7fc73f657e8c2c02d622f80069291229a5..44a63d224a81da3c5d2c9e50a46b6af956c47c5f:/contact.mlt diff --git a/contact.mlt b/contact.mlt index 75b6978..905b9c7 100644 --- a/contact.mlt +++ b/contact.mlt @@ -4,23 +4,68 @@ ref showNormal = true; if $"cmd" = "add" then val id = Contact.addContact (Init.getUserId(), Web.stoi ($"knd"), $"v", Contact.privFromInt (Web.stoi ($"priv"))) %> -

Contact added

+

Contact added

+ +<% elseif $"mod" <> "" then + showNormal := false; + val id = Web.stoi ($"mod"); + val cont = Contact.lookupContact id %> + +

Modify contact entry

+ +
+ + + + + + +
Kind:
Value:
Readable by:
+
+ +<% elseif $"save" <> "" then + val id = Web.stoi ($"save"); + val cont = Contact.lookupContact id; + Contact.modContact {cont with knd = Web.stoi ($"knd"), v = $"v", priv = Contact.privFromInt (Web.stoi ($"priv"))} %> +

Contact entry saved

+ +<% elseif $"del" <> "" then + showNormal := false; + val id = Web.stoi ($"del"); + val cont = Contact.lookupContact id %> +

Are you sure you want to delete contact entry "<% Web.html (#v cont) %>"?

+ Yes, delete "<% Web.html (#v cont) %>"! + +<% elseif $"del2" <> "" then + val id = Web.stoi ($"del2"); + val cont = Contact.lookupContact id; + Contact.deleteContact id %> +

Contact entry "<% Web.html (#v cont) %>" deleted

+ <% end; if showNormal then %> -

Add new contact information

+

Add new contact information

-
+ - -
Kind: + - - +
Kind:
Value:
Readable by:
Value:
Readable by:
-

Your contact information

+

Your contact information

- +
<% foreach (kind, cont) in Contact.listUserContacts (Init.getUserId(), Contact.ADMINS) do %> - - + + + + <% end %>
<% Web.html (#name kind) %>:<% Contact.format (kind, cont) %>
<% Web.html (#name kind) %>:<% Contact.format (kind, cont) %><% switch #priv cont of + Contact.PUBLIC => %>Public<% + | Contact.MEMBERS => %>Members only<% + | Contact.ADMINS => %>Admins only<% + end %>[Modify] [Delete]