From 0ddb5eebb995670e7621d6a52dae69bc8d96547a Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 23 Jan 2019 14:55:47 +0100 Subject: Map: basic management of map tab --- ishtar_common/widgets.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ishtar_common/widgets.py') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index a1d9aeec6..cc4f5c8e8 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -953,7 +953,7 @@ class DataTable(Select2Media, forms.RadioSelect): table_cols='TABLE_COLS', multiple=False, multiple_cols=[2], new=False, new_message="", source_full=None, multiple_select=False, sortname="__default__", - col_prefix='', gallery=False): + col_prefix='', gallery=False, map=False): """ DataTable widget init. @@ -971,6 +971,7 @@ class DataTable(Select2Media, forms.RadioSelect): :param sortname: column name (model attribute) to use to sort :param col_prefix: prefix to remove to col_names :param gallery: display the gallery if True + :param map: display the map if True """ super(DataTable, self).__init__(attrs=attrs) self.source = source @@ -989,6 +990,7 @@ class DataTable(Select2Media, forms.RadioSelect): self.col_prefix = col_prefix self.user = None self.gallery = gallery + self.map = map if self.col_prefix and not self.col_prefix.endswith('__'): self.col_prefix += "__" @@ -1111,6 +1113,7 @@ class DataTable(Select2Media, forms.RadioSelect): 'remove': unicode(_(u"Remove")), 'sname': name.replace('-', ''), 'gallery': self.gallery, + 'use_map': self.map, 'multiple': self.multiple, 'multiple_select': self.multiple_select, 'multi_cols': ",".join((u'"%d"' % col -- cgit v1.2.3