diff options
5 files changed, 21 insertions, 7 deletions
| diff --git a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html index c748b1530..68627d57a 100644 --- a/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html +++ b/archaeological_operations/templates/ishtar/blocks/window_tables/parcels.html @@ -1,4 +1,4 @@ -{% load i18n %} +{% load i18n l10n %}  <h3>{{ parcels_label }}</h3>  <table class="table table-striped">    <thead> @@ -15,9 +15,9 @@    {% for parcel in item.parcels.all %}    <tr>      <td class='string'>{{parcel.town}}</td> -    <td>{{parcel.year|default_if_none:"-"}}</td> +    <td>{{parcel.year|default_if_none:"-"|unlocalize}}</td>      <td>{{parcel.section|default_if_none:"-"}}</td> -    <td>{{parcel.parcel_number|default_if_none:"-"}}</td> +    <td>{{parcel.parcel_number|default_if_none:"-"|unlocalize}}</td>      <td>{{parcel.address|default_if_none:"-"}}</td>      {#<td class='string'>{{operation.parcel.owner}}</td>#}    </tr> diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index d045ac087..27fd43178 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -4,6 +4,10 @@ v4.0.51 - 2099-07-03  ### Features/improvements ###  - sheet: add a refresh button to update informations +### Bug fixes ### +- fix parcel table - wizard summary (inappropriate l10n) + +  v4.0.50 - 2023-07-03  -------------------- @@ -26,7 +30,6 @@ v4.0.49 - 2023-06-21  - improve changelog display  - Sheet: display spatial reference system with coordinates of points -  ### Technical ###  - JS: fix TrackPositionControl with https diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 794b328aa..4e16e2975 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -4,6 +4,9 @@ v4.0.51 - 2099-07-03  ### Fonctionnalités/améliorations ###  - fiche : ajouter un bouton de rafraîchissement pour mettre à jour les informations +### Corrections de dysfonctionnements ### +- correction de l'affichage des parcelles et du résumé du `wizard` (localisation inappropriée) +  v4.0.50 - 2023-07-03  -------------------- diff --git a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html index 56887d28b..e4fd739f6 100644 --- a/ishtar_common/templates/ishtar/wizard/confirm_wizard.html +++ b/ishtar_common/templates/ishtar/wizard/confirm_wizard.html @@ -1,6 +1,5 @@  {% extends "base.html" %} -{% load i18n %} -{% load range %} +{% load ishtar_helpers i18n l10n range %}  {% block content %}  <h2>{{wizard_label}}</h2> @@ -26,7 +25,7 @@      <div class="card-body form-row">        <table class='table'>          {% for data in form_data %} -        <tr{% if data.2 %} class='{{data.2}}'{%endif%}><th>{{data.0}}</th><td>{{data.1}}</td></tr> +        <tr{% if data.2 %} class='{{data.2}}'{%endif%}><th>{{data.0}}</th><td>{% if data.1|is_numeric %}{{data.1|unlocalize}}{% else %}{{data.1}}{% endif %}</td></tr>          {% endfor %}        </table> diff --git a/ishtar_common/templatetags/ishtar_helpers.py b/ishtar_common/templatetags/ishtar_helpers.py index f5946a9ea..28c70de0f 100644 --- a/ishtar_common/templatetags/ishtar_helpers.py +++ b/ishtar_common/templatetags/ishtar_helpers.py @@ -8,6 +8,15 @@ from django.utils.safestring import mark_safe  register = Library() +@register.filter() +def is_numeric(value): +    if isinstance(value, (int, float)): +        return True +    elif not isinstance(value, str): +        return False +    return value.isdigit() + +  @register.filter  def bs_field(input_field):      input_field = str(input_field) | 
