diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-10-28 21:32:30 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-10-28 21:32:30 +0100 |
commit | d71150129e1189f57d146b31b1042d43ea66083f (patch) | |
tree | af6cbbeb81036c1e20a188359cffd5d9b63debaf /archaeological_finds | |
parent | 08e1df4d3a049ed300fa87712fc60a0ec96b26cf (diff) | |
download | Ishtar-d71150129e1189f57d146b31b1042d43ea66083f.tar.bz2 Ishtar-d71150129e1189f57d146b31b1042d43ea66083f.zip |
Display a reminder of items concerned by the current edition (refs #1218)
Diffstat (limited to 'archaeological_finds')
-rw-r--r-- | archaeological_finds/wizards.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/archaeological_finds/wizards.py b/archaeological_finds/wizards.py index de16d2069..e5024f10e 100644 --- a/archaeological_finds/wizards.py +++ b/archaeological_finds/wizards.py @@ -50,25 +50,16 @@ class FindWizard(Wizard): if base_finds: return base_finds[0].context_record - #def get_template_context(self, request, storage, form=None): def get_context_data(self, form, **kwargs): """ Get the operation and context record "reminder" on top of wizard forms """ context = super(FindWizard, self).get_context_data(form, **kwargs) current_cr = self.get_current_contextrecord() - if not current_cr: + if not current_cr or self.steps.current.startswith('select-'): return context - operation = current_cr.operation - items = [] - if hasattr(operation, 'code_patriarche') and operation.code_patriarche: - items.append(unicode(operation.code_patriarche)) - items.append("-".join((unicode(operation.year), - unicode(operation.operation_code)))) - reminder = unicode(_("Current operation: ")) + u" - ".join(items) - reminder += u"<br/>" + unicode(_("Current context record: "))\ - + unicode(current_cr.label) - context['reminder'] = mark_safe(reminder) + context['reminders'] = ((_("Operation"), unicode(current_cr.operation)), + (_(u"Context record"), unicode(current_cr))) return context def get_extra_model(self, dct, form_list): |