remove if clauses for int and float in edit_book.html

This commit is contained in:
Cervinko Cera 2016-04-20 23:53:55 +02:00
parent 27d5a79efb
commit f57c9c5951
2 changed files with 11 additions and 16 deletions

View File

@ -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

View File

@ -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 %}