cmsmanage/membershipworks/templates/membershipworks/event_detail.dj.html

65 lines
2.6 KiB
HTML

{% extends "base.dj.html" %}
{% load nh3_tags %}
{% load django_bootstrap5 %}
{% block title %}Event Invoice for {{ event.details.ttl|nh3 }}{% endblock %}
{% block admin_link %}
{% url 'admin:membershipworks_eventext_change' event.pk %}
{% endblock %}
{% block breadcrumbs %}
{% include "./components/event_breadcrumbs.dj.html" %}
<li class="breadcrumb-item active" aria-current="page">{{ event.details.ttl|nh3 }}</li>
{% endblock %}
{% block content %}
<div class="container">
{% if event.registrations is not None %}
{% url 'membershipworks:event-registrations' event.pk as registrations_url %}
{% bootstrap_button href=registrations_url content="Show Registrations" %}
{% endif %}
{% include "membershipworks/event_invoice.dj.html" %}
<div class="card w-auto mt-5">
<div class="card-body">
{% if event.invoice %}
<div class="card-text text-center">
<p>
Invoice submitted on {{ event.invoice.date_submitted }}
for ${{ event.invoice.amount|floatformat:2 }},
{% if event.invoice.date_paid %}
paid on {{ event.invoice.date_paid }}
{% else %}
not paid yet
{% endif %}
</p>
<a class="btn btn-primary"
href="{% url 'membershipworks:event-invoice-pdf' event.invoice.pk %}">View PDF</a>
</div>
{% elif not event.ready_for_invoice %}
<p class="card-text text-center">
This event is missing required information to generate an invoice. Please contact us at <a href="mailto:info@claremontmakerspace.org">info@claremontmakerspace.org</a>.
</p>
{% elif user_is_instructor %}
<form method="post" class="card-text">
{% csrf_token %}
{% bootstrap_form form %}
<div class="text-center">
{% url "membershipworks:event-invoice-pdf-preview" event.eid as pdf_preview_link %}
{% bootstrap_button button_class="btn-warning" href=pdf_preview_link content="Preview PDF" %}
{% bootstrap_button button_type="submit" content="Submit Invoice" %}
</div>
</form>
{% else %}
<p>
No invoice has been created for this event, and you are not listed as the the instructor.
<div class="text-center">
{% url "membershipworks:event-invoice-pdf-preview" event.eid as pdf_preview_link %}
{% bootstrap_button button_class="btn-warning" href=pdf_preview_link content="Preview PDF" %}
</div>
</p>
{% endif %}
</div>
</div>
</div>
{% endblock %}