diff options
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 5853c9675..aee4eb95d 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=''): +                 col_prefix='', gallery=False):          """          DataTable widget init. @@ -970,6 +970,7 @@ class DataTable(Select2Media, forms.RadioSelect):          :param multiple_select: select multiple is available          :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          """          super(DataTable, self).__init__(attrs=attrs)          self.source = source @@ -987,6 +988,7 @@ class DataTable(Select2Media, forms.RadioSelect):          self.sortname = sortname          self.col_prefix = col_prefix          self.user = None +        self.gallery = gallery          if self.col_prefix and not self.col_prefix.endswith('__'):              self.col_prefix += "__" @@ -1105,6 +1107,7 @@ class DataTable(Select2Media, forms.RadioSelect):                      'loading': unicode(_("Loading...")),                      'remove': unicode(_(u"Remove")),                      'sname': name.replace('-', ''), +                    'gallery': self.gallery,                      'multiple': self.multiple,                      'multiple_select': self.multiple_select,                      'multi_cols': ",".join((u'"%d"' % col  | 
