From 93c0dad4fdaf6e62e28c1dbb03e47e959998154f Mon Sep 17 00:00:00 2001 From: Chad Whitacre Date: Sun, 29 Jul 2012 00:46:18 -0400 Subject: [PATCH] Add buttons to org pages This was suggested in a comment on #27 as the lowest hanging fruit for supporting tips to organizations as the sum of tips to people within that organization. --- www/github/%login/index.html | 59 +++++++++++++++++++++++++++--------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/www/github/%login/index.html b/www/github/%login/index.html index 180b3d9dca..f62abb4d4c 100644 --- a/www/github/%login/index.html +++ b/www/github/%login/index.html @@ -45,12 +45,13 @@ resp = requests.get("https://api.github.com/orgs/%s/members" % username) if resp.status_code == 200: members = json.loads(resp.text) - can_tip = False + can_tip = user.ANON else: can_tip = False tip_or_pledge = "pledge" nbackers = get_number_of_backers(username) +members = [(member, get_tip(user.id, member['login'])) for member in members] # ========================================================================== ^L {% extends templates/participant.html %} @@ -73,13 +74,13 @@

{{ username }} has opted out of Gittip.

- +

{{ name }} has not joined Gittip.

{% if user.ANON %}