From b44ba889595002e7e902e01e2f6aa8006255c411 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 22 Jun 2023 10:10:38 +0200 Subject: 📝 update architecture graph - fix migration instruction MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog/en/changelog_2022-06-15.md | 3 +++ changelog/fr/changelog_2023-01-25.md | 3 +++ .../source/_static/graphique_structure_ishtar.png | Bin 223051 -> 240291 bytes docs/fr/source/installation.rst | 2 +- .../media-src/graphique_structure_ishtar.dot | 5 +++-- ishtar_common/templates/ishtar/changelog.html | 2 +- ishtar_common/views.py | 24 ++++++++++++++++++++- scss/custom.scss | 22 +++++++++++++++++-- 8 files changed, 54 insertions(+), 7 deletions(-) diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index 003fd96dc..a078e4691 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -1,6 +1,9 @@ v4.0.50 - 2023- -------------------- +### Features/improvements ### +- update documentation + ### Bug fixes ### - fix crash on qrcode generation for base finds diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 1aa9242ce..83c12a96f 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -1,6 +1,9 @@ v4.0.50 - -------------------- +### Fonctionnalités/améliorations ### +- Mise à jour de la documentation + ### Corrections de dysfonctionnements ### - correction d'erreur lors de la génération de qrcode pour le mobilier d'origine diff --git a/docs/fr/source/_static/graphique_structure_ishtar.png b/docs/fr/source/_static/graphique_structure_ishtar.png index 0c20d83e4..9d87ff769 100644 Binary files a/docs/fr/source/_static/graphique_structure_ishtar.png and b/docs/fr/source/_static/graphique_structure_ishtar.png differ diff --git a/docs/fr/source/installation.rst b/docs/fr/source/installation.rst index 0baa9176a..5a7a72375 100644 --- a/docs/fr/source/installation.rst +++ b/docs/fr/source/installation.rst @@ -150,7 +150,7 @@ On peut ensuite passer à la migration des données. Attention cette migration p # migration des données pour la nouvelle gestion géographique editor local_settings.py (...) # à la fin du fichier ajouter les lignes - ISHTAR_MIGRATE_V4 = False + ISHTAR_MIGRATE_V4 = True USE_BACKGROUND_TASK = False ## nombre-de-processus dépend du processeur et du nombre de fils d'exécution disponible diff --git a/docs/fr/source/media-src/graphique_structure_ishtar.dot b/docs/fr/source/media-src/graphique_structure_ishtar.dot index 8a65819e3..e69ab6d6d 100644 --- a/docs/fr/source/media-src/graphique_structure_ishtar.dot +++ b/docs/fr/source/media-src/graphique_structure_ishtar.dot @@ -29,7 +29,7 @@ digraph structure_Ishtar { Geo [label=< Éléments
géographiques >]; AdminAct [label=< Acte
administratif >]; Town [label="Commune"]; - Area [label="Zone"]; + Area [label=< Zone
géographique >]; root=File; @@ -84,6 +84,8 @@ digraph structure_Ishtar { Treatment -> Document; TreatmentFile -> Document; AdminAct -> Document; + Town -> Document; + Area -> Document; /* -> AdminAct */ File -> AdminAct; @@ -97,7 +99,6 @@ digraph structure_Ishtar { File -> Town; Parcel -> Town; Town -> Area; - Town -> Area; module_AO, AO, Parcel [color=red2]; no_module1, no_module2 [color=white]; diff --git a/ishtar_common/templates/ishtar/changelog.html b/ishtar_common/templates/ishtar/changelog.html index 1cc7a8b08..c11524d9d 100644 --- a/ishtar_common/templates/ishtar/changelog.html +++ b/ishtar_common/templates/ishtar/changelog.html @@ -2,7 +2,7 @@ {% load i18n %} {% block content %}
-

{% trans "Changelog" %}

+

{% trans "Changelog" %}

{% if next %}
{% trans "Next" %} diff --git a/ishtar_common/views.py b/ishtar_common/views.py index 73c516661..3f060f2e1 100644 --- a/ishtar_common/views.py +++ b/ishtar_common/views.py @@ -79,6 +79,7 @@ from ishtar_common.utils import ( dict_to_tuple, put_session_message, get_model_by_slug, + human_date, ) from ishtar_common.widgets import JQueryAutoComplete from ishtar_common import tasks @@ -1215,8 +1216,29 @@ class ChangelogView(IshtarMixin, LoginRequiredMixin, TemplateView): if not current_file: raise Http404() changelog_file = os.path.join(changelog_dir, current_file) + VERSION_RE = re.compile(r"

(.*) - (\d{4})-(\d{2})-(\d{2})

") with open(changelog_file, "r", encoding="utf-8") as changelog: - context["changelog"] = markdown(changelog.read()) + changelog_base = markdown(changelog.read()) + changelog_full = "" + for line in changelog_base.split("\n"): + line = line.strip() + if not line: + continue + #

v4.0.42 - 2023-01-25

+ m = VERSION_RE.match(line) + if not m: + changelog_full += line + continue + version, year, month, day = m.groups() + try: + d = datetime.date(int(year), int(month), int(day)) + except ValueError: + changelog_full += line + continue + changelog_full += f"
" + changelog_full += f"{human_date(d)}" + changelog_full += f"{version}
" + context["changelog"] = changelog_full if page_number > 1: context["next"] = page_number - 1 diff --git a/scss/custom.scss b/scss/custom.scss index 95846e89f..fcabbb71b 100644 --- a/scss/custom.scss +++ b/scss/custom.scss @@ -686,9 +686,27 @@ div#validation-bar{ } .container.changelog{ - h2 { + padding-left: 170px; + h1 .fa, .version .date { + display: inline-block; + width: 150px; + text-align: right; + margin-right: 20px; + color: $gray-600; + } + h1 { + padding-bottom: 2rem; + margin-left: -170px; + } + .version { padding-top: 2rem; - font-size: 1.8em; + font-size: 1.2em; + margin-left: -170px; + margin-bottom: 20px; + .detail-version { + font-size: 1.4em; + font-weight: bold; + } } h3 { color: $gray-600; -- cgit v1.2.3