- Catalog functionality integrated into document and document_version views
- small bugfixes and improvements
This commit is contained in:
@@ -177,6 +177,48 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_selectable_sortable_table_with_dict_headers(headers, rows, selectable, id, sort_by, sort_order) %}
|
||||
<div class="card">
|
||||
<div class="table-responsive">
|
||||
<table class="table align-items-center mb-0" id="{{ id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
{% if selectable %}
|
||||
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7">Select</th>
|
||||
{% endif %}
|
||||
{% for header in headers %}
|
||||
<th class="text-uppercase text-secondary text-xxs font-weight-bolder opacity-7 sortable" data-sort="{{ header['sort'] }}">
|
||||
{{ header['text'] }}
|
||||
{% if sort_by == header['sort'] %}
|
||||
{% if sort_order == 'asc' %}
|
||||
<i class="fas fa-sort-up"></i>
|
||||
{% elif sort_order == 'desc' %}
|
||||
<i class="fas fa-sort-down"></i>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<i class="fas fa-sort"></i>
|
||||
{% endif %}
|
||||
</th>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for row in rows %}
|
||||
<tr>
|
||||
{% if selectable %}
|
||||
<td><input type="radio" name="selected_row" value="{{ row[0].value }}"></td>
|
||||
{% endif %}
|
||||
{% for cell in row %}
|
||||
<td>{{ cell.value }}</td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro render_accordion(accordion_id, accordion_items, header_title, header_description) %}
|
||||
<div class="accordion-1">
|
||||
<div class="container">
|
||||
|
||||
Reference in New Issue
Block a user