-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfundlog.html
37 lines (36 loc) · 1.36 KB
/
fundlog.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{{$backlog := DB_TransactionBacklog -}}
<h2>Backlog</h2>
{{if $backlog -}}
<dl>
{{range $goal := $backlog -}}<dt>
<span class="emoji">🥅</span> Goal:
</dt><dd {{if $goal.DelayReason}}class="delayed"{{end}}>
<strong>{{$goal.Goal}}</strong>
{{- if $goal.DelayReason}}<small> (delayed: {{$goal.DelayReason}})</small>{{end -}}
<ul>
{{range $perCustomer := $goal.PerCustomer}}<li>
{{$frac := $perCustomer.PushFraction -}}
<b>{{HTML_FloatMaxPrec $frac 3}}</b>
{{if eq $frac 1.0 -}} push {{- else -}} pushes {{- end}}
from {{DB_CustomerByID $perCustomer.Customer}}
<small class="breakdown">(
{{- range $i, $tx := $perCustomer.Breakdown -}}
{{- if $i}}, {{end -}}
{{HTML_FloatMaxPrec $tx.Fraction 3}} from {{$tx.ID}}
{{- end -}}
)</small>
</li>{{end}}
{{- if and (not $goal.DelayReason) (gt $goal.MissingForFullPush 0.0)}}
<li class="delayed"><small>
(<strong>{{HTML_Currency $goal.MissingForFullPush}}</strong> needed to <span class="hovertext" title="Until then, this goal will get combined with the partially funded pushes of other goals to form the remaining full push.">secure</span>
{{if gt $goal.TotalPushFraction 1.0}}another{{else}}a full{{end}} push)
</small></li>
{{- end -}}
</ul>
</dd>{{end}}
</dl>
{{else}}
<p>Currently empty!</p>
{{end}}
<h2>Delivered</h2>
{{template "push_table.html" DB_Pushes}}