diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-01-23 14:55:47 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:56 +0200 |
commit | 3acc28f00c3624b8ec0619a05d3963f4753e9e5b (patch) | |
tree | 4e5f704852fc49e2b4963e6b8e255aed8b59e99e /ishtar_common/widgets.py | |
parent | 3df913de67c8ec3021e0a215a59b4ab272bd494d (diff) | |
download | Ishtar-3acc28f00c3624b8ec0619a05d3963f4753e9e5b.tar.bz2 Ishtar-3acc28f00c3624b8ec0619a05d3963f4753e9e5b.zip |
Map: basic management of map tab
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r-- | ishtar_common/widgets.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 |