Enabed edit of custom texts (including categories) in books list
This commit is contained in:
parent
24a2c0a5cf
commit
708861bcd5
|
@ -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:
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<th data-field="custom_column_{{ c.id|string }}" id="custom_column_{{ c.id|string }}" data-visible="{{visiblility.get('custom_column_'+ c.id|string)}}" data-sortable="false" {% if g.user.role_edit() %} data-editable-type="select" data-editable-source={{ url_for('editbook.table_get_custom_enum', c_id=c.id) }} data-editable-url="{{ url_for('editbook.edit_list_book', param='custom_column_'+ c.id|string)}}" data-edit="true" data-editable-title="{{_('Enter ') + c.name}}"{% endif %}>{{c.name}}</th>
|
||||
{% elif c.datatype in ["bool", "datetime", "comments"] %}
|
||||
<!-- missing -->
|
||||
{% 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 %}
|
||||
<!--{{ text_table_row('custom_column_' + c.id|string, _('Enter ') + c.name, c.name, false, false) }} -->
|
||||
|
|
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user