{% extends "base.html" %} {% block title %}Lizenzübersicht{% endblock %} {% macro sortable_header(label, field, current_sort, current_order) %} {% set base_url = url_for('licenses.licenses') %} {% set params = [] %} {% if search %}{% set _ = params.append('search=' + search|urlencode) %}{% endif %} {% if request.args.get('data_source') %}{% set _ = params.append('data_source=' + request.args.get('data_source')|urlencode) %}{% endif %} {% if request.args.get('license_type') %}{% set _ = params.append('license_type=' + request.args.get('license_type')|urlencode) %}{% endif %} {% if request.args.get('license_status') %}{% set _ = params.append('license_status=' + request.args.get('license_status')|urlencode) %}{% endif %} {% set _ = params.append('sort=' + field) %} {% if current_sort == field %} {% set _ = params.append('order=' + ('desc' if current_order == 'asc' else 'asc')) %} {% else %} {% set _ = params.append('order=asc') %} {% endif %} {% set _ = params.append('page=1') %} {{ label }} {% if current_sort == field %} {% if current_order == 'asc' %}↑{% else %}↓{% endif %} {% else %} ↕ {% endif %} {% endmacro %} {% block extra_css %}
{% endblock %} {% block content %}

## Lizenzübersicht

Datenquelle
Lizenztyp
Status
Filter zurücksetzen
🔍 Suchen
{% if search or request.args.get('data_source') != 'real' or request.args.get('license_type') or request.args.get('license_status') %}
Gefiltert: {{ total }} Ergebnisse
{% if search %} {{ search }} {% set clear_search_params = [] %} {% for type in filter_types %}{% set _ = clear_search_params.append('types[]=' + type|urlencode) %}{% endfor %} {% for status in filter_statuses %}{% set _ = clear_search_params.append('statuses[]=' + status|urlencode) %}{% endfor %} {% if show_fake %}{% set _ = clear_search_params.append('show_fake=1') %}{% endif %} {% set _ = clear_search_params.append('sort=' + sort) %} {% set _ = clear_search_params.append('order=' + order) %} × {% endif %}
{% endif %}

{{ sortable_header('ID', 'id', sort, order) }} {{ sortable_header('Lizenzschlüssel', 'license_key', sort, order) }} {{ sortable_header('Kunde', 'customer', sort, order) }} {{ sortable_header('E-Mail', 'email', sort, order) }} {{ sortable_header('Typ', 'type', sort, order) }} {{ sortable_header('Gültig von', 'valid_from', sort, order) }} {{ sortable_header('Gültig bis', 'valid_until', sort, order) }} {{ sortable_header('Status', 'status', sort, order) }} {{ sortable_header('Aktiv', 'active', sort, order) }}
| Aktionen
--- | ---
{% for license in licenses %}

{{ license.id }}

`{{ license.license_key }}`

{{ license.customer_name }} {% if license.is_fake %} 🧪 {% endif %}

-

{% if license.license_type == 'full' %} Vollversion {% else %} Testversion {% endif %}

{{ license.valid_from.strftime('%d.%m.%Y') }}

{{ license.valid_until.strftime('%d.%m.%Y') }}

{% if not license.is_active %} ❌ Deaktiviert {% elif license.valid_until < now().date() %} ⚠️ Abgelaufen {% else %} ✅ Aktiv {% endif %}

✏️ Bearbeiten

{% endfor %}

{% if not licenses %}
{% if search %}

Keine Lizenzen gefunden für: {{ search }}

Alle Lizenzen anzeigen {% else %}

Noch keine Lizenzen vorhanden.

Erste Lizenz erstellen {% endif %}
{% endif %}
{% if total_pages > 1 %}
{% endif %}
0 Lizenzen ausgewählt
{% endblock %} {% block extra_js %}
{% endblock %}