X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/28cb104054903726b0556222929f8f2e9941882d..357027375ff8867f42ca34bcbfb5a78b5b185fc3:/apps/funding/templatetags/funding_tags.py?ds=sidebyside diff --git a/apps/funding/templatetags/funding_tags.py b/apps/funding/templatetags/funding_tags.py deleted file mode 100755 index 5331f8c4a..000000000 --- a/apps/funding/templatetags/funding_tags.py +++ /dev/null @@ -1,29 +0,0 @@ -from django import template -from ..models import Offer - -register = template.Library() - - -@register.inclusion_tag("funding/tags/funding.html") -def funding(offer=None, link=False, add_class=""): - if offer is None: - offer = Offer.current() - if offer is None: - return {} - - return { - 'offer': offer, - 'is_current': offer.is_current(), - 'percentage': 100 * offer.sum() / offer.target, - 'link': link, - 'add_class': add_class, - } - - -@register.inclusion_tag("funding/tags/offer_detail_head.html") -def offer_detail_head(offer): - return { - 'offer': offer, - 'state': offer.state(), - } -