Round dollar amount to nearest dollar [#30073593]
parent
5146e9616e
commit
d784715407
|
@ -22,13 +22,13 @@
|
|||
{% else %}{% if status == 'SUCCESSFUL' %}
|
||||
<b>UNGLUED!</b>
|
||||
<p><b>On:</b> {{ deadline|date:"M d, Y" }}</p>
|
||||
<p><b>Raised:</b> {{ work.last_campaign.current_total|intcomma }}</p>
|
||||
<p><b>Raised:</b> {{ work.last_campaign.current_total|floatformat:0|intcomma }}</p>
|
||||
</div>
|
||||
{% if first_ebook %}<a href="{{ work.ebooks.0.url }}"><div class="read_itbutton"><span>Read it Now</span></div></a>{% else %}<div class="read_itbutton"><span>Coming Soon</span></div>{% endif %}
|
||||
|
||||
{% else %}{% if status == 'ACTIVE' %}
|
||||
<b>UNGLUE IT!</b>
|
||||
<p><b>${{ work.last_campaign.current_total|intcomma }}</b> raised</p><p><b>${{ work.last_campaign.target|intcomma }}</b> needed</p>
|
||||
<p><b>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</b> raised</p><p><b>${{ work.last_campaign.target|floatformat:0|intcomma }}</b> needed</p>
|
||||
<p>by {{ deadline|date:"M d, Y" }}</p>
|
||||
</div>
|
||||
<a href="/pledge/{{work.id}}"><div class="read_itbutton pledge"><span>Support</span></div></a>
|
||||
|
@ -151,7 +151,7 @@
|
|||
<div class="listview panelfront side1 booklist-status">
|
||||
{% if not is_preview %}
|
||||
{% ifequal status "ACTIVE" %}
|
||||
<span class="booklist-status-text" style="width: 190px"><b>${{ work.last_campaign.current_total|intcomma }}</b>/<b>${{ work.last_campaign.target|intcomma }}</b></span>
|
||||
<span class="booklist-status-text" style="width: 190px"><b>${{ work.last_campaign.current_total|floatformat:0|intcomma }}</b>/<b>${{ work.last_campaign.target|floatformat:0|intcomma }}</b></span>
|
||||
{% else %}{% if status == "INITIALIZED" %}
|
||||
<span class="booklist-status-label">Status: </span><span class="booklist-status-text">Coming soon!</span>
|
||||
{% else %}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<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|intcomma}}</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>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<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|intcomma}}</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}}
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<div class="jsmodule rounded pledge">
|
||||
<div class="jsmod-content">
|
||||
${{ work.last_campaign.target|intcomma }} needed by<br />
|
||||
${{ work.last_campaign.target|floatformat:0|intcomma }} needed by<br />
|
||||
{{ work.last_campaign.deadline }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
will contain campaign info. maybe a cover image. (small.)
|
||||
{% comment %}
|
||||
<p class="pledge_complete">You just pledged ${{transaction.amount|intcomma}} to <a href="{% url work work.id %}">{{work.title}}</a>.</p>
|
||||
<p class="pledge_complete">If the campaign reaches its target of ${{campaign.target|intcomma}} by {{campaign.deadline|date:"F d, Y"}},
|
||||
<p class="pledge_complete">If the campaign reaches its target of ${{campaign.target|floatformat:0|intcomma}} by {{campaign.deadline|date:"F d, Y"}},
|
||||
your PayPal account will be charged ${{transaction.amount|intcomma}}.</p>
|
||||
|
||||
note: campaign (image, title, rights holder, deadline, maybe target)
|
||||
|
|
|
@ -64,11 +64,11 @@ $j(document).ready(function(){
|
|||
{% else %}{% if work.last_campaign and not is_preview %}
|
||||
{% if status == 'ACTIVE' %}
|
||||
Unglue it! <br />
|
||||
${{ work.last_campaign.current_total|intcomma }}/${{ work.last_campaign.target|intcomma }} <br />
|
||||
${{ work.last_campaign.current_total|floatformat:0|intcomma }}/${{ work.last_campaign.target|floatformat:0|intcomma }} <br />
|
||||
Ending {{ countdown }}
|
||||
{% else %}
|
||||
{% if status == 'SUCCESSFUL' %}
|
||||
Unglued on {{ work.last_campaign.deadline|date:"M j, Y"}}! <br />${{ work.last_campaign.current_total|intcomma }} raised of ${{ work.last_campaign.target|intcomma }} goal
|
||||
Unglued on {{ work.last_campaign.deadline|date:"M j, Y"}}! <br />${{ work.last_campaign.current_total|floatformat:0|intcomma }} raised of ${{ work.last_campaign.target|floatformat:0|intcomma }} goal
|
||||
{% else %}{% if status == 'INITIALIZED' %}
|
||||
Campaign starting soon
|
||||
{% else %}{% if status == 'SUSPENDED' %}
|
||||
|
@ -184,7 +184,7 @@ $j(document).ready(function(){
|
|||
{% else %}
|
||||
{{ work.last_campaign.supporters.count }} Ungluers have
|
||||
{% endif %}
|
||||
pledged ${{ work.last_campaign.current_total|intcomma }}<br />toward a ${{ work.last_campaign.target|intcomma }} goal
|
||||
pledged ${{ work.last_campaign.current_total|floatformat:0|intcomma }}<br />toward a ${{ work.last_campaign.target|floatformat:0|intcomma }} goal
|
||||
{% else %}
|
||||
{% if wishers == 1 %}
|
||||
1 Ungluer has
|
||||
|
@ -277,7 +277,7 @@ $j(document).ready(function(){
|
|||
{{ claim.rights_holder.rights_holder_name }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
, has agreed to release <i>{{work.title}}</i> to the world as a Creative Commons licensed ebook (<a href="{{ work.last_campaign.license_url }}">{{ work.last_campaign.license }}</a>) if ungluers can join together to raise ${{ work.last_campaign.target|intcomma }} by {{ work.last_campaign.deadline }}.
|
||||
, has agreed to release <i>{{work.title}}</i> to the world as a Creative Commons licensed ebook (<a href="{{ work.last_campaign.license_url }}">{{ work.last_campaign.license }}</a>) if ungluers can join together to raise ${{ work.last_campaign.target|floatformat:0|intcomma }} by {{ work.last_campaign.deadline }}.
|
||||
You can help!</p>
|
||||
|
||||
<h4>Campaign details: the fine print</h4>
|
||||
|
@ -397,7 +397,7 @@ $j(document).ready(function(){
|
|||
{% if premium.limit == 0 or premium.limit > premium.premium_count %}
|
||||
<li class="{% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %}">
|
||||
<a href="{% url pledge_modify work_id %}?premium_id={{premium.id}}">
|
||||
<span class="menu-item-price">${{ premium.amount|intcomma }}</span>{% if pledged.0.premium == premium %}<div class="you_pledged">Pledged!</div>{% endif %}
|
||||
<span class="menu-item-price">${{ premium.amount|floatformat:0|intcomma }}</span>{% if pledged.0.premium == premium %}<div class="you_pledged">Pledged!</div>{% endif %}
|
||||
<span class="menu-item-desc">{{ premium.description }}</span>
|
||||
{% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
||||
</a></li>
|
||||
|
@ -408,7 +408,7 @@ $j(document).ready(function(){
|
|||
{% if premium.limit == 0 or premium.limit > premium.premium_count %}
|
||||
<li class="{% if forloop.first %}first{% else %}{% if forloop.last %}last{% endif %}{% endif %}">
|
||||
<a href="{% url pledge work_id %}?premium_id={{premium.id}}">
|
||||
<span class="menu-item-price">${{ premium.amount|intcomma }}</span>
|
||||
<span class="menu-item-price">${{ premium.amount|floatformat:0|intcomma }}</span>
|
||||
<span class="menu-item-desc">{{ premium.description }}</span>
|
||||
{% ifnotequal premium.limit 0 %}<br /> Only {{ premium.premium_remaining }} remaining! {% endifnotequal %}
|
||||
</a></li>
|
||||
|
|
Loading…
Reference in New Issue