remove if clauses for int and float in edit_book.html

pull/16/head
Cervinko Cera 9 years ago
parent 27d5a79efb
commit f57c9c5951

@ -1,12 +1,12 @@
[General] [General]
DB_ROOT = DB_ROOT = /home/christoph/Calibre-Bibliothek_test
APP_DB_ROOT = APP_DB_ROOT = /home/christoph/computer/calibre-web
MAIN_DIR = MAIN_DIR = /home/christoph/computer/calibre-web
LOG_DIR = LOG_DIR = /home/christoph/computer/calibre-web
PORT = 8083 PORT = 8083
NEWEST_BOOKS = 60 NEWEST_BOOKS = 60
[Advanced] [Advanced]
TITLE_REGEX = ^(A|The|An|Der|Die|Das|Den|Ein|Eine|Einen|Dem|Des|Einem|Eines)\s+ TITLE_REGEX = ^(A|The|An|Der|Die|Das|Den|Ein|Eine|Einen|Dem|Des|Einem|Eines)\s+
DEVELOPMENT = 0 DEVELOPMENT = 1
PUBLIC_REG = 0 PUBLIC_REG = 0
UPLOADING = 0 UPLOADING = 1

@ -67,18 +67,13 @@
</select> </select>
{% endif %} {% endif %}
{% if c.datatype == ('rating' or 'float' or 'int') %} {% if c.datatype == 'rating' %}
<input type="number" <input type="number" min="1" max="5" step="1" class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}"
{% if c.datatype == 'rating'%}
min="1" max="5"
{% endif %}
{% if c.datatype != 'float' %}
step="1"
{% endif %}
class="form-control" name="{{ 'custom_column_' ~ c.id }}" id="{{ 'custom_column_' ~ c.id }}"
{% if book['custom_column_' ~ c.id]|length > 0 %} {% if book['custom_column_' ~ c.id]|length > 0 %}
{% for column in book['custom_column_' ~ c.id] %} {% for column in book['custom_column_' ~ c.id] %}
value="{{ column.value }}{% if not loop.last %}, {% endif %}{% endfor %}"{% endif %}> value="{{ column.value }}{% if not loop.last %}, {% endif %}
{% endfor %}"
{% endif %}>
{% endif %} {% endif %}
</div> </div>
{% endfor %} {% endfor %}

Loading…
Cancel
Save