X-Git-Url: http://git.hcoop.net/hcoop/portal.git/blobdiff_plain/f49e1088a3c5fbcc48bed202de376b407a23a9ba..13f4f111d192012443342f75f2608a59dad413a2:/portal.mlt
diff --git a/portal.mlt b/portal.mlt
index c7bce36..e9d82fe 100644
--- a/portal.mlt
+++ b/portal.mlt
@@ -1,12 +1,65 @@
-<% @header [] %>
+<% val you = Init.getUser();
+val bal = Balance.lookupBalance (#bal you);
+val deposit = Balance.depositAmount (#id bal);
+val showBal = Util.sub (#amount bal, deposit);
+@header [] %>
-
Your recent account activity
+<% @payment [] %>
+
+
+<% ref running = showBal %>
- Date | Description | Amount |
+ Date | Description | Amount | Balance |
<% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
- <% #d trn %> | <% Web.html (#descr trn) %> | <% amount %>/<% #amount trn %> |
-<% end %>
+ <% #d trn %> | <% Web.html (#descr trn) %> | <% amount %>/<% #amount trn %> |
+<% running %> |
+<% running := Util.sub (running, amount)
+end %>
+Show all transactions
+Balance: $<% showBal %>
+Deposit: $<% deposit %> (3 months of dues at the minimal pledge level)
+
+
+
+<% val polls = Poll.listCurrentPolls ();
+switch polls of
+ _::_ => %>
+
+
+<% foreach pol in polls do %>
+ <% Web.html (#title pol) %>
+<% if Poll.takingVotes pol then %>[VOTE]<% end %>
+(<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)
+<% end
+end %>
+
+<% val issues = Support.listOpenIssues (#id you);
+switch issues of
+ _::_ => %>
+
+
+<% foreach (name, issue) in issues do %>
+<% name %>: <% Web.html (#title issue) %>
+<% switch #status issue of
+ Support.NEW => %>(New)<%
+ | Support.PENDING => %>(Pending)<%
+ | Support.CLOSED => %>(Closed)<%
+end %>
+
+<% end
+end;
+
+val {total, vhosts} = Stats.getWebbwUser {user = Init.getUserName (), last = 0};
+switch vhosts of
+ _ :: _ =>
+ %>Your web traffic this month
+
+<% end;
-<% @footer [] %>
\ No newline at end of file
+@footer [] %>