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...">
<table id="profiles" class="table table-bordered table-responsive table-striped tabel-hover">
<thead>
<tr>
<th>URL:</th>
<th>Category:</th>
<th>Added On:</th>
<th>Last Imported/Scaned:</th>
{% if user.is_superuser or user.is_staff %}
<th>Added By</th>
<div class="table-responsive">
<table id="profiles" class="table table-sm table-striped table-bordered table-responsive table-striped tabel-hover text-nowrap">
<thead>
<tr>
<th>URL:<span class="ms-1 text-primary"></span></th>
<th>Category:<span class="ms-1 text-primary"></span></th>
<th>Added On:<span class="ms-1 text-primary"></span></th>
<th>Last Imported/Scaned:<span class="ms-1 text-primary"></span></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 %}
<th>Active</th>
</tr>
</thead>
<tbody>
{% 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>
{% endfor %}
</tbody>
</table>
</div>
<hr class="my-3">