display and notifications of acknowledgements

pull/1/head
eric 2012-10-12 23:45:09 -04:00
parent cc47a28687
commit 476ce46dab
5 changed files with 66 additions and 3 deletions

View File

@ -9,7 +9,15 @@ Your new pledge summary
Amount pledged: ${{ transaction.amount|intcomma }}
Premium: {% if transaction.premium %}{{ transaction.premium.description }}{% else %}None requested{% endif %}{% endif %}
If you'd like to visit the project page, click here:
Acknowledgements:
- The unglued ebook will be delivered to your inbox.</li>{% if not transaction.anonymous %}{% ifequal transaction.tier 1 %}
- You will be listed as a Supporter using the name "{{ transaction.ack_name }}".{% endifequal %}{% ifequal transaction.tier 2 %}
- You will be listed as a Benefactor using the name "{{ transaction.ack_name }}" with a link to your Unglue.it supporter page.{% endifequal %}{% ifequal transaction.tier 3 %}
- You will be listed as a Bibliophile using the name "{{ transaction.ack_name }}" with a link to your Unglue.it supporter page.{% endifequal %}{% endif %}{% if transaction.ack_dedication %}
- The following dedication will be included:
{{ transaction.ack_dedication }}{% endif %}
If you'd like to visit the campaign page or make changes, click here:
https://{{site.domain}}{% url work transaction.campaign.work.id %}
Thank you again for your support.

View File

@ -17,7 +17,25 @@
{% else %}
Your new pledge is as follows:<br />
Amount: ${{ transaction.amount|intcomma }}<br />
Premium: {% if transaction.premium %}{{ transaction.premium.description }}{% else %}None requested{% endif %}<br />
Premium: {% if transaction.premium %}{{ transaction.premium.description }}{% else %}None requested{% endif %}<br /><br />
Acknowledgements: <ul>
<li>The unglued ebook will be delivered to your inbox.</li>
{% if not transaction.anonymous %}
{% ifequal transaction.tier 1 %}
<li>You will be listed as a Supporter using the name "<i>{{ transaction.ack_name }}</i>".</li>
{% endifequal %}
{% ifequal transaction.tier 2 %}
<li>You will be listed as a Benefactor using the name "<i>{{ transaction.ack_name }}</i>" with a link to your Unglue.it supporter page.</li>
{% endifequal %}
{% ifequal transaction.tier 3 %}
<li>You will be listed as a Bibliophile using the name "<i>{{ transaction.ack_name }}</i>" with a link to your Unglue.it supporter page.</li>
{% endifequal %}
{% endif %}
{% if transaction.ack_dedication %}
<li>The following dedication will be included: <i>{{ transaction.ack_dedication }}</i>.</li>
{% endif %}</ul>
Thank you for your continued support of {{ transaction.campaign.work.title }}.
{% endif %}
{% endblock %}

View File

@ -5,6 +5,14 @@ Pledge summary
Amount pledged: ${{ transaction.amount|intcomma }}
Premium: {% if transaction.premium %}{{ transaction.premium.description }}{% else %}None requested{% endif %}
Acknowledgements:
- The unglued ebook will be delivered to your inbox.</li>{% if not transaction.anonymous %}{% ifequal transaction.tier 1 %}
- You will be listed as a Supporter using the name "{{ transaction.ack_name }}".{% endifequal %}{% ifequal transaction.tier 2 %}
- You will be listed as a Benefactor using the name "{{ transaction.ack_name }}" with a link to your Unglue.it supporter page.{% endifequal %}{% ifequal transaction.tier 3 %}
- You will be listed as a Bibliophile using the name "{{ transaction.ack_name }}" with a link to your Unglue.it supporter page.{% endifequal %}{% endif %}{% if transaction.ack_dedication %}
- The following dedication will be included:
{{ transaction.ack_dedication }}{% endif %}
You can help even more by sharing this campaign with your friends.
Facebook: https://www.facebook.com/sharer.php?u=https://{{ site.domain }}{% url work transaction.campaign.work.id %}

View File

@ -36,6 +36,24 @@
<div>
Your pledge: ${{transaction.amount|intcomma}}.<br />
Your premium: {% if transaction.premium %}{{ transaction.premium.description }}{% else %}You did not request a premium for this campaign.{% endif %}<br />
{% if transaction.anonymous %}You want your pledge to be anonymous.<br />{% endif %}<br />
Acknowledgements: <ul>
<li>The unglued ebook will be delivered to your inbox.</li>
{% if not transaction.anonymous %}
{% ifequal transaction.tier 1 %}
<li>You will be listed as a Supporter using the name "<i>{{ transaction.ack_name }}</i>".</li>
{% endifequal %}
{% ifequal transaction.tier 2 %}
<li>You will be listed as a Benefactor using the name "<i>{{ transaction.ack_name }}</i>" with a link to your Unglue.it supporter page.</li>
{% endifequal %}
{% ifequal transaction.tier 3 %}
<li>You will be listed as a Bibliophile using the name "<i>{{ transaction.ack_name }}</i>" with a link to your Unglue.it supporter page.</li>
{% endifequal %}
{% endif %}
{% if transaction.ack_dedication %}
<li>The following dedication will be included: <i>{{ transaction.ack_dedication }}</i>.</li>
{% endif %}
</ul>
</div>
</div>

View File

@ -88,6 +88,17 @@ class Transaction(models.Model):
# whether the user wants to be not listed publicly
anonymous = models.BooleanField(null=False)
@property
def tier(self):
if self.amount < 25:
return 0
if self.amount < 50:
return 1
if self.amount < 100:
return 2
else:
return 3
@property
def ack_link(self):
return 'https://unglue.it/supporter/%s'%urllib.urlencode(self.user.username) if not self.anonymous else ''