contentdb/app/templates/admin/languages/list.html

76 lines
1.9 KiB
HTML
Raw Normal View History

2024-02-25 16:41:37 +01:00
{% extends "base.html" %}
{% block title %}
{{ _("Languages") }}
{% endblock %}
{% block content %}
2024-02-26 03:09:00 +01:00
<a class="btn btn-primary float-end" href="{{ url_for('admin.create_edit_language') }}">New Language</a>
2024-02-25 16:41:37 +01:00
<h1>{{ _("Languages") }}</h1>
2024-03-03 01:47:38 +01:00
<p>
{{ at_least_one_count }} packages support at least one language other than English.
</p>
2024-02-25 16:41:37 +01:00
<div class="list-group">
<div class="list-group-item">
<div class="row text-muted">
2024-02-26 03:09:00 +01:00
<div class="col-1">
2024-02-25 16:41:37 +01:00
{{ _("Id") }}
</div>
2024-02-26 03:09:00 +01:00
<div class="col-2">
2024-02-25 16:41:37 +01:00
{{ _("Title") }}
</div>
2024-02-26 03:09:00 +01:00
<div class="col-1">
{{ _("Packages") }}
</div>
<div class="col"></div>
<div class="col-3 text-end">
{{ _("Has ContentDB translation?") }}
</div>
2024-02-25 16:41:37 +01:00
</div>
</div>
{% for l in languages %}
2024-02-26 03:09:00 +01:00
{% if l.id == "en" %}
{% set lang_package_count = total_package_count %}
{% else %}
{% set lang_package_count = l.packages.filter_by(state='APPROVED').count() %}
{% endif %}
2024-02-25 16:41:37 +01:00
<a class="list-group-item list-group-item-action"
href="{{ url_for('admin.create_edit_language', id_=l.id) }}">
2024-02-26 03:09:00 +01:00
<div class="row align-items-center justify-content-center">
<div class="col-1">
2024-02-25 16:41:37 +01:00
{{ l.id }}
</div>
2024-02-26 03:09:00 +01:00
<div class="col-2">
2024-02-25 16:41:37 +01:00
{{ l.title }}
</div>
2024-02-26 03:09:00 +01:00
<div class="col-1">
{{ lang_package_count }}
</div>
<div class="col">
<div class="progress">
<div class="progress-bar" role="progressbar"
style="width: {{ 100 * lang_package_count / total_package_count }}%;"
aria-valuenow="{{ lang_package_count }}" aria-valuemin="0" aria-valuemax="{{ total_package_count }}">
</div>
</div>
</div>
<div class="col-3 text-end">
{% if l.has_contentdb_translation %}
<i class="fas fa-check text-success"></i>
{% else %}
<i class="fas fa-times text-danger"></i>
{% endif %}
</div>
2024-02-25 16:41:37 +01:00
</div>
</a>
{% endfor %}
</div>
{% endblock %}