Enable custom column datetime (adv. search not working yet) #1984
This commit is contained in:
@@ -149,6 +149,20 @@
|
||||
{% endif %}>
|
||||
{% endif %}
|
||||
|
||||
{% if c.datatype == 'datetime' %}
|
||||
|
||||
<div style="position: relative">
|
||||
<input type="date" class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}"
|
||||
{% if book['custom_column_' ~ c.id]|length > 0 %}
|
||||
value="{% if book['custom_column_' ~ c.id][0].value %}{{ book['custom_column_' ~ c.id][0].value|formatdateinput}}{% endif %}"
|
||||
{% endif %}>
|
||||
<input type="text" class="fake_custom_column_{{ c.id }} form-control fake-input hidden "
|
||||
{% if book['custom_column_' ~ c.id]|length > 0 %}
|
||||
value="{% if book['custom_column_' ~ c.id][0].value %}{{book['custom_column_' ~ c.id][0].value|formatdate}}{% endif %}"
|
||||
{% endif %}>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if c.datatype == 'enumeration' %}
|
||||
<select class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}">
|
||||
|
||||
@@ -193,6 +193,8 @@
|
||||
{% else %}
|
||||
{% if c.datatype == 'float' %}
|
||||
{{ column.value|formatfloat(2) }}
|
||||
{% elif c.datatype == 'datetime' %}
|
||||
{{ column.value|formatdate }}
|
||||
{% else %}
|
||||
{% if c.datatype == 'series' %}
|
||||
{{ '%s [%s]' % (column.value, column.extra|formatfloat(2)) }}
|
||||
|
||||
Reference in New Issue
Block a user