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

Commit

Permalink
Add projects notice to participant close page
Browse files Browse the repository at this point in the history
  • Loading branch information
chadwhitacre committed Jan 11, 2017
1 parent de2aa54 commit 03b264f
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions www/~/%username/settings/close.spt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ if request.method == 'POST':
else:
participant.close()
website.redirect('/~%s/' % participant.username)
teams = participant.get_teams()
nteams = len(teams)
if nteams > 1:
teams = ', '.join([t.name for t in teams[:-1]]) + ' and ' + teams[-1].name + ' teams'
elif nteams == 1:
teams = teams[0].name + ' team'

teams = website.db.all( "SELECT teams.*::teams FROM teams WHERE owner=%s AND NOT is_closed"
, (participant.username,)
)
[---] text/html
{% extends "templates/base.html" %}

Expand All @@ -32,9 +28,12 @@ elif nteams == 1:

{% if teams %}

<p>You are the owner of the {{ teams }}. We don't yet <a
href="https://github.com/gratipay/gratipay.com/issues/3602">support
team owners closing their accounts</a>.</p>
<p>Please close the following projects first:</p>
<ul>
{% for team in teams %}
<li><a href="/{{ team.slug }}/edit/">{{ team.name }}</a></li>
{% endfor %}
</ul>

{% endif %}

Expand Down Expand Up @@ -80,7 +79,7 @@ elif nteams == 1:
retention policy</a>).</p>

<p>Things we clear immediately include your profile statement,
the payroll you're taking, and the payments you're giving.</p>
the payments you're taking, and the payments you're giving.</p>

<p>We specifically <i>don't</i> delete your past giving and
taking history on the site, because that information also belongs
Expand Down

0 comments on commit 03b264f

Please sign in to comment.