Files
2013-04-10 16:58:51 -04:00

96 lines
2.9 KiB
HTML

from gittip import AMOUNTS
^L
title = "For Gittip"
^L
{% extends templates/base.html %}
{% block heading %}
<h2 class="top"><span>For</span></h2>
{% end %}
{% block box %}
<img src="/assets/{{ __version__ }}/logo.256.png" />
<p><a href="/">Gittip</a> is a weekly gift exchange. It is funded on
itself.</p>
<div class="nav level-1">
{% if user.ANON %}
<h2>Your Weekly Gift</h2>
{% for amount in AMOUNTS %}
<button class="tip-anon">${{ amount }}</button>
{% end %}
<div class="help with-padding">Sign in using
<a class="flash-me" href="{{ twitter.oauth_url(website, u'opt-in', path.decoded) }}">Twitter</a>,
<a href="{{ github.oauth_url(website, u'opt-in', path.decoded) }}">GitHub</a>, or
<a href="{{ bitbucket.oauth_url(website, u'opt-in', path.decoded) }}">Bitbucket</a>
to give to <b>Gittip</b>.</div>
{% else %}
{% set my_tip = user.get_tip_to("gittip") %}
<h2>Your Weekly Gift</h2>
{% for amount in AMOUNTS %}
<button amount="{{ amount }}" tippee="gittip"
class="tip{{ ' selected' if amount == my_tip else '' }}">${{ amount }}</button>
{% end %}
{% if my_tip not in AMOUNTS %}
<span class="old-amount">
<button class="tip disabled selected">{{ my_tip }}</button>
<span class="old-amount-link">&mdash;
<a href="http://blog.gittip.com/post/26505682007/is-personal-funding-viable" target="_blank">old amount</a>!</span>
</span>
{% end %}
{% if user.last_bill_result is None %}
<div id="payment-prompt" class="help{% if my_tip > 0 %} needed{% end %}">
Back your gift with a <a href="/credit-card.html"
class="highlight">credit card</a> to make sure it goes
through!</div>
{% elif user.last_bill_result %}
<div id="payment-prompt" class="help really-needed">Fix your <a
href="/credit-card.html" class="highlight">credit
card</a> to make sure your gifts go through!</div>
{% end %}
{% end %}
</div>
{% end %}
{% block page %}
<div id="for" class="col0">
<div id="weeks" class="group">
<div id="this-week">
<h2>This Week</h2>
<div class="fine">Gittip will receive about</div>
<div class="amount">$100.00</div>
<div class="fine">from about 20 patrons</div>
</div>
<div id="last-week">
<h2>Last Week</h2>
<div class="fine">Gittip received <b>$24</b> from</div>
<div class="account">bruceadams</div>
<div class="fine">See <a href="./patrons/">all patrons</a></div>
</div>
</div>
<div class="group">
<div id="mine">
<h2>Who deserves it?</h2>
</div>
<div id="split">
<h2>Current split</h2>
</div>
</div>
</div>
{% end %}