diff --git a/bin/masspay.py b/bin/masspay.py index 9f6ee6d41e..ea85d1ffff 100755 --- a/bin/masspay.py +++ b/bin/masspay.py @@ -138,7 +138,7 @@ def compute_input_csv(): print_rule(88) total_gross = 0 for participant in participants: - total = participant.giving + participant.pledging + total = participant.giving amount = participant.balance - total if amount < 0.50: # Minimum payout of 50 cents. I think that otherwise PayPal upcharges to a penny. diff --git a/emails/notify_patron.spt b/emails/notify_patron.spt deleted file mode 100644 index a6e3a1df26..0000000000 --- a/emails/notify_patron.spt +++ /dev/null @@ -1,14 +0,0 @@ -{{ _("{0} from {1} has joined Gratipay!", user_name, platform) }} - -[---] text/html -{{ _("Your pledge to give {0} every week to {1} will be turned into action now that they have joined Gratipay. Huzzah!", - format_currency(amount, 'USD'), - ('{1}'|safe).format(profile_url, user_name)) }} -[---] text/plain -{{ _("Your pledge to give {0} every week to {1} will be turned into action now that they have joined Gratipay. Huzzah!", - format_currency(amount, 'USD'), - user_name) }} - -{{ _("Follow this link to view {0}'s profile:", user_name) }} - -{{ profile_url }} diff --git a/gratipay/billing/payday.py b/gratipay/billing/payday.py index 07c8babe55..d6050f9dc8 100644 --- a/gratipay/billing/payday.py +++ b/gratipay/billing/payday.py @@ -617,7 +617,7 @@ def credit(participant): if participant.is_suspicious is None: log("UNREVIEWED: %s" % participant.username) return - withhold = participant.giving + participant.pledging + withhold = participant.giving error = ach_credit(self.db, participant, withhold) if error: self.mark_ach_failed() diff --git a/gratipay/elsewhere/__init__.py b/gratipay/elsewhere/__init__.py index b72ca7763e..b510e1c66b 100644 --- a/gratipay/elsewhere/__init__.py +++ b/gratipay/elsewhere/__init__.py @@ -19,7 +19,7 @@ from gratipay.utils import LazyResponse -ACTIONS = {'opt-in', 'connect', 'lock', 'unlock'} +ACTIONS = {'opt-in', 'connect'} PLATFORMS = 'facebook google bitbucket bountysource github openstreetmap twitter venmo'.split() diff --git a/gratipay/models/account_elsewhere.py b/gratipay/models/account_elsewhere.py index 2353b37c51..b33f540c83 100644 --- a/gratipay/models/account_elsewhere.py +++ b/gratipay/models/account_elsewhere.py @@ -233,7 +233,6 @@ def opt_in(self, desired_username): else: newly_claimed = True user.participant.set_as_claimed() - user.participant.notify_patrons(self) try: user.participant.change_username(desired_username) except ProblemChangingUsername: diff --git a/gratipay/models/participant.py b/gratipay/models/participant.py index f8f8b5e627..0866dd2c9f 100644 --- a/gratipay/models/participant.py +++ b/gratipay/models/participant.py @@ -267,7 +267,7 @@ def upsert_statement(self, lang, statement): @property def usage(self): - return max(self.giving + self.pledging, self.receiving) + return max(self.giving, self.receiving) @property def suggested_payment(self): @@ -296,8 +296,8 @@ def _generate_api_key(self): # Claiming # ======== - # An unclaimed Participant is a stub that's created when someone pledges to - # give to an AccountElsewhere that's not been connected on Gratipay yet. + # An unclaimed Participant is a stub that's created when someone visits our + # page for an AccountElsewhere that's not been connected on Gratipay yet. def resolve_unclaimed(self): """Given a username, return an URL path. @@ -372,7 +372,7 @@ def distribute_balance_as_final_gift(self, cursor): if self.balance == 0: return - claimed_tips, claimed_total, _, _= self.get_giving_for_profile() + claimed_tips, claimed_total = self.get_giving_for_profile() transfers = [] distributed = Decimal('0.00') @@ -482,7 +482,6 @@ def clear_personal_information(self, cursor): , session_token=NULL , session_expires=now() , giving=0 - , pledging=0 , receiving=0 , npatrons=0 WHERE username=%(username)s @@ -659,19 +658,6 @@ def render(t, context): self._mailer.messages.send(message=message) return 1 # Sent - def notify_patrons(self, elsewhere, tips=None): - tips = self.get_tips_receiving() if tips is None else tips - for t in tips: - p = Participant.from_username(t.tipper) - if p.email_address and p.notify_on_opt_in: - p.queue_email( - 'notify_patron', - user_name=elsewhere.user_name, - platform=elsewhere.platform_data.display_name, - amount=t.amount, - profile_url=elsewhere.gratipay_url, - ) - def queue_email(self, spt_name, **context): self.db.run(""" INSERT INTO email_queue @@ -966,8 +952,8 @@ def update_giving(self, cursor=None): RETURNING * """, (is_funded, tip.id))) - # Update giving and pledging on participant - giving, pledging = (cursor or self.db).one(""" + # Update giving on participant + giving = (cursor or self.db).one(""" WITH our_tips AS ( SELECT amount, p2.claimed_time FROM current_tips @@ -983,15 +969,10 @@ def update_giving(self, cursor=None): FROM our_tips WHERE claimed_time IS NOT NULL ), 0) - , pledging = COALESCE(( - SELECT sum(amount) - FROM our_tips - WHERE claimed_time IS NULL - ), 0) WHERE p.username = %(username)s - RETURNING giving, pledging + RETURNING giving """, dict(username=self.username)) - self.set_attributes(giving=giving, pledging=pledging) + self.set_attributes(giving=giving) return updated @@ -1088,7 +1069,7 @@ def set_tip_to(self, tippee, amount, update_self=True, update_tippee=True, curso t = (cursor or self.db).one(NEW_TIP, args) if update_self: - # Update giving/pledging amount of tipper + # Update giving amount of tipper self.update_giving(cursor) if update_tippee: # Update receiving amount of tippee @@ -1210,51 +1191,16 @@ def get_giving_for_profile(self): """ tips = self.db.all(TIPS, (self.username,)) - UNCLAIMED_TIPS = """\ - - SELECT * FROM ( - SELECT DISTINCT ON (tippee) - amount - , tippee - , t.ctime - , t.mtime - , p.claimed_time - , e.platform - , e.user_name - FROM tips t - JOIN participants p ON p.username = t.tippee - JOIN elsewhere e ON e.participant = t.tippee - WHERE tipper = %s - AND p.is_suspicious IS NOT true - AND p.claimed_time IS NULL - ORDER BY tippee - , t.mtime DESC - ) AS foo - ORDER BY amount DESC - , lower(user_name) - - """ - unclaimed_tips = self.db.all(UNCLAIMED_TIPS, (self.username,)) - # Compute the total. # ================== - # For payday we only want to process payments to tippees who have - # themselves opted into Gratipay. For the tipper's profile page we want - # to show the total amount they've pledged (so they're not surprised - # when someone *does* start accepting tips and all of a sudden they're - # hit with bigger charges. total = sum([t.amount for t in tips]) if not total: # If tips is an empty list, total is int 0. We want a Decimal. total = Decimal('0.00') - unclaimed_total = sum([t.amount for t in unclaimed_tips]) - if not unclaimed_total: - unclaimed_total = Decimal('0.00') - - return tips, total, unclaimed_tips, unclaimed_total + return tips, total def get_tips_receiving(self): return self.db.all(""" @@ -1429,7 +1375,6 @@ def reserve(cursor, username): , session_token=NULL , session_expires=now() , giving = 0 - , pledging = 0 , receiving = 0 , taking = 0 WHERE username=%s @@ -1460,8 +1405,7 @@ def take_over(self, account, have_confirmation=False): This method associates an account on another platform (GitHub, Twitter, etc.) with the given Gratipay participant. Every account elsewhere has an associated Gratipay participant account, even if its only a stub - participant (it allows us to track pledges to that account should they - ever decide to join Gratipay). + participant. In certain circumstances, we want to present the user with a confirmation before proceeding to transfer the account elsewhere to @@ -1645,8 +1589,6 @@ def take_over(self, account, have_confirmation=False): # this is a no op - trying to take over itself return - # Save old tips so we can notify patrons that they've been claimed - old_tips = None if other.is_claimed else other.get_tips_receiving() # Make sure we have user confirmation if needed. # ============================================== @@ -1783,9 +1725,6 @@ def take_over(self, account, have_confirmation=False): if new_balance is not None: self.set_attributes(balance=new_balance) - if old_tips: - self.notify_patrons(elsewhere, tips=old_tips) - self.update_avatar() # Note: the order matters here, receiving needs to be updated before giving diff --git a/sql/branch.sql b/sql/branch.sql new file mode 100644 index 0000000000..c21a8e8522 --- /dev/null +++ b/sql/branch.sql @@ -0,0 +1,6 @@ +BEGIN; + + ALTER TABLE participants DROP COLUMN pledging; + ALTER TABLE participants DROP COLUMN notify_on_opt_in; + +END; diff --git a/sql/fake_payday.sql b/sql/fake_payday.sql index bee602e98b..6140a04841 100644 --- a/sql/fake_payday.sql +++ b/sql/fake_payday.sql @@ -5,7 +5,6 @@ CREATE TEMPORARY TABLE temp_participants ON COMMIT DROP AS , claimed_time , balance AS fake_balance , 0::numeric(35,2) AS giving - , 0::numeric(35,2) AS pledging , 0::numeric(35,2) AS taking , 0::numeric(35,2) AS receiving , 0 as npatrons @@ -63,7 +62,6 @@ CREATE OR REPLACE FUNCTION fake_tip() RETURNS trigger AS $$ ELSE UPDATE temp_participants SET fake_balance = (fake_balance - NEW.amount) - , pledging = (pledging + NEW.amount) WHERE username = NEW.tipper; END IF; UPDATE temp_participants @@ -173,14 +171,12 @@ UPDATE tips t UPDATE participants p SET giving = p2.giving - , pledging = p2.pledging , taking = p2.taking , receiving = p2.receiving , npatrons = p2.npatrons FROM temp_participants p2 WHERE p.username = p2.username AND ( p.giving <> p2.giving OR - p.pledging <> p2.pledging OR p.taking <> p2.taking OR p.receiving <> p2.receiving OR p.npatrons <> p2.npatrons diff --git a/templates/sign-in-using-to-give.html b/templates/sign-in-using-to-give.html index 6547cfa6eb..d06363af1d 100644 --- a/templates/sign-in-using-to-give.html +++ b/templates/sign-in-using-to-give.html @@ -1,6 +1,4 @@
{% include "templates/sign-in-using.html" %} - {% set message = _("{0} to pledge to {1}") if request.path.decoded.startswith('/on/') else _("{0} to give to {1}") %} - {% set formatted_message = message.format("", account.user_name if account else participant.username) %} - {{ formatted_message }} + {{ _("{0} to give to {1}").format("", participant.username) }}
diff --git a/templates/your-tip.html b/templates/your-tip.html index d75d9f8d0c..df29622b00 100644 --- a/templates/your-tip.html +++ b/templates/your-tip.html @@ -13,10 +13,7 @@

{{ _('Your Tip') }}

{{ format_currency(tip.amount, 'USD') }}
{{ _("per week") }}
diff --git a/tests/py/test_billing_payday.py b/tests/py/test_billing_payday.py index 049947b54e..6c4c65a978 100644 --- a/tests/py/test_billing_payday.py +++ b/tests/py/test_billing_payday.py @@ -126,7 +126,6 @@ def check(): dana = Participant.from_username('dana') emma = Participant.from_username('emma') assert alice.giving == D('13.00') - assert alice.pledging == D('1.00') assert alice.receiving == D('5.00') assert bob.giving == D('7.00') assert bob.receiving == D('7.00') @@ -153,7 +152,6 @@ def check(): UPDATE participants SET giving = 0 , npatrons = 0 - , pledging = 0 , receiving = 0 , taking = 0; """) @@ -174,7 +172,6 @@ def check(): for username in reversed(usernames[1:]): user = Participant.from_username(username) assert user.giving == D('1.00') - assert user.pledging == D('0.00') assert user.receiving == D('1.00') assert user.npatrons == 1 funded_tips = self.db.all("SELECT id FROM tips WHERE is_funded ORDER BY id") diff --git a/tests/py/test_close.py b/tests/py/test_close.py index 5198131c62..5fbc6a108d 100644 --- a/tests/py/test_close.py +++ b/tests/py/test_close.py @@ -286,7 +286,6 @@ def test_cpi_clears_personal_information(self, mailer): , session_token='deadbeef' , session_expires='2000-01-01' , giving=20 - , pledging=30 , receiving=40 , npatrons=21 ) @@ -306,7 +305,6 @@ def test_cpi_clears_personal_information(self, mailer): assert alice.email_address == new_alice.email_address == None assert alice.claimed_time == new_alice.claimed_time == None assert alice.giving == new_alice.giving == 0 - assert alice.pledging == new_alice.pledging == 0 assert alice.receiving == new_alice.receiving == 0 assert alice.npatrons == new_alice.npatrons == 0 assert alice.session_token == new_alice.session_token == None diff --git a/tests/py/test_elsewhere.py b/tests/py/test_elsewhere.py index 6015b3142e..fdb28d04c5 100644 --- a/tests/py/test_elsewhere.py +++ b/tests/py/test_elsewhere.py @@ -116,17 +116,6 @@ def test_user_pages_not_found(self): expected = error % (user_name, platform.display_name) assert expected in r.body - def test_user_name_is_in_button(self): - self.make_participant('bob', claimed_time='now') - self.make_participant('alice', elsewhere='twitter') - body = self.client.GET('/on/twitter/alice/', auth_as='bob').body - assert 'Pledge to alice' in body - - def test_user_name_is_in_pledge_cta(self): - self.make_participant('alice', elsewhere='twitter') - body = self.client.GET('/on/twitter/alice/').body - assert 'pledge to alice' in body - def test_failure_page_accepts_valid_username(self): self.client.GET('/on/twitter/Gratipay/') # normal case will have the db primed response = self.client.GET('/on/twitter/Gratipay/failure.html') diff --git a/tests/py/test_email_notifs.py b/tests/py/test_email_notifs.py deleted file mode 100644 index b1cb8d8cbf..0000000000 --- a/tests/py/test_email_notifs.py +++ /dev/null @@ -1,58 +0,0 @@ -from gratipay.models.account_elsewhere import AccountElsewhere -from gratipay.models.participant import Participant -from gratipay.testing.emails import EmailHarness - - -class TestTransactionalEmails(EmailHarness): - - def setUp(self): - EmailHarness.setUp(self) - self.bob = self.make_participant('bob', claimed_time='now', email_address='bob@example.com') - self.dan = self.make_participant('dan', claimed_time='now', email_address='dan@example.com') - self.alice = self.make_participant('alice', claimed_time='now', email_address='alice@example.com') - - def test_opt_in_sends_notifications_to_patrons(self): - carl_twitter = self.make_elsewhere('twitter', 1, 'carl') - roy = self.make_participant('roy', claimed_time='now', email_address='roy@example.com') - self.client.POST( '/~roy/emails/notifications.json' - , data={'toggle': 'notify_on_opt_in'} - , auth_as='roy' - ) - - self.bob.set_tip_to(carl_twitter.participant.username, '100') - self.dan.set_tip_to(carl_twitter.participant.username, '100') - roy.set_tip_to(carl_twitter.participant.username, '100') # Roy will NOT receive an email. - - AccountElsewhere.from_user_name('twitter', 'carl').opt_in('carl') - - Participant.dequeue_emails() - assert self.mailer.call_count == 2 # Emails should only be sent to bob and dan - last_email = self.get_last_email() - assert last_email['to'][0]['email'] == 'dan@example.com' - expected = "to carl" - assert expected in last_email['text'] - - def test_take_over_sends_notifications_to_patrons(self): - dan_twitter = self.make_elsewhere('twitter', 1, 'dan') - - self.alice.set_tip_to(self.dan, '100') # Alice shouldn't receive an email. - self.bob.set_tip_to(dan_twitter.participant.username, '100') # Bob should receive an email. - - self.dan.take_over(dan_twitter, have_confirmation=True) - - Participant.dequeue_emails() - assert self.mailer.call_count == 1 - last_email = self.get_last_email() - assert last_email['to'][0]['email'] == 'bob@example.com' - expected = "to dan" - assert expected in last_email['text'] - - def test_opt_in_notification_includes_unsubscribe(self): - carl_twitter = self.make_elsewhere('twitter', 1, 'carl') - roy = self.make_participant('roy', claimed_time='now', email_address='roy@example.com', notify_on_opt_in=1) - roy.set_tip_to(carl_twitter.participant.username, '100') - - AccountElsewhere.from_user_name('twitter', 'carl').opt_in('carl') - - Participant.dequeue_emails() - assert "To stop receiving" in self.get_last_email()['text'] diff --git a/tests/py/test_pages.py b/tests/py/test_pages.py index 245f080816..058c342288 100644 --- a/tests/py/test_pages.py +++ b/tests/py/test_pages.py @@ -172,16 +172,6 @@ def test_giving_page(self): expected = "bob" assert expected in actual - def test_giving_page_shows_unclaimed(self): - alice = self.make_participant('alice', claimed_time='now') - emma = self.make_elsewhere('github', 58946, 'emma').participant - alice.set_tip_to(emma, "1.00") - actual = self.client.GET("/~alice/giving/", auth_as="alice").body - expected1 = "emma" - expected2 = "Unclaimed" - assert expected1 in actual - assert expected2 in actual - def test_giving_page_shows_cancelled(self): alice = self.make_participant('alice', claimed_time='now') bob = self.make_participant('bob', claimed_time='now') diff --git a/tests/py/test_participant.py b/tests/py/test_participant.py index 7819beb8c6..9a46393f24 100644 --- a/tests/py/test_participant.py +++ b/tests/py/test_participant.py @@ -11,7 +11,6 @@ from gratipay import NotSane from gratipay.exceptions import ( HasBigTips, - UserDoesntAcceptTips, UsernameIsEmpty, UsernameTooLong, UsernameAlreadyTaken, @@ -626,28 +625,6 @@ def test_receiving_is_zero_for_patrons(self): assert alice.giving == 0 - # pledging - - def test_pledging_only_counts_latest_tip(self): - alice = self.make_participant('alice', claimed_time='now', last_bill_result='') - bob = self.make_elsewhere('github', 58946, 'bob').participant - alice.set_tip_to(bob, '12.00') - alice.set_tip_to(bob, '3.00') - assert alice.pledging == Decimal('3.00') - - def test_cant_pledge_to_locked_accounts(self): - alice = self.make_participant('alice', claimed_time='now', last_bill_result='') - bob = self.make_participant('bob', goal=-1) - with self.assertRaises(UserDoesntAcceptTips): - alice.set_tip_to(bob, '3.00') - - def test_pledging_isnt_giving(self): - alice = self.make_participant('alice', claimed_time='now', last_bill_result='') - bob = self.make_elsewhere('github', 58946, 'bob').participant - alice.set_tip_to(bob, '3.00') - assert alice.giving == Decimal('0.00') - - # get_age_in_seconds - gais def test_gais_gets_age_in_seconds(self): diff --git a/www/on/%platform/%user_name/%endpoint.json.spt b/www/on/%platform/%user_name/%endpoint.json.spt index 2eda08ac86..285f1158d1 100644 --- a/www/on/%platform/%user_name/%endpoint.json.spt +++ b/www/on/%platform/%user_name/%endpoint.json.spt @@ -44,29 +44,8 @@ participant = account.participant out = { "on": request.path['platform'] , "avatar": participant.avatar_url - , "npatrons": participant.npatrons } - - -# Generate my_tip key -# =================== -# Display values: -# -# undefined - user is not authenticated -# "self" - user == participant -# null - user has never tipped this person -# 0.00 - user used to tip this person but now doesn't -# 3.00 - user tips this person this amount - -if not user.ANON: - if user.participant.username == participant.username: - my_tip = "self" - else: - my_tip = user.participant.get_tip_to(participant.username)['amount'] - out["my_tip"] = str(my_tip) - - # CORS - see https://github.com/gratipay/aspen-python/issues/138 response.headers["Access-Control-Allow-Origin"] = "*" diff --git a/www/on/%platform/%user_name/index.html.spt b/www/on/%platform/%user_name/index.html.spt index b26f068c4d..61e586f513 100644 --- a/www/on/%platform/%user_name/index.html.spt +++ b/www/on/%platform/%user_name/index.html.spt @@ -18,9 +18,7 @@ if participant.is_claimed or participant.is_closed: title = friendly_name = account.friendly_name user_id = account.user_id -locked = participant.goal == -1 is_team = account.is_team -allow_pledges = not locked and (not is_team or platform.allows_team_connect) if is_team: page_url = b64decode(request.qs.get('page', '')) @@ -54,14 +52,6 @@ if is_team: {% endblock %} -{% block scripts %} - {% if allow_pledges %} - - {% endif %} - - {{ super() }} -{% endblock %} - {% block sidebar %}
@@ -76,21 +66,9 @@ if is_team: {{ nmembers if nmembers > 0 else _('A Lot') }} {% endif %} - {% if not locked %} - - {{ _("Gifts Waiting") }} - {{ - participant.npatrons - }} - - {% endif %}
-{% if allow_pledges %} - {% include "templates/your-tip.html" %} -{% endif %} - {% endblock %} {% block content %} @@ -98,25 +76,7 @@ if is_team: {% from 'templates/auth.html' import auth_button with context %}
- {% if locked %} - - {% if is_team %} -

{{ _("If you are an administrator of this {0} team account, you can " - "unlock it to allow people to pledge tips to your team on " - "Gratipay.", - platform.display_name) }}

- {% else %} -

{{ _("If you are {0} on {1}, you can unlock your account to allow " - "people to pledge tips to you on Gratipay.", - '%s'|safe % (account.html_url, friendly_name), - platform.display_name) }}

- {% endif %} - - {% call auth_button(platform.name, 'unlock', user_id) %} - {{ _("Unlock") }} - {% endcall %} - - {% elif is_team %} + {% if is_team %} {% if allow_team_connect %}

{{ _("{0} has not joined Gratipay.", user_id) }}

@@ -134,7 +94,7 @@ if is_team: {% if platform in website.signin_platforms or not user.ANON %} {% if user.ANON %} -

{{ _("Is this you? We never collect money for you unless you join.") }}

+

{{ _("Is this you? You can join Gratipay with a couple clicks:") }}

{% call auth_button(platform.name, 'opt-in', user_id) %} {{ _("Join Gratipay") }} {% endcall %} @@ -152,33 +112,12 @@ if is_team:

{{ _("What is Gratipay?") }}

-

{{ _("Gratipay is a way to thank and support your favorite artists, " - "musicians, writers, programmers, etc. by setting up a small weekly " - "cash gift to them.") }} +

{{ _("Gratipay provides payments and payroll for open work.") }} {{ _("Learn more") }}

{% endif %} - {% if user.ANON and allow_pledges %} - -

{{ _("Don't like what you see?") }}

- -

{{ _("If you are an owner of this {0} account, you can explicitly opt " - "out of Gratipay by locking it. We don't allow new pledges to " - "locked accounts.", - platform.display_name) }}

- - {% call auth_button(platform.name, 'lock', user_id) %} - {{ _("Lock") }} - {% endcall %} - - {% endif %} - - {% if is_team and not locked %} - - {% if allow_pledges and members %} -

{{ team_description }}

- {% endif %} + {% if is_team %} {% if members %} diff --git a/www/on/%platform/associate.spt b/www/on/%platform/associate.spt index 7df9f48091..d4c6d53550 100644 --- a/www/on/%platform/associate.spt +++ b/www/on/%platform/associate.spt @@ -74,9 +74,6 @@ elif action == 'connect': response.set_cookie(b'connect_%s' % account.id, token, expires) response.redirect('/on/confirm.html?id=%s' % account.id) -elif action in {'lock', 'unlock'}: - account.participant.update_goal(-1 if action == 'lock' else None) - else: raise Response(400) diff --git a/www/~/%username/giving/index.html.spt b/www/~/%username/giving/index.html.spt index 3dc4183bb8..8da63e02a2 100644 --- a/www/~/%username/giving/index.html.spt +++ b/www/~/%username/giving/index.html.spt @@ -5,7 +5,7 @@ from datetime import timedelta [-----------------------------------------------------------------------------] participant = get_participant(state, restrict=True) -tips, total, unclaimed_tips, unclaimed_total = participant.get_giving_for_profile() +tips, total = participant.get_giving_for_profile() title = participant.username subhead = _("Giving") recently = utcnow() - timedelta(days=30) @@ -13,7 +13,6 @@ cancelled_tips = [x for x in tips if x.amount == 0 and x.mtime >= recently] # don't filter until after cancelled are looked at tips = [t for t in tips if t.amount > 0] -unclaimed_tips = [t for t in unclaimed_tips if t.amount > 0] tabs = { @@ -24,13 +23,6 @@ tabs = { 'note': None, 'total': total }, - 'unclaimed': { - 'tips': unclaimed_tips, - 'ntips': len(unclaimed_tips), - 'name': _("Unclaimed"), - 'note': _("These are tips you've set to people who haven't joined Gratipay yet."), - 'total': unclaimed_total - }, 'cancelled': { 'tips': cancelled_tips, 'ntips': len(cancelled_tips), @@ -59,7 +51,7 @@ tabs = {

{{ _("Tips") }}

diff --git a/www/~/%username/index.html.spt b/www/~/%username/index.html.spt index 4dee36a881..fa10bb4ba3 100644 --- a/www/~/%username/index.html.spt +++ b/www/~/%username/index.html.spt @@ -10,7 +10,6 @@ LONG_STATEMENT = 256 [-----------------------------------------------------------------------------] participant = get_participant(state, restrict=False) -tip_or_pledge = "tip" title = username = participant.username accounts = participant.get_accounts_elsewhere() diff --git a/www/~/%username/members/index.html.spt b/www/~/%username/members/index.html.spt index 2bc2f6dc0b..c31da6903e 100644 --- a/www/~/%username/members/index.html.spt +++ b/www/~/%username/members/index.html.spt @@ -8,7 +8,6 @@ from gratipay.utils import get_participant participant = team = get_participant(state, restrict=False) if not team.show_as_team(user): request.redirect('../') -tip_or_pledge = "tip" title = team.username subhead = _("Team Members") diff --git a/www/~/%username/settings/index.html.spt b/www/~/%username/settings/index.html.spt index 9b13f5ba43..89bb0a5370 100644 --- a/www/~/%username/settings/index.html.spt +++ b/www/~/%username/settings/index.html.spt @@ -205,11 +205,6 @@ emails = participant.get_emails()
{{ _("Send me notifications via email:") }}
-
{{ _("When my credit card is charged:") }}
diff --git a/www/~/%username/tips.json.spt b/www/~/%username/tips.json.spt index ed9c026c9c..880a255236 100644 --- a/www/~/%username/tips.json.spt +++ b/www/~/%username/tips.json.spt @@ -37,7 +37,7 @@ if request.method == 'POST': participant.set_tip_to(tip['tippee'], '0.00') else: - tips, total, unclaimed_tips, unclaimed_total = participant.get_giving_for_profile() + tips, total = participant.get_giving_for_profile() out = [] for tip in tips: