From 7cdf259a553e85a4894f26654e6fa24c804eda45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20H=C3=A1la?= Date: Fri, 12 Jan 2024 15:47:14 +0100 Subject: [PATCH] Add Option to specify tenant logo --- backend/locale/cs/LC_MESSAGES/django.po | 6 +-- .../migrations/0012_alter_category_link.py | 19 +++++++++ frontend/locale/cs/LC_MESSAGES/django.po | 18 +++++---- frontend/static/favicon.ico | Bin 1406 -> 0 bytes frontend/templates/base/form.html | 2 +- frontend/templates/base/index.html | 10 ++++- pdf/locale/cs/LC_MESSAGES/django.po | 1 - pdf/migrations/0024_alter_pdfrequest_link.py | 19 +++++++++ tenants/locale/cs/LC_MESSAGES/django.po | 36 ++++++++++++------ tenants/migrations/0003_tenant_icon.py | 25 ++++++++++++ tenants/models.py | 18 ++++++++- 11 files changed, 128 insertions(+), 26 deletions(-) create mode 100644 category/migrations/0012_alter_category_link.py delete mode 100644 frontend/static/favicon.ico create mode 100644 pdf/migrations/0024_alter_pdfrequest_link.py create mode 100644 tenants/migrations/0003_tenant_icon.py diff --git a/backend/locale/cs/LC_MESSAGES/django.po b/backend/locale/cs/LC_MESSAGES/django.po index f0bb49c..85d5e99 100644 --- a/backend/locale/cs/LC_MESSAGES/django.po +++ b/backend/locale/cs/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-29 14:14+0000\n" +"POT-Creation-Date: 2024-01-12 15:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -136,11 +136,11 @@ msgstr "Smazat" msgid "Transpose" msgstr "Transponovat" -#: backend/templates/songs/index.html:91 +#: backend/templates/songs/index.html:97 msgid "Search" msgstr "Vyhledávání" -#: backend/templates/songs/index.html:93 +#: backend/templates/songs/index.html:99 msgid "Number, text or author" msgstr "Číslo, text nebo autor" diff --git a/category/migrations/0012_alter_category_link.py b/category/migrations/0012_alter_category_link.py new file mode 100644 index 0000000..4109f99 --- /dev/null +++ b/category/migrations/0012_alter_category_link.py @@ -0,0 +1,19 @@ +# Generated by Django 5.0 on 2024-01-12 14:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("category", "0011_alter_category_options"), + ] + + operations = [ + migrations.AlterField( + model_name="category", + name="link", + field=models.CharField( + blank=True, help_text="Link to include in the PDF", max_length=300, verbose_name="Link" + ), + ), + ] diff --git a/frontend/locale/cs/LC_MESSAGES/django.po b/frontend/locale/cs/LC_MESSAGES/django.po index 382ea83..9437d16 100644 --- a/frontend/locale/cs/LC_MESSAGES/django.po +++ b/frontend/locale/cs/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-12-29 14:14+0000\n" +"POT-Creation-Date: 2024-01-12 15:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -73,27 +73,31 @@ msgstr "" msgid "Submit" msgstr "Odeslat" -#: frontend/templates/base/index.html:58 +#: frontend/templates/base/index.html:35 +msgid "Logo" +msgstr "" + +#: frontend/templates/base/index.html:64 msgid "Options" msgstr "Možnosti" -#: frontend/templates/base/index.html:68 +#: frontend/templates/base/index.html:74 msgid "Language" msgstr "Jazyk" -#: frontend/templates/base/index.html:82 +#: frontend/templates/base/index.html:88 msgid "Version" msgstr "Verze" -#: frontend/templates/base/index.html:83 +#: frontend/templates/base/index.html:89 msgid "Git" msgstr "" -#: frontend/templates/base/index.html:91 +#: frontend/templates/base/index.html:97 msgid "Logged as" msgstr "Přihlášen jako" -#: frontend/templates/base/index.html:93 +#: frontend/templates/base/index.html:99 msgid "Log in" msgstr "Přihlásit se" diff --git a/frontend/static/favicon.ico b/frontend/static/favicon.ico deleted file mode 100644 index 21ca38e7a258c55fd65d43b31bca5e4f7881930c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1406 zcmeHDNl#Nz7(MlZR1v8~naY*P3y3I_d(wsc7XAPWNQf*E`i8#tF%%1!poTyKiS9@U zAPIv88UiN3LK9^HM1~zJ;JgPF;?i}$m-D{!P3PYG0UmxnA6#om2Xe`(2q#rSc;MyV zC71pmzW3)4A>Dv!+t95j4vvnoGP4DHAcn-3UkKY#jE;?=DHw!dMX<7#K#ys{>K{ai z-VECazG}uBT|;YIJ3fw&V{l{`t8+iFKL49D7EEI5^Ct|%FnrTjFdgb098N=X_WYphCD zT6*sm6OtX`F}+NGmg96tN^n~GtIMjSpA%FR0jWIl5$j5oJ12-NcHDi=FxL$m9u!r` zrv*~gH`Y4+HQuyh-;2UK_n+L(r<};6Xm(vj!C{LBD4 VJ%39sabgFvR7vtQR*Vz4vlp3=ffoP( diff --git a/frontend/templates/base/form.html b/frontend/templates/base/form.html index d1195bb..169f299 100644 --- a/frontend/templates/base/form.html +++ b/frontend/templates/base/form.html @@ -3,7 +3,7 @@ {% load django_bootstrap5 %} {% block framed_body %} -
+ {% csrf_token %} {% bootstrap_form form layout='horizontal' %} {% bootstrap_button _("Submit") button_type="submit" %} diff --git a/frontend/templates/base/index.html b/frontend/templates/base/index.html index da417d0..2943ce9 100644 --- a/frontend/templates/base/index.html +++ b/frontend/templates/base/index.html @@ -13,7 +13,9 @@ {% block title %} {{ request.tenant.display_name }} {% endblock %} - + {% if request.tenant.icon %} + + {% endif %} @@ -28,7 +30,11 @@