mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-18 14:10:30 +00:00
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
|
# ele = None
|
||||||
for ele in data:
|
for ele in data:
|
||||||
if hasattr(ele, 'value'): # converter for custom_column values
|
if hasattr(ele, 'value'): # converter for custom_column values
|
||||||
el = [str(ele.value)]
|
el.append(str(ele.value))
|
||||||
elif ele.get:
|
elif ele.get:
|
||||||
el.append(ele.get())
|
el.append(ele.get())
|
||||||
else:
|
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>
|
<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"] %}
|
{% elif c.datatype in ["bool", "datetime", "comments"] %}
|
||||||
<!-- missing -->
|
<!-- 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) }}
|
{{ text_table_row('custom_column_' + c.id|string, _('Enter ') + c.name, c.name, false, false) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
<!--{{ text_table_row('custom_column_' + c.id|string, _('Enter ') + c.name, c.name, false, false) }} -->
|
<!--{{ text_table_row('custom_column_' + c.id|string, _('Enter ') + c.name, c.name, false, false) }} -->
|
||||||
|
@ -199,6 +199,8 @@
|
|||||||
{{column.value|safe}}
|
{{column.value|safe}}
|
||||||
{% elif c.datatype == 'series' %}
|
{% elif c.datatype == 'series' %}
|
||||||
{{ '%s [%s]' % (column.value, column.extra|formatfloat(2)) }}
|
{{ '%s [%s]' % (column.value, column.extra|formatfloat(2)) }}
|
||||||
|
{% elif c.datatype == 'text' %}
|
||||||
|
{{ column.value.strip() }}{% if not loop.last %}, {% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ column.value }}
|
{{ column.value }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Loading…
Reference in New Issue
Block a user