Changeset - 2ba4db683d5b
[Not reviewed]
0 2 0
Daniel Takamori (pono) - 19 months ago 2022-11-22 22:18:25
pono@sfconservancy.org
add fundraiser progress bar for 2022
2 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
www/conservancy/local_context_processors.py
Show inline comments
...
 
@@ -4,9 +4,9 @@ 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:
 
        return FundraisingGoal.objects.get(fundraiser_code_name=fundraiser_sought)
www/conservancy/templates/base_conservancy.html
Show inline comments
...
 
@@ -105,9 +105,9 @@
 
* this_match_remaining: this_match_goal - this_match_so_far
 
* 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 %}
 
    <div class="fundraiser-top-text ph3 pt2 pb3">
 
      <div class="mw8 center ph2 ph4-ns">
...
 
@@ -131,9 +131,9 @@
 

	
 
        {% endif %}
 
      </div>
 

	
 
{% if sitefundgoal.fundraiser_so_far_amount %}
 
{% if 1 %}
 
<a href="/sustainer/" style="text-decoration: none !important">
 
<div id="siteprogressbar" class="flex items-stretch w-100">
 
  {% if this_match_remaining <= 0 %}
 
    <div class="progress matched pv1 b flex items-center" style="flex-basis: {{ this_match_so_far }}px">
0 comments (0 inline, 0 general)