Add [X]HTML5 DTD to header
[hcoop/portal.git] / portal.mlt
1 <% val you = Init.getUser();
2 val bal = Balance.lookupBalance (#bal you);
3 val deposit = Balance.depositAmount (#id bal);
4 val showBal = Util.sub (#amount bal, deposit);
5 @header [] %>
6
7 <div style="border: 1px solid goldenrod; background-color: palegoldenrod;">
8
9 <h3>Notice: Google Checkout Is Gone</h3>
10
11 <p>Google Checkout shut down in November 2013 so we only have Paypal
12 available for processing payments currently. We are in the process of
13 selecting a second (and possibly third) payment processor; you can
14 contribute to the discussion by <a
15 href="http://wiki.hcoop.net/PaymentProcessor2014">visiting the wiki
16 discussion</a>.
17
18 </div>
19
20 <% @payment [] %>
21
22 <h3><a href="money">Your recent account activity</a></h3>
23
24 <% ref running = showBal %>
25 <table>
26 <tr> <td><b>Date</b></td> <td><b>Description</b></td> <td><b>Amount</b></td> <td><b>Balance</b></td></tr>
27 <% foreach (amount, trn) in Money.listUserTransactionsLimit (Init.getUserId (), 5) do %>
28 <tr> <td><% #d trn %></td> <td><a href="money?trn=<% #id trn %>"><% Web.html (#descr trn) %></a></td> <td><% amount %>/<% #amount trn %></td>
29 <td><% running %></tr>
30 <% running := Util.sub (running, amount)
31 end %>
32 </table>
33 <a href="money?lookback=inf">Show all transactions</a><br>
34 <b>Balance: $<% showBal %></b><br>
35 <b>Deposit: $<% deposit %></b> (3 months of dues at the minimal <a href="pledge">pledge level</a>)
36
37 <!--b>Balance: $<% #amount bal %></b-->
38
39 <% val polls = Poll.listCurrentPolls ();
40 switch polls of
41 _::_ => %>
42 <h3><a href="poll">Current polls</a></h3>
43
44 <% foreach pol in polls do %>
45 <li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
46 <% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
47 (<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
48 <% end
49 end %>
50
51 <% val issues = Support.listOpenIssues (#id you);
52 switch issues of
53 _::_ => %>
54 <h3><a href="support">Open support issues</a></h3>
55
56 <% foreach (name, issue) in issues do %>
57 <a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
58 <% switch #status issue of
59 Support.NEW => %>(New)<%
60 | Support.PENDING => %>(Pending)<%
61 | Support.CLOSED => %>(Closed)<%
62 end %>
63 <br>
64 <% end
65 end;
66
67 val {total, vhosts} = Stats.getWebbwUser {user = Init.getUserName (), last = 0};
68 switch vhosts of
69 _ :: _ =>
70 %><h3>Your web traffic this month</h3>
71 <table><tr><th>Site</th> <th>Data transferred (kB)</th></tr><%
72 foreach e in vhosts do %>
73 <tr><td align="right"><a href="<% if #ssl (#host e) then %>https<% else %>http<% end %>://<% #hostname (#host e) %>/"><% #hostname (#host e) %><% if #ssl (#host e) then %> (SSL)<% end %></a> <a href="/webalizer/<% #id (#host e) %>/">[detail]</a></td><td><% #size e %></td></tr>
74 <% end %>
75 </table>
76 <% end;
77
78 @footer [] %>