Refactor inventory and worklog templates for improved rendering and pagination; enhance table display with better responsiveness and usability
This commit is contained in:
parent
bdd2a43c8b
commit
b68c25a05a
8 changed files with 48 additions and 184 deletions
|
@ -83,45 +83,17 @@ breadcrumbs=[
|
|||
{% if inventory_rows %}
|
||||
<div class="col{% if user.worklog_rows %}-6{% endif %}">
|
||||
<div class="row">
|
||||
{{ tables.render_table(inventory_headers, inventory_rows, 'inventory_item', title='Assets') }}
|
||||
{{ tables.render_table(inventory_headers, inventory_rows, 'inventory_item', title='Assets', per_page=8) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if worklog_rows %}
|
||||
<div class="col{% if user.inventory_rows %}-6{% endif %}">
|
||||
<div class="row">
|
||||
{{ tables.render_table(worklog_headers, worklog_rows, 'worklog_entry', title='Work Done') }}
|
||||
{{ tables.render_table(worklog_headers, worklog_rows, 'worklog_entry', title='Work Done', per_page=8) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
{% if inventory_pagination['total_pages'] > 1 %}
|
||||
<div class="col-6">
|
||||
{{ tables.render_pagination(
|
||||
page=inventory_pagination['page'],
|
||||
has_prev=inventory_pagination['has_prev'],
|
||||
has_next=inventory_pagination['has_next'],
|
||||
total_pages=inventory_pagination['total_pages'],
|
||||
endpoint='main.user',
|
||||
page_variable='asset_page',
|
||||
extra_args={'id': user.id, 'worklog_page': worklog_page}
|
||||
) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if worklog_pagination['total_pages'] > 1 %}
|
||||
<div class="col-6">
|
||||
{{ tables.render_pagination(
|
||||
page=worklog_pagination['page'],
|
||||
has_prev=worklog_pagination['has_prev'],
|
||||
has_next=worklog_pagination['has_next'],
|
||||
total_pages=worklog_pagination['total_pages'],
|
||||
endpoint='main.user',
|
||||
page_variable='worklog_page',
|
||||
extra_args={'id': user.id, 'worklog_page': worklog_page}
|
||||
) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue