69 lines
2.4 KiB
HTML
69 lines
2.4 KiB
HTML
{% extends "chrono/manager_home.html" %}
|
|
{% load static i18n %}
|
|
|
|
{% block css %}
|
|
{{ block.super }}
|
|
<link rel="stylesheet" type="text/css" media="all" href="{% static "css/gadjo.multiselectwidget.css" %}" />
|
|
{% endblock %}
|
|
|
|
{% block extrascripts %}
|
|
{{ block.super }}
|
|
<script src="{% static "js/gadjo.multiselectwidget.js" %}"></script>
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
<a href="{% url 'chrono-manager-events-report' %}">{% trans "Events report" %}</a>
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
<h2>{% trans 'Events report' %}</h2>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="section">
|
|
<h3>{% trans "Report configuration" %}</h3>
|
|
<div>
|
|
<form>
|
|
{{ form.as_p }}
|
|
<button class="submit-button">{% trans "See report" %}</button>
|
|
{% if request.GET and form.is_valid %}
|
|
<button class="submit-button" name="csv">{% trans "Get CSV file" %}</button>
|
|
{% endif %}
|
|
</form>
|
|
|
|
{% if request.GET and form.is_valid %}
|
|
{% with events=form.get_events %}
|
|
|
|
{% if 'not-checked' in form.cleaned_data.status %}
|
|
<h4>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Report from {{ start }} to {{ end }} - not checked events{% endblocktrans %}</h4>
|
|
<ul class="objects-list single-links">
|
|
{% for event in events.not_checked %}
|
|
<li>
|
|
<a href="{% url 'chrono-manager-event-view' pk=event.agenda_id event_pk=event.pk %}">
|
|
{% if event.label %}{{ event.label }} / {% endif %} {{ event.start_datetime }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% if 'not-invoiced' in form.cleaned_data.status %}
|
|
<h4>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Report from {{ start }} to {{ end }} - not invoiced events{% endblocktrans %}</h4>
|
|
<ul class="objects-list single-links">
|
|
{% for event in events.not_invoiced %}
|
|
<li>
|
|
<a href="{% url 'chrono-manager-event-view' pk=event.agenda_id event_pk=event.pk %}">
|
|
{% if event.label %}{{ event.label }} / {% endif %} {{ event.start_datetime }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
|
|
{% endwith %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|