X-Git-Url: https://git.hcoop.net/hcoop/zz_old/portal.git/blobdiff_plain/d90ddc1bf0dc80f9328881eced2e6ff43752d062..20acb9257f2b32de71c09455c77f758df1d99b1c:/issue.mlt diff --git a/issue.mlt b/issue.mlt index fdfface..f8a7230 100644 --- a/issue.mlt +++ b/issue.mlt @@ -12,15 +12,15 @@ ref showNormal = true; if $"cmd" = "new" then showNormal := false %> -

New issue

+

New issue

-
+ - - - - +
Title:
Only make this issue accessible to the admins for this support category.
Description:
+ + +
Title:
Only make this issue accessible to the admins for this support category.
Description:
@@ -28,19 +28,19 @@ if $"cmd" = "new" then <% elseif $"cmd" = "add" then val title = $"title"; if not (Support.validTitle title) then - %>

Invalid title

<% + %>

Invalid title

<% else val id = Support.addIssue (you, catId, title, $"priv" = "on", Support.NEW); val _ = Support.addPost (you, id, $"body"); if not (Support.notifyCreation id) then - %>

Error sending e-mail notification

<% + %>

Error sending e-mail notification

<% end; viewingIssue := SOME id end elseif $"cmd" = "list" then showNormal := false %> -

All issues

+

All issues

<% foreach (name, issue) in Support.listCategoryIssues catId do @@ -64,23 +64,23 @@ end %> val id = Web.stoi ($"mod"); val issue = Support.lookupIssue id; if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

You aren't authorized to modify that.

<% + %>

You aren't authorized to modify that.

<% else %> -

Modify issue

+

Modify issue

- + -
-
Category: + - - - + +
Category:
Title:
checked<% end %>> Only make this issue accessible to the admins for this support category.
Status:
Title:
checked<% end %>> Only make this issue accessible to the admins for this support category.
Status: @@ -194,13 +194,13 @@ elseif $"savePost" <> "" then val issue = Support.lookupIssue (#iss post); if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

Authorization failure

<% + %>

Authorization failure

<% else Support.modPost {post with body = $"body"}; viewingIssue := SOME (#iss post) - %>

Post saved

Post saved "" then @@ -210,11 +210,11 @@ elseif $"delPost" <> "" then val issue = Support.lookupIssue (#iss post); if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

Authorization failure

<% + %>

Authorization failure

<% else - %>

Are you sure you want to delete this post?

+ %>

Are you sure you want to delete this post?

<% Web.htmlNl (#body post) %>
Yes, delete it!<% end @@ -225,13 +225,13 @@ elseif $"delPost2" <> "" then val issue = Support.lookupIssue (#iss post); if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not admin then - %>

Authorization failure

<% + %>

Authorization failure

<% else Support.deletePost id; viewingIssue := SOME (#iss post) - %>

Post deleted

<% + %>

Post deleted

<% end elseif $"id" <> "" then @@ -244,22 +244,28 @@ switch viewingIssue of val canEdit = Support.allowedToEdit id; val canView = Support.allowedToSee id; if catId <> #cat issue then - %>

Inconsistent cat field

<% + %>

Inconsistent cat field

<% elseif not canView then - %>

You aren't authorized to view that.

<% + %>

You aren't authorized to view that.

<% else val user = Init.lookupUser (#usr issue) %> - - - - - -
Title: <% Web.html (#title issue) %>
Created by: <% #name user %>
At: <% #stamp issue %>
Private: <% if #priv issue then %>yes<% else %>no<% end %>
Status: <% switch #status issue of + + + + + + +<% switch #pstamp issue of + SOME stamp => %><% + end; + switch #cstamp issue of + SOME stamp => %><% + end %>
Title: <% Web.html (#title issue) %>
Created by: <% #name user %>
At: <% #stamp issue %>
Private: <% if #priv issue then %>yes<% else %>no<% end %>
Status: <% switch #status issue of Support.NEW => %>New<% | Support.PENDING => %>Pending<% | Support.CLOSED => %>Closed<% end %>
Changed to pending: <% stamp %>
Closed: <% stamp %>
<% if admin then %> @@ -281,9 +287,9 @@ foreach (name, post) in Support.listPosts id do %>


-

Post to this thread

+

Post to this thread

- + @@ -297,9 +303,9 @@ foreach (name, post) in Support.listPosts id do %> if showNormal then %> New issue
-List all issues +List all issues (including closed issues) -

Open issues

+

Open issues

<% val issues = iff admin then Support.listOpenCategoryIssuesAdmin catId