cleanup, and dont need to calculate 12/cols, just use col
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
|
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
|
||||||
<div class="col-lg-10">
|
<div class="col-lg-10">
|
||||||
{% if books[key] is iterable and books[key] is not string %}
|
{% if books[key] is iterable and books[key] is not string %}
|
||||||
<div class="row" style="margin-left:0px; margin-right:0px;">
|
<div class="form-row" style="margin-left:0px; margin-right:0px;">
|
||||||
{% set cnt = namespace(idx=0, val=0) %}
|
{% set cnt = namespace(idx=0, val=0) %}
|
||||||
{% for objects in books[key] %}
|
{% for objects in books[key] %}
|
||||||
{% set cnt.val = 0 %}
|
{% set cnt.val = 0 %}
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
{% set cnt.val = cnt.val + 1 %}
|
{% set cnt.val = cnt.val + 1 %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<span class="form-control col-lg-{{((12/books[key]|length)|int)}}" id="{{key}}-{{books[key][cnt.idx].id}}">
|
<span class="form-control col" id="{{key}}[{{cnt.idx}}]">
|
||||||
<a href="{{url_for(key, id=books[key][cnt.idx].id)}}">{{str.val}}</a>
|
<a href="{{url_for(key, id=books[key][cnt.idx].id)}}">{{str.val}}</a>
|
||||||
</span>
|
</span>
|
||||||
{% set cnt.idx = cnt.idx+1 %}
|
{% set cnt.idx = cnt.idx+1 %}
|
||||||
|
|||||||
Reference in New Issue
Block a user