Amélioration du formulaire de fonctions
This commit is contained in:
parent
7a8efb8ed7
commit
30c8811b05
@ -167,14 +167,20 @@ class FixDuplicates(Form):
|
|||||||
for i, e in enumerate(events):
|
for i, e in enumerate(events):
|
||||||
if e.status != Event.STATUS.TRASH:
|
if e.status != Event.STATUS.TRASH:
|
||||||
il = auc[i]
|
il = auc[i]
|
||||||
|
msg = ""
|
||||||
|
if e.modified():
|
||||||
|
msg = _(" (locally modified version)")
|
||||||
choices += [
|
choices += [
|
||||||
(
|
(
|
||||||
"Select" + il,
|
"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 += [
|
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):
|
for i, e in enumerate(events):
|
||||||
if e.status != Event.STATUS.TRASH:
|
if e.status != Event.STATUS.TRASH:
|
||||||
@ -182,9 +188,9 @@ class FixDuplicates(Form):
|
|||||||
choices += [
|
choices += [
|
||||||
(
|
(
|
||||||
"Remove" + il,
|
"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
|
self.fields["action"].choices = choices
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@
|
|||||||
{% if e.imported_date %}<li>Dernière importation : {{ e.imported_date }}</li>{% endif %}
|
{% if e.imported_date %}<li>Dernière importation : {{ e.imported_date }}</li>{% endif %}
|
||||||
<li>État :
|
<li>État :
|
||||||
{% if e.pure_import %}version fidèle à la source importée{% endif %}
|
{% 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>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user