add fundraiser progress bar for 2022

This commit is contained in:
Daniel Pono Takamori 2022-11-22 14:18:25 -08:00
parent c27c3d8d55
commit 2ba4db683d
Signed by: pono
GPG key ID: 17BB4167325DAA02
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ from datetime import datetime as DateTime
import conservancy.settings import conservancy.settings
from conservancy.apps.fundgoal.models import FundraisingGoal as FundraisingGoal from conservancy.apps.fundgoal.models import FundraisingGoal as FundraisingGoal
SITE_FUNDGOAL = 'cy2021-end-year-match' SITE_FUNDGOAL = 'cy2022-end-year-match'
def fundgoal_lookup(fundraiser_sought): def fundgoal_lookup(fundraiser_sought):
try: try:

View file

@ -106,7 +106,7 @@
* this_match_exceeded: this_match_so_far - this_match_goal * this_match_exceeded: this_match_so_far - this_match_goal
{% endcomment %} {% endcomment %}
{% if sitefundgoal and sitefundgoal.fundraiser_so_far_amount and datetime_now < sitefundgoal.fundraiser_endtime %} {% if datetime_now < sitefundgoal.fundraiser_endtime %}
{% with this_match_goal=sitefundgoal.fundraiser_goal_amount this_match_so_far=sitefundgoal.fundraiser_so_far_amount %} {% with this_match_goal=sitefundgoal.fundraiser_goal_amount this_match_so_far=sitefundgoal.fundraiser_so_far_amount %}
{% with this_match_remaining=this_match_goal|subtract:this_match_so_far sitefundgoal_timeleft=sitefundgoal.fundraiser_endtime|subtract:datetime_now this_match_exceeded=this_match_so_far|subtract:this_match_goal %} {% with this_match_remaining=this_match_goal|subtract:this_match_so_far sitefundgoal_timeleft=sitefundgoal.fundraiser_endtime|subtract:datetime_now this_match_exceeded=this_match_so_far|subtract:this_match_goal %}
<div class="fundraiser-top-text ph3 pt2 pb3"> <div class="fundraiser-top-text ph3 pt2 pb3">
@ -132,7 +132,7 @@
{% endif %} {% endif %}
</div> </div>
{% if sitefundgoal.fundraiser_so_far_amount %} {% if 1 %}
<a href="/sustainer/" style="text-decoration: none !important"> <a href="/sustainer/" style="text-decoration: none !important">
<div id="siteprogressbar" class="flex items-stretch w-100"> <div id="siteprogressbar" class="flex items-stretch w-100">
{% if this_match_remaining <= 0 %} {% if this_match_remaining <= 0 %}