Skip to content

Commit

Permalink
Merge pull request #3221 from digitalfabrik/bug/statistics_export_box
Browse files Browse the repository at this point in the history
Revive export box of statistics
  • Loading branch information
MizukiTemma authored Nov 19, 2024
2 parents 2126d07 + 2177b9d commit 092dd2f
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
{% if request.region.statistics_enabled and perms.cms.view_statistics %}
{% block content %}
<div class="row">
<div class="col-sm-12">
<h1 class="heading">
{% translate "Statistics" %}
</h1>
</div>
<div class="xl:flex gap-3 pt-2">
<div class="xl:w-3/4">
{% include "statistics/statistics_chart.html" with box_id="statistics_chart" %}
Expand Down
31 changes: 30 additions & 1 deletion integreat_cms/cms/templates/statistics/statistics_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3 class="heading font-bold text-black">
{% endif %}
</div>
</div>
<div class="rounded border border-solid border-blue-500 shadow-2xl bg-white">
<div class="rounded border border-solid border-blue-500 shadow-2xl bg-white mb-2">
<div class="rounded p-4 bg-water-500">
<h3 class="heading font-bold text-black">
<i icon-name="calendar" class="pb-1"></i> {% translate "Adjust time period" %}
Expand Down Expand Up @@ -50,3 +50,32 @@ <h3 class="heading font-bold text-black">
</button>
</form>
</div>
<div class="rounded border border-solid border-blue-500 shadow-2xl bg-white mb-2">
<div class="rounded p-4 bg-water-500">
<h3 class="heading font-bold text-black">
<i icon-name="download" class="pb-1"></i> {% translate "Export" %}
</h3>
</div>
<div class="flex flex-col gap-4 p-4 pt-2">
<label for="export-format">
{% translate "Choose format" %}
</label>
<select id="export-format"
data-filename-prefix="{% translate "Statistics" %} {{ request.region.name }}"
data-language-column-title="{% translate "Language" %}">
<option value="" selected>
--- {% translate "please select" %} ---
</option>
<option value="image">
{% translate "Image/PNG" %}
</option>
<option value="csv">
{% translate "Table Document/CSV" %}
</option>
</select>
<button id="export-button" class="btn" disabled>
{% translate "Export" %}
</button>
<a id="export-download-link" class="hidden"></a>
</div>
</div>
39 changes: 23 additions & 16 deletions integreat_cms/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -1961,6 +1961,7 @@ msgstr "Alle Regionen"
#: cms/templates/feedback/region_feedback_list_archived.html
#: cms/templates/languagetreenodes/languagetreenode_list.html
#: cms/templates/pages/_page_xliff_import_diff.html
#: cms/templates/statistics/statistics_sidebar.html
#: cms/views/feedback/feedback_resource.py
msgid "Language"
msgstr "Sprache"
Expand Down Expand Up @@ -4474,6 +4475,8 @@ msgstr "Analyse"

#: cms/templates/_base.html cms/templates/regions/region_form.html
#: cms/templates/statistics/_statistics_widget.html
#: cms/templates/statistics/statistics_overview.html
#: cms/templates/statistics/statistics_sidebar.html
msgid "Statistics"
msgstr "Statistiken"

Expand Down Expand Up @@ -8417,6 +8420,26 @@ msgstr "Zeitraum anpassen"
msgid "Customize view"
msgstr "Ansicht anpassen"

#: cms/templates/statistics/statistics_sidebar.html
msgid "Export"
msgstr "Exportieren"

#: cms/templates/statistics/statistics_sidebar.html
msgid "Choose format"
msgstr "Format auswählen"

#: cms/templates/statistics/statistics_sidebar.html
msgid "please select"
msgstr "bitte auswählen"

#: cms/templates/statistics/statistics_sidebar.html
msgid "Image/PNG"
msgstr "Bild/PNG"

#: cms/templates/statistics/statistics_sidebar.html
msgid "Table Document/CSV"
msgstr "Tabellendokument/CSV"

#: cms/templates/translations/translations_management.html
msgid "Manage machine translations"
msgstr "Maschinelle Übersetzungen verwalten"
Expand Down Expand Up @@ -11029,27 +11052,11 @@ msgstr ""
"Diese Seite konnte nicht importiert werden, da sie zu einer anderen Region "
"gehört ({})."


#~ msgid "Individual languages can be hidden by clicking on the labels."
#~ msgstr ""
#~ "Einzelne Sprachen können durch Anklicken der Beschriftungen ausgeblendet "
#~ "werden."

#~ msgid "Export"
#~ msgstr "Exportieren"

#~ msgid "Choose format"
#~ msgstr "Format auswählen"

#~ msgid "please select"
#~ msgstr "bitte auswählen"

#~ msgid "Image/PNG"
#~ msgstr "Bild/PNG"

#~ msgid "Table Document/CSV"
#~ msgstr "Tabellendokument/CSV"

#~ msgid "Copy"
#~ msgstr "(Kopie)"

Expand Down
2 changes: 2 additions & 0 deletions integreat_cms/release_notes/current/unreleased/3131.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
en: Make access number box of statistics collapsible
de: Mache Zugriffsnummernfeld der Statistik zusammenklappbar

0 comments on commit 092dd2f

Please sign in to comment.