removed all refs to genre_lst, made genre table confirm to id, name, added classes/routes for genre*, tweaked book format to accommodate multiple authors, etc. still 1-line, but with 12 / num of <authors, etc.> col wide form-controls
This commit is contained in:
@@ -9,12 +9,12 @@
|
||||
<div class="input-group input-group-lg">
|
||||
<label for="{{key}}" class="col-lg-2 col-form-label">{{key}}:</label>
|
||||
<div class="col-lg-10">
|
||||
<div class="row">
|
||||
{% if books[key] is iterable and books[key] is not string %}
|
||||
{% set cnt = namespace(idx=0, val=0) %}
|
||||
{% for objects in books[key] %}
|
||||
{% set cnt.val = 0 %}
|
||||
{% set str = namespace(val="") %}
|
||||
<span class="form-control-plaintext" id="{{key}}">
|
||||
{% for attr in objects %}
|
||||
{% if attr != "id" %}
|
||||
{% if cnt.val > 0 %}
|
||||
@@ -25,12 +25,12 @@
|
||||
{% set cnt.val = cnt.val + 1 %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if key != "genre" %}
|
||||
<a href="{{url_for(key, id=books[key][cnt.idx].id)}}">{{str.val}}</a>
|
||||
{% endif %}
|
||||
<span class="form-control col-lg-{{((12/books[key]|length)|int)}}" id="{{key}}-{{books[key][cnt.idx].id}}">
|
||||
<a href="{{url_for(key, id=books[key][cnt.idx].id)}}">{{str.val}}</a>
|
||||
</span>
|
||||
{% set cnt.idx = cnt.idx+1 %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</table>
|
||||
{% else %}
|
||||
{% if key == "notes" or key == "blurb" %}
|
||||
|
||||
Reference in New Issue
Block a user