renamed id_name_form to edit_id_name, then made show_id_name and used it for all appropriate classes. Shaved about 150 LOC / removed 5 x duplication of code :)

This commit is contained in:
2020-11-18 12:30:23 +11:00
parent 3f33e7f10d
commit 296ef4c1f7
14 changed files with 17 additions and 91 deletions

View File

@@ -0,0 +1,15 @@
{% extends "base.html" %}
{% block main_content %}
<h3>{{page_title}}</h3>
<table id="book_table" class="table table-striped table-sm" data-toolbar="#toolbar" data-search="true">
<thead>
<tr class="thead-light"><th>Name</th></tr>
</thead>
<tbody>
{% for obj in objects %}
<tr><td data-sort="{{obj.id}}"><a href="{{url_for(url_base, id=obj.id )}}">{{obj.name}}</a></td></tr>
{% endfor %}
</tbody>
</table>
{% endblock main_content %}