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 6463345 commit fa82490
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions www/1.0-payout.spt
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,39 @@ 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 %}

{% if user.participant.balance %}
<p>{{ _( "This page is part of our plan to {a}refund the money from Gratipay 1.0{_a}. Read that for context. Basically you're applying for a one-time payout of your Gratipay 1.0 balance."
, a='<a href="https://medium.com/gratipay-blog/140-000-97d54e6d40ed">'|safe
, _a='</a>'|safe
) }}</p>
<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>

<p><button>{{ _("Apply for a payout") }}</button></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>

{% 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 fa82490

Please sign in to comment.