mirror of
				https://github.com/janeczku/calibre-web
				synced 2025-10-31 15:23:02 +00:00 
			
		
		
		
	Enabed edit of custom texts (including categories) in books list
This commit is contained in:
		| @@ -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 %} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Ozzie Isaacs
					Ozzie Isaacs