Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Use status_of_1_0_balance to modify page
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Sep 2, 2015
1 parent 9b7f317 commit 357af70
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions www/1.0-payout.spt
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,38 @@ if user.ANON:
raise Response(403)

suppress_sidebar = True
banner = _("Apply")
title = _("Apply for a 1.0 Payout")
banner = _("1.0")
title = _("Status of your 1.0 Payout")
receiving, ntips = user.participant.get_old_stats()
status = user.participant.status_of_1_0_balance
[---] text/html
{% extends "templates/base.html" %}
{% block content %}
<p>{{ _( "This page is part of our plan to {a}refund the money from Gratipay 1.0{_a}."
, a='<a href="https://medium.com/gratipay-blog/140-000-97d54e6d40ed">'|safe
, _a='</a>'|safe
) }}</p>

{% if user.participant.balance %}
<p>{{ _( "We are planning to {a}refund the money from Gratipay 1.0{_a}."
, a='<a href="https://medium.com/gratipay-blog/140-000-97d54e6d40ed">'|safe
, _a='</a>'|safe
) }}</p>
{% if status == 'resolved' %}
<p><b>{{ _("You do not have a Gratipay 1.0 balance.") }}</b></p>
<p><b>{{ _("You're all set! :)") }}</b></p>
{% else %}
<p><b>{{ _( "Your Gratipay 1.0 balance is {balance}."
, balance=format_currency(user.participant.balance, 'USD')
) }}</b></p>

<p><b>{{ _( 'To apply for a one-time payout, please {a}email us{_a}.'
, a='<a href="mailto:[email protected]">'|safe
, _a='</a>'|safe
) }}</b></p>

{% if ntips %}
{% if status == 'pending-payout' %}
<p>{{ _("Your Gratipay 1.0 balance is scheduled for payout during our next weekly cycle.") }}</p>
{% else %}
<p><button>{{ _("Apply for a payout") }}</button></p>
{% if ntips %}
<p>{{ _("P.S. You were receiving {receiving} per week from {ntips} people under Gratipay 1.0. Want to receive that money again under Gratipay 2.0? {a}Apply for a new Team{_a} instead of a one-time payout."
, ntips=ntips
, receiving=format_currency(receiving, 'USD')
, a='<a href="/new">'|safe
, _a='</a>'|safe
) }}</p>
{% endif %}
{% endif %}
{% endif %}
{% endblock %}

0 comments on commit 357af70

Please sign in to comment.