diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 5cf9d5e2..3fa85b52 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -66,7 +66,11 @@ {% if entry['custom_column_' ~ c.id]|length > 0 %} {{ c.name }}: {% for column in entry['custom_column_' ~ c.id] %} - {{ column.value }} + {% if c.datatype == 'rating' %} + {{ '%d' % (column.value / 2) }} + {% else %} + {{ '%d' % (column.value / 2) }} + {% endif %} {% endfor %}
{% endif %} diff --git a/cps/templates/edit_book.html b/cps/templates/edit_book.html index 7b74d7e2..b553db18 100644 --- a/cps/templates/edit_book.html +++ b/cps/templates/edit_book.html @@ -70,7 +70,7 @@ {% if c.datatype == 'rating' %} 0 %} - value="{{ book['custom_column_' ~ c.id][0].value / 2 }}" + value="{{ '%d' % (book['custom_column_' ~ c.id][0].value / 2) }}" {% endif %}> {% endif %}