release portal3 into production
[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 class="news">
8
9 <h3>Welcome to the Portal On Navajos</h3>
10
11 <p><a href="https://wiki.hcoop.net/Hardware#deleuze">Deleuze</a>
12 suffered a hardware failure, and the benefit is that the portal is now
13 running on our Debian Wheezy web server. List preferences are
14 temporarily non-functional, email <a
15 href="mailto:admins@hcoop.net"><tt>admins@hcoop.net</tt></a> if you
16 would like to change your hcoop list subscriptions.</p>
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 class="data">
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 style="text-align: right"><% amount %>/<% #amount trn %></td>
29 <td style="text-align: right"><% running %></td></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 <h3>Pending Stripe Payments</h3>
38
39 <table>
40 <tr><td><strong>Date</strong></td><td><strong>Net Amount</strong> (After Fees)</td></tr>
41 <% foreach stripePmt in Money.listUserPendingStripePayments
42 (Init.getUserId () ) do %>
43 <tr>
44 <td><% #paid_on stripePmt %></td>
45 <td style="text-align: right">$<% #net stripePmt %></td>
46 </tr>
47 <% end %>
48 </table>
49
50
51 <!--b>Balance: $<% #amount bal %></b-->
52
53 <% val polls = Poll.listCurrentPolls ();
54 switch polls of
55 _::_ => %>
56 <h3><a href="poll">Current polls</a></h3>
57
58 <% foreach pol in polls do %>
59 <li> <a href="poll?id=<% #id pol %>"><% Web.html (#title pol) %></a>
60 <% if Poll.takingVotes pol then %><a href="poll?vote=<% #id pol %>">[VOTE]</a><% end %>
61 (<% Web.html (#starts pol) %> to <% Web.html (#ends pol) %>)</li>
62 <% end
63 end %>
64
65 <% val issues = Support.listOpenIssues (#id you);
66 switch issues of
67 _::_ => %>
68 <h3><a href="support">Open support issues</a></h3>
69
70 <% foreach (name, issue) in issues do %>
71 <a href="user?id=<% #usr issue %>"><% name %></a>: <a href="issue?cat=<% #cat issue %>&id=<% #id issue %>"><% Web.html (#title issue) %></a>
72 <% switch #status issue of
73 Support.NEW => %>(New)<%
74 | Support.PENDING => %>(Pending)<%
75 | Support.CLOSED => %>(Closed)<%
76 end %>
77 <br>
78 <% end
79 end;
80
81 val {total, vhosts} = Stats.getWebbwUser {user = Init.getUserName (), last = 0};
82 switch vhosts of
83 _ :: _ =>
84 %><h3>Your web traffic this month</h3>
85 <table class="data"><tr><th>Site</th> <th>Data transferred (kB)</th></tr><%
86 foreach e in vhosts do %>
87 <tr><td style="text-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 style="text-align: right"><% #size e %></td></tr>
88 <% end %>
89 </table>
90 <% end;
91
92 @footer [] %>