Refactor templates and utility functions for improved rendering and usability; enhance icon usage and link handling in various templates
This commit is contained in:
parent
b68c25a05a
commit
3915b97231
12 changed files with 102 additions and 90 deletions
|
@ -35,16 +35,7 @@ breadcrumbs=[
|
|||
<label for="supervisor" class="form-label">
|
||||
Supervisor
|
||||
{% if user.supervisor %}
|
||||
<a href="{{ url_for('main.user', id=user.supervisor_id) }}"
|
||||
class="link-success link-underline-opacity-0">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="currentColor"
|
||||
class="bi bi-box-arrow-up-right" viewBox="0 0 16 16">
|
||||
<path fill-rule="evenodd"
|
||||
d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5" />
|
||||
<path fill-rule="evenodd"
|
||||
d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z" />
|
||||
</svg>
|
||||
</a>
|
||||
{{ links.entry_link('user', user.supervisor_id) }}
|
||||
{% endif %}
|
||||
</label>
|
||||
<select class="form-select" id="supervisor" name="supervisor"
|
||||
|
@ -81,16 +72,16 @@ breadcrumbs=[
|
|||
</form>
|
||||
<div class="row mt-3">
|
||||
{% if inventory_rows %}
|
||||
<div class="col{% if user.worklog_rows %}-6{% endif %}">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
{{ tables.render_table(inventory_headers, inventory_rows, 'inventory_item', title='Assets', per_page=8) }}
|
||||
{{ tables.render_table(headers=inventory_headers, rows=inventory_rows, id='assets', entry_route='inventory_item', title='Assets', per_page=8) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if worklog_rows %}
|
||||
<div class="col{% if user.inventory_rows %}-6{% endif %}">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
{{ tables.render_table(worklog_headers, worklog_rows, 'worklog_entry', title='Work Done', per_page=8) }}
|
||||
{{ tables.render_table(headers=worklog_headers, rows=worklog_rows, id='worklog', entry_route='worklog_entry', title='Work Done', per_page=8) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue