the request for money is only shown if the campaign is active, or in test mode

pull/1/head
eric 2014-03-04 15:49:59 -05:00
parent d200966a8d
commit 4d0d42f5ae
3 changed files with 5 additions and 2 deletions

View File

@ -254,7 +254,7 @@ Please fix the following before launching your campaign:
<h3>Make Your Pitch</h3>
{% ifequal campaign.type 3 %}
<p>This will be displayed to a user who has clicked a "download" button. It's your chance to ask for their support. The user can either accept the suggested contribution and go make a payment, or enter "0" and go straight to download. </p>
<p>This will be displayed to a user who has clicked a "download" button. It's your chance to ask for their support. The user can either accept the suggested contribution and go make a payment, or enter "0" and go straight to download. To see your request in test mode, <a href="{% url download campaign.work.id %}?testmode=1">click here</a>. </p>
{% else %}
<p>This will be displayed in the Campaign tab for your work. It's your main pitch to supporters/purchasers.</p>
{% endifequal %}

View File

@ -510,7 +510,7 @@
{% endif %}
{% else %}{% if work.last_campaign.type == 3 %}
<div class="btn_support">
<a href="{% url download work_id %}" class="hijax"><span>Download</span></a>
<a href="{% url download work_id %}{% if action == 'preview' %}?testmode=1{% endif %}" class="hijax"><span>Download</span></a>
</div>
<div style="text-align: center;">... and thank the creators!</div>
{% else %}

View File

@ -411,6 +411,7 @@ def work(request, work_id, action='display'):
'claimstatus': claimstatus,
'rights_holder_name': rights_holder_name,
'cover_width': cover_width_number,
'action': action,
})
def edition_uploads(request, edition_id):
@ -2604,6 +2605,8 @@ class DownloadView(PurchaseView):
return False
elif self.user_license and self.user_license.thanked:
return self.request.REQUEST.has_key('offer_id')
elif self.campaign.status != 'ACTIVE':
return self.request.REQUEST.has_key('testmode')
else:
return True