fixed pledge button showing for non-active campaigns
parent
3091651896
commit
1117ecd93a
|
@ -17,6 +17,7 @@ def bookpanel(context):
|
||||||
|
|
||||||
show_pledge = False
|
show_pledge = False
|
||||||
if campaign and campaign.type==REWARDS:
|
if campaign and campaign.type==REWARDS:
|
||||||
|
if campaign.status == 'ACTIVE':
|
||||||
if user.is_anonymous() or not user.id in context.get('supporters', []):
|
if user.is_anonymous() or not user.id in context.get('supporters', []):
|
||||||
show_pledge = True
|
show_pledge = True
|
||||||
context['show_pledge'] = show_pledge
|
context['show_pledge'] = show_pledge
|
||||||
|
@ -31,6 +32,7 @@ def bookpanel(context):
|
||||||
show_purchase = False
|
show_purchase = False
|
||||||
if campaign and campaign.type==BUY2UNGLUE:
|
if campaign and campaign.type==BUY2UNGLUE:
|
||||||
if user.is_anonymous() or not context.get('license_is_active', False):
|
if user.is_anonymous() or not context.get('license_is_active', False):
|
||||||
|
if campaign.status == 'ACTIVE':
|
||||||
if not context.get('borrowable', False):
|
if not context.get('borrowable', False):
|
||||||
if not library:
|
if not library:
|
||||||
show_purchase = True
|
show_purchase = True
|
||||||
|
|
Loading…
Reference in New Issue