{% extends 'base.html' %} {% load render_bundle from webpack_loader %} {% load static %} {% block page-subtitle %}{{ member.firstname_last }} Membership Activity · Library Members · {% endblock %} {% block js %} {% render_bundle 'activities' 'js' %} {% endblock %} {% block header %} {% include 'snippets/header.html' with title=member.firstname_last style="detail" %} {% endblock %} {% block main-style %}tabbed white{% endblock %} {% block content %} {% include 'snippets/breadcrumbs.html' %}
{% comment %} preliminary form controls for sorting and expand/collapse on mobile
{% endcomment %} {% if not event_list.count %}

No documented membership activity.

{% else %}
{% for event in event_list %} {% with event.event_type as event_type %} {# amount is either subscription price + deposit or refund amount; refund is negative #} {% with subscription_amount=event.subscription.total_amount refund=event.reimbursement.refund %} {% endwith %} {% endfor %}
Activity Plan Duration Start Date End Date Amount
{{ event_type }} {{ event.subscription.category|default:'-' }} {# render info link here so it can be shown on mobile too #} {% if forloop.first %} {% endif %} {{ event.subscription.readable_duration|default:'-' }} {{ event.partial_start_date|partialdate|default:'-' }} {% if event.reimbursement %} - {% else %} {{ event.partial_end_date|partialdate|default:'-' }}{% endif %} {# only display currency if there is a value #} {% if refund %}-{% endif %} {% firstof subscription_amount|floatformat refund|floatformat '-' %} {% if subscription_amount or refund %} {% firstof event.subscription.currency_symbol event.reimbursement.currency_symbol '' %} {% endif %} {% endwith %}
{% endif %}
{% endblock %}