From 2ba4db683d5bd2de981a934916bf07d9f2b71d9f 2022-11-22 22:18:25 From: Daniel Pono Takamori Date: 2022-11-22 22:18:25 Subject: [PATCH] add fundraiser progress bar for 2022 --- diff --git a/www/conservancy/local_context_processors.py b/www/conservancy/local_context_processors.py index 36affb6eba08188947840f94cfa0a0404519d0e4..815dcd764aa9dbac56556e60e096cafdffe2262e 100644 --- a/www/conservancy/local_context_processors.py +++ b/www/conservancy/local_context_processors.py @@ -5,7 +5,7 @@ from datetime import datetime as DateTime import conservancy.settings 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): try: diff --git a/www/conservancy/templates/base_conservancy.html b/www/conservancy/templates/base_conservancy.html index f15ac7bab92125ae1a16a84d0e225c60da822898..03c478a7ea7cbe6afb7313a219ad0f5524e871f9 100644 --- a/www/conservancy/templates/base_conservancy.html +++ b/www/conservancy/templates/base_conservancy.html @@ -106,7 +106,7 @@ * this_match_exceeded: this_match_so_far - this_match_goal {% 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_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 %}
@@ -132,7 +132,7 @@ {% endif %}
-{% if sitefundgoal.fundraiser_so_far_amount %} +{% if 1 %}
{% if this_match_remaining <= 0 %}