X-Git-Url: https://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/51520441651adb8cabb245ba1c9cd715e02ee01a..HEAD:/location.mlt diff --git a/location.mlt b/location.mlt index ce8c799..9ac74f9 100644 --- a/location.mlt +++ b/location.mlt @@ -9,10 +9,10 @@ if $"cmd" = "add" then val name = $"name"; if Location.alreadyExists (parent, name) then - %>

That location already exists!

<% + %>

That location already exists!

<% else val id = Location.addLocation (parent, $"name") - %>

Location added

+ %>

Location added

<% end elseif $"mod" <> "" then @@ -21,12 +21,12 @@ elseif $"mod" <> "" then val id = Web.stoi ($"mod"); val loc = Location.lookupLocation id %> -

Modify a location

+

Modify a location

-
+ - -
Parent: + - +
Parent:
Name:
Name:
@@ -53,14 +53,14 @@ end %> val loc = Location.lookupLocation id; Location.modLocation {loc with parent = (case $"parent" of "" => NONE | parent => SOME (Web.stoi parent)), name = $"name"}; - %>

Location saved

+ %>

Location saved

<% elseif $"del" <> "" then Group.requireGroupName "location"; showNormal := false; val id = Web.stoi ($"del"); val loc = Location.lookupLocation id %> -

Are you sure you want to delete "<% Web.html (#name loc) %>"?

+

Are you sure you want to delete "<% Web.html (#name loc) %>"?

Yes, delete "<% Web.html (#name loc) %>"! <% elseif $"del2" <> "" then @@ -68,15 +68,15 @@ end %> val id = Web.stoi ($"del2"); val loc = Location.lookupLocation id; Location.deleteLocation id %> -

Deleted location "<% Web.html (#name loc) %>"

+

Deleted location "<% Web.html (#name loc) %>"

<% elseif $"addLoc" <> "" then Location.addToLocation {loc = Web.stoi ($"addLoc"), usr = Init.getUserId ()} - %>

Added

+ %>

Added

<% elseif $"remLoc" <> "" then Location.removeFromLocation {loc = Web.stoi ($"remLoc"), usr = Init.getUserId ()} - %>

Removed

+ %>

Removed

<% elseif $"id" <> "" then showNormal := false; @@ -91,7 +91,7 @@ end %> %>Parent: <% Web.html (#name ploc) %><% end %> -

Residents:

+

Residents:

<% ref first = true; foreach user in Location.residents id do if first then @@ -102,7 +102,7 @@ foreach user in Location.residents id do %><% #name user %><% end %> -

Regions:

+

Regions:

<% foreach loc in Location.subLocations (SOME id) do %> <% Web.html (#name loc) %>
<% end; @@ -124,12 +124,12 @@ if showNormal then %> end %> -

Add a new location

+

Add a new location

-
+ - -
Parent: + - +
Parent:
Name:
Name:
<% val withUser = Location.locationTreeWithUser (NONE, NONE, Init.getUserId ()) %> -

Add yourself to a location

+

Add yourself to a location

Adding yourself to a location automatically adds you to all more general loations. -
+
-

Remove yourself from a location

+

Remove yourself from a location

-
+