diff --git a/www/about/unclaimed.html b/www/about/unclaimed.html new file mode 100644 index 0000000000..b58958e75c --- /dev/null +++ b/www/about/unclaimed.html @@ -0,0 +1,73 @@ +from gittip import db +^L + +unclaimed = db.fetchall(""" + + SELECT tippee, claimed_time, sum(amount) AS amount + FROM ( SELECT DISTINCT ON (tipper, tippee) + amount + , tippee + FROM tips + JOIN participants p ON p.id = tipper + JOIN participants p2 ON p2.id = tippee + WHERE p.last_bill_result = '' + AND p2.claimed_time IS NULL + ORDER BY tipper, tippee, mtime DESC + ) AS foo + JOIN participants p ON p.id = tippee + WHERE amount >= 1 + GROUP BY tippee, claimed_time + ORDER BY amount DESC + LIMIT 10 + +""") + +^L +{% extends templates/base.html %} +{% block body %} + + + +

These people have unclaimed money.

+ +

These amounts represent pledges from people with a {% if user.ANON %}working +credit card{% else %}working credit card{%end%} +on file, to people who have not joined Gittip. Only accounts with at least +$1.00 in pledges are listed.

+ + + {% for i, unclaim in enumerate(unclaimed, start=1) %} + + + + + + + {% end %} +
{{ i }}.${{ unclaim['amount'] }}{{ unclaim['tippee'] }} + {% if unclaim['claimed_time'] is None %}unclaimed!{% end %} +
+ +

Gittip happens every Friday.

+ +

The amounts above are what the Gittip community is willing to give as +a weekly gift to each person, but only if the person accepts it. Gittip is +opt-in. We never collect money on a person’s behalf until that +person opts-in by claiming their account.

+ +{% end %}