41 lines
1.5 KiB
HTML
41 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% load humanize %}
|
|
{% url privacy as privacyurl %}
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
<h2>Campaign: {{campaign.name}}</h2>
|
|
<!-- url for work: -->
|
|
<p>Work: <a href="{% url work work_id=campaign.work.id %}">{{campaign.work}}</a></p>
|
|
<p>Target: {{campaign.target|floatformat:0|intcomma}}</p>
|
|
<p>Deadline: {{campaign.deadline}}</p>
|
|
<p>Status: {{campaign.status}}</p>
|
|
<p>ISBN: {{campaign.work.first_isbn_13}} </p>
|
|
<p><a href="{% url widget isbn=campaign.work.first_isbn_13 %}">Widget Link</a></p>
|
|
<p>Embed a widget:</p>
|
|
<textarea rows="2" cols="80"><iframe src="{{base_url}}/api/widget/{{campaign.work.first_isbn_13}}/" width="152" height="325" frameborder="0"></iframe></textarea>
|
|
<p>PayPal receiver: {{campaign.paypal_receiver}}</p>
|
|
<p>Current total (pledged/authorized): {{campaign.current_total|floatformat:0|intcomma}}</p>
|
|
<form method="POST" action="{% url campaign_by_id pk=campaign.id %}" onsubmit="test()">
|
|
{% csrf_token %}
|
|
{{form.as_p}}
|
|
<input type="submit" value="Pledge" id="pledgeBtn" />
|
|
</form>
|
|
|
|
<!-- All associated transactions -->
|
|
{% if campaign.transactions %}
|
|
<p>Associated transactions:</p>
|
|
<ul>
|
|
{% for transaction in campaign.transactions %}
|
|
<li>id:{{transaction.id}} | type:{{transaction.type}} | {{transaction.status}} | {{transaction.user}} | amount:{{transaction.amount}}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<p>No associated transactions</p>
|
|
{% endif %}
|
|
|
|
|
|
{% endblock %}
|