03d8dbd278fcbf3fee3bc14e527f1afed4b9a1e1
[bpt/portal.git] / portal.mlt
1 <% val you = Init.getUser();
2 val bal = Balance.lookupBalance (#bal you);
3 val deposit = Balance.depositAmount (#id bal);
4 @header [] %>
5
6 <% @payment [] %>
7
8 <h3><a href="money">Your recent account activity</a></h3>
9
10 <table>
11 <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> </tr>
12 <% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
13 <tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td> </tr>
14 <% end %>
15 </table>
16 <b>Balance: $<% Util.sub (#amount bal, deposit) %></b><br>
17 <b>Deposit: $<% deposit %></b> (3 months of dues at your current <a href="pledge">pledge level</a>)
18
19 <% val polls = Poll.listCurrentPolls ();
20 switch polls of
21 _::_ => %>
22 <h3><a href="poll">Current polls</a></h3>
23
24 <% foreach pol in polls do %>
25 <li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
26 <% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
27 (<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
28 <% end
29 end %>
30
31 <% val issues = Support.listOpenIssues (#id you);
32 switch issues of
33 _::_ => %>
34 <h3><a href="support">Open support issues</a></h3>
35
36 <% foreach (name, issue) in issues do %>
37 <a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
38 <% switch #status issue of
39 Support.NEW => %>(New)<%
40 | Support.PENDING => %>(Pending)<%
41 | Support.CLOSED => %>(Closed)<%
42 end %>
43 <br>
44 <% end
45 end;
46
47 @footer [] %>