Add: make tables responsive

This commit is contained in:
Aroy-Art 2024-08-25 10:12:42 +02:00
parent 33007b91b5
commit 4b331ae467
Signed by: Aroy
GPG key ID: DB9689E9391DD156

View file

@ -24,36 +24,38 @@
<input type="text" class="form-control input-group-text my-2" onkeyup="filterTable('profiles', 0, this.value)" placeholder="Search for URLs..."> <input type="text" class="form-control input-group-text my-2" onkeyup="filterTable('profiles', 0, this.value)" placeholder="Search for URLs...">
<table id="profiles" class="table table-bordered table-responsive table-striped tabel-hover"> <div class="table-responsive">
<thead> <table id="profiles" class="table table-sm table-striped table-bordered table-responsive table-striped tabel-hover text-nowrap">
<tr> <thead>
<th>URL:</th> <tr>
<th>Category:</th> <th>URL:<span class="ms-1 text-primary"></span></th>
<th>Added On:</th> <th>Category:<span class="ms-1 text-primary"></span></th>
<th>Last Imported/Scaned:</th> <th>Added On:<span class="ms-1 text-primary"></span></th>
{% if user.is_superuser or user.is_staff %} <th>Last Imported/Scaned:<span class="ms-1 text-primary"></span></th>
<th>Added By</th> {% if user.is_superuser or user.is_staff %}
<th>Added By:<span class="ms-1 text-primary"></span></th>
{% endif %}
<th>Active:<span class="ms-1 text-primary"></span></th>
</tr>
</thead>
<tbody>
{% for url in SourceURLs %}
{% if url.source_type == "C" %}
<tr id="C-{{ url.pk }}">
<td>{{ url.url }}</td>
<td>{{ url.category }}</td>
<td data-timestamp="{{ url.date_added|date:'U' }}">{{ url.date_added|date:'Y-m-d H:i' }}</td>
<td data-timestamp="{{ url.last_imported|date:'U' }}">{{ url.last_imported|date:'Y-m-d H:i' }}</td>
{% if user.is_superuser or user.is_staff %}
<td>{{ url.added_by_user|capfirst }}</td>
{% endif %}
<td>{{ url.active }}</td>
</tr>
{% endif %} {% endif %}
<th>Active</th> {% endfor %}
</tr> </tbody>
</thead> </table>
<tbody> </div>
{% for url in SourceURLs %}
{% if url.source_type == "C" %}
<tr>
<td>{{ url.url }}</td>
<td>{{ url.category }}</td>
<td>{{ url.date_added|date:'Y-m-d H:i' }}</td>
<td>{{ url.last_imported|date:'Y-m-d H:i' }}</td>
{% if user.is_superuser or user.is_staff %}
<td>{{ url.added_by_user|capfirst }}</td>
{% endif %}
<td>{{ url.active }}</td>
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
<hr class="my-3"> <hr class="my-3">