summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-06-22 10:10:38 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-06-23 14:11:07 +0200
commitb44ba889595002e7e902e01e2f6aa8006255c411 (patch)
tree8b84f547701702fddad181f36f5644da22616827
parent2f6edc5c331bc12a0b435ca01f3d1534dd6311d3 (diff)
downloadIshtar-b44ba889595002e7e902e01e2f6aa8006255c411.tar.bz2
Ishtar-b44ba889595002e7e902e01e2f6aa8006255c411.zip
📝 update architecture graph - fix migration instruction
-rw-r--r--changelog/en/changelog_2022-06-15.md3
-rw-r--r--changelog/fr/changelog_2023-01-25.md3
-rw-r--r--docs/fr/source/_static/graphique_structure_ishtar.pngbin223051 -> 240291 bytes
-rw-r--r--docs/fr/source/installation.rst2
-rw-r--r--docs/fr/source/media-src/graphique_structure_ishtar.dot5
-rw-r--r--ishtar_common/templates/ishtar/changelog.html2
-rw-r--r--ishtar_common/views.py24
-rw-r--r--scss/custom.scss22
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
--- a/docs/fr/source/_static/graphique_structure_ishtar.png
+++ b/docs/fr/source/_static/graphique_structure_ishtar.png
Binary files 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<br/>géographiques >];
AdminAct [label=< Acte<br/>administratif >];
Town [label="Commune"];
- Area [label="Zone"];
+ Area [label=< Zone<br/>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 %}
<div class="container changelog">
- <h1>{% trans "Changelog" %}</h1>
+ <h1><i class="fa fa-code-fork" aria-hidden="true"></i>{% trans "Changelog" %}</h1>
{% if next %}
<div class="text-center">
<a class="btn btn-info" href="{% url 'changelog' next %}">{% trans "Next" %}</a>
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"<h2>(.*) - (\d{4})-(\d{2})-(\d{2})</h2>")
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
+ # <h2>v4.0.42 - 2023-01-25</h2>
+ 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"<div id='{version}' class='version'>"
+ changelog_full += f"<span class='date'>{human_date(d)}</span>"
+ changelog_full += f"<span class='detail-version'>{version}</span></div>"
+ 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;