Amélioration du formulaire de fonctions

This commit is contained in:
Jean-Marie Favreau 2024-11-09 11:33:33 +01:00
parent 7a8efb8ed7
commit 30c8811b05
3 changed files with 265 additions and 240 deletions

View File

@ -167,14 +167,20 @@ class FixDuplicates(Form):
for i, e in enumerate(events):
if e.status != Event.STATUS.TRASH:
il = auc[i]
msg = ""
if e.modified():
msg = _(" (locally modified version)")
choices += [
(
"Select" + il,
_("These inputs represent the same event, and {} is selected as the representative version.").format(il)
_("Select {} as representative version.").format(il + msg)
)
]
extra = ""
if len([e for e in events if e.modified()]) != 0:
extra = _(" Warning: a version is already locally modified.")
choices += [
("Merge", _("These entries represent the same event, and a new one is created by merging them."))
("Merge", _("Create a new version by merging.") + extra)
]
for i, e in enumerate(events):
if e.status != Event.STATUS.TRASH:
@ -182,9 +188,9 @@ class FixDuplicates(Form):
choices += [
(
"Remove" + il,
_("event {} is different from the others, we make it independent").format(il))
_("Make {} independent.").format(il))
]
choices += [("NotDuplicates", _("These events are all different, so we make them independent."))]
choices += [("NotDuplicates", _("Make all versions independent."))]
self.fields["action"].choices = choices

File diff suppressed because it is too large Load Diff

View File

@ -14,7 +14,7 @@
{% if e.imported_date %}<li>Dernière importation&nbsp;: {{ e.imported_date }}</li>{% endif %}
<li>État&nbsp;:
{% if e.pure_import %}version fidèle à la source importée{% endif %}
{% if e.modified %}version modifiée localement{% endif %}
{% if e.modified %}<strong>version modifiée localement</strong>{% endif %}
</li>
</ul>
</div>