diff options
| -rw-r--r-- | changelog/en/changelog_2022-06-15.md | 3 | ||||
| -rw-r--r-- | changelog/fr/changelog_2023-01-25.md | 3 | ||||
| -rw-r--r-- | docs/fr/source/_static/graphique_structure_ishtar.png | bin | 223051 -> 240291 bytes | |||
| -rw-r--r-- | docs/fr/source/installation.rst | 2 | ||||
| -rw-r--r-- | docs/fr/source/media-src/graphique_structure_ishtar.dot | 5 | ||||
| -rw-r--r-- | ishtar_common/templates/ishtar/changelog.html | 2 | ||||
| -rw-r--r-- | ishtar_common/views.py | 24 | ||||
| -rw-r--r-- | 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.pngBinary files differ index 0c20d83e4..9d87ff769 100644 --- a/docs/fr/source/_static/graphique_structure_ishtar.png +++ b/docs/fr/source/_static/graphique_structure_ishtar.png 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; | 
