diff --git a/cps/db.py b/cps/db.py index 82696768..456713cd 100644 --- a/cps/db.py +++ b/cps/db.py @@ -407,7 +407,7 @@ class AlchemyEncoder(json.JSONEncoder): # ele = None for ele in data: if hasattr(ele, 'value'): # converter for custom_column values - el = [str(ele.value)] + el.append(str(ele.value)) elif ele.get: el.append(ele.get()) else: diff --git a/cps/templates/book_table.html b/cps/templates/book_table.html index 9d5a448a..f3a4ffb9 100644 --- a/cps/templates/book_table.html +++ b/cps/templates/book_table.html @@ -70,7 +70,7 @@ {{c.name}} {% elif c.datatype in ["bool", "datetime", "comments"] %} - {% elif c.datatype == "text" and not c.is_multiple %} + {% elif c.datatype == "text" %} {{ text_table_row('custom_column_' + c.id|string, _('Enter ') + c.name, c.name, false, false) }} {% else %} diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 6dd1c72a..0ecaf903 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -199,6 +199,8 @@ {{column.value|safe}} {% elif c.datatype == 'series' %} {{ '%s [%s]' % (column.value, column.extra|formatfloat(2)) }} + {% elif c.datatype == 'text' %} + {{ column.value.strip() }}{% if not loop.last %}, {% endif %} {% else %} {{ column.value }} {% endif %}