diff --git a/loko/assets/locale/en/LC_MESSAGES/django.mo b/loko/assets/locale/en/LC_MESSAGES/django.mo index 14bb526..098fc35 100644 Binary files a/loko/assets/locale/en/LC_MESSAGES/django.mo and b/loko/assets/locale/en/LC_MESSAGES/django.mo differ diff --git a/loko/assets/locale/en/LC_MESSAGES/django.po b/loko/assets/locale/en/LC_MESSAGES/django.po index a9f400c..2ad2da9 100644 --- a/loko/assets/locale/en/LC_MESSAGES/django.po +++ b/loko/assets/locale/en/LC_MESSAGES/django.po @@ -3658,8 +3658,8 @@ msgid "Actions" msgstr "Action" #: assets/templates/assets/buildings/publicbuilding_detail.html:347 -msgid "Détail de l\\" -msgstr "Detail of " +msgid "Détail de l'asset" +msgstr "Asset detail" #: assets/templates/assets/buildings/publicbuilding_detail.html:354 msgid "Aucun asset ou équipement technique enregistré." @@ -4377,7 +4377,7 @@ msgstr "No inspection or verification recorded for this equipment." #: assets/templates/assets/components/asset_inspections.html:89 msgid "Détail de l'inspection" -msgstr "Detail of " +msgstr "Inspection detail" #: assets/templates/assets/components/asset_inspections.html:98 msgid "Inspection annulée" diff --git a/loko/assets/locale/fr/LC_MESSAGES/django.mo b/loko/assets/locale/fr/LC_MESSAGES/django.mo index 2b6f9ce..a0fe891 100644 Binary files a/loko/assets/locale/fr/LC_MESSAGES/django.mo and b/loko/assets/locale/fr/LC_MESSAGES/django.mo differ diff --git a/loko/assets/locale/fr/LC_MESSAGES/django.po b/loko/assets/locale/fr/LC_MESSAGES/django.po index e952a45..58491f3 100644 --- a/loko/assets/locale/fr/LC_MESSAGES/django.po +++ b/loko/assets/locale/fr/LC_MESSAGES/django.po @@ -3663,8 +3663,8 @@ msgid "Actions" msgstr "Actions" #: assets/templates/assets/buildings/publicbuilding_detail.html:347 -msgid "Détail de l\\" -msgstr "Détail de l\\" +msgid "Détail de l'asset" +msgstr "Détail de l'asset" #: assets/templates/assets/buildings/publicbuilding_detail.html:354 msgid "Aucun asset ou équipement technique enregistré." @@ -4383,7 +4383,7 @@ msgstr "Aucune inspection ni vérification enregistrée pour cet équipement." #: assets/templates/assets/components/asset_inspections.html:89 msgid "Détail de l'inspection" -msgstr "Détail de l\\" +msgstr "Détail de l'inspection" #: assets/templates/assets/components/asset_inspections.html:98 msgid "Inspection annulée" diff --git a/loko/assets/locale/nl/LC_MESSAGES/django.mo b/loko/assets/locale/nl/LC_MESSAGES/django.mo index 191840b..6ab3d24 100644 Binary files a/loko/assets/locale/nl/LC_MESSAGES/django.mo and b/loko/assets/locale/nl/LC_MESSAGES/django.mo differ diff --git a/loko/assets/locale/nl/LC_MESSAGES/django.po b/loko/assets/locale/nl/LC_MESSAGES/django.po index 6f20cae..e9a9974 100644 --- a/loko/assets/locale/nl/LC_MESSAGES/django.po +++ b/loko/assets/locale/nl/LC_MESSAGES/django.po @@ -3657,8 +3657,8 @@ msgid "Actions" msgstr "Actie" #: assets/templates/assets/buildings/publicbuilding_detail.html:347 -msgid "Détail de l\\" -msgstr "Detail van " +msgid "Détail de l'asset" +msgstr "Assetdetail" #: assets/templates/assets/buildings/publicbuilding_detail.html:354 msgid "Aucun asset ou équipement technique enregistré." @@ -4378,7 +4378,7 @@ msgstr "Geen wijzigingen geregistreerd voor dit asset." #: assets/templates/assets/components/asset_inspections.html:89 msgid "Détail de l'inspection" -msgstr "Detail van " +msgstr "Inspectiedetail" #: assets/templates/assets/components/asset_inspections.html:98 msgid "Inspection annulée" diff --git a/loko/assets/templates/assets/buildings/publicbuilding_detail.html b/loko/assets/templates/assets/buildings/publicbuilding_detail.html index adf030d..6989edc 100644 --- a/loko/assets/templates/assets/buildings/publicbuilding_detail.html +++ b/loko/assets/templates/assets/buildings/publicbuilding_detail.html @@ -344,7 +344,7 @@ {{ eq.next_control_date|date:"d/m/Y"|default:"-" }} - + {% translate "Détail" %} diff --git a/loko/assets/templates/assets/components/asset_inspections.html b/loko/assets/templates/assets/components/asset_inspections.html index 2c5bf1c..9ec3245 100644 --- a/loko/assets/templates/assets/components/asset_inspections.html +++ b/loko/assets/templates/assets/components/asset_inspections.html @@ -145,11 +145,18 @@ {% if insp.documents.all %}
-
+
{% for doc in insp.documents.all %} - - Photo - + {% if doc.is_image %} + + {{ doc.filename }} + + {% else %} + + + {{ doc.filename }} + + {% endif %} {% endfor %}
@@ -260,7 +267,8 @@ document.addEventListener('DOMContentLoaded', function() { window.location.reload(); } else { if (alertBox) { - alertBox.textContent = data.error || "{% filter escapejs %}{% translate 'Erreur lors de l\'enregistrement.' %}{% endfilter %}"; + {% translate "Erreur lors de l'enregistrement." as err_save_msg %} + alertBox.textContent = data.error || "{{ err_save_msg|escapejs }}"; alertBox.classList.remove('d-none'); } if (submitBtn) submitBtn.disabled = false; @@ -279,6 +287,25 @@ document.addEventListener('DOMContentLoaded', function() { {% endif %} diff --git a/loko/templates/base.html b/loko/templates/base.html index 04baf23..c45ecbf 100644 --- a/loko/templates/base.html +++ b/loko/templates/base.html @@ -546,6 +546,26 @@ document.addEventListener('DOMContentLoaded', () => { } }); }); + +// Lazy loading des images dans les modales Bootstrap +(function() { + function loadLazyModalImages(modal) { + if (!modal || typeof modal.querySelectorAll !== 'function') return; + modal.querySelectorAll('img[data-src]').forEach(function(img) { + const dataSrc = img.getAttribute('data-src'); + if (dataSrc) { + img.src = dataSrc; + img.removeAttribute('data-src'); + } + }); + } + document.addEventListener('show.bs.modal', function(e) { + loadLazyModalImages(e.target); + }); + document.addEventListener('shown.bs.modal', function(e) { + loadLazyModalImages(e.target); + }); +})();