2024-08-22 22:24:13 +02:00
|
|
|
{% extends "layouts/base-electric.html" %}
|
|
|
|
|
|
|
|
{% load static %}
|
|
|
|
|
|
|
|
{% block title %} Source URLs | Importer {% endblock title %}
|
|
|
|
|
|
|
|
{% block stylesheets %}{% endblock stylesheets %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
|
|
|
|
{% include "includes/navigation-transparent.html" %}
|
|
|
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="row row-gap-3">
|
|
|
|
|
|
|
|
<div class="col">
|
|
|
|
<div class="e-container-border e-container-radius">
|
|
|
|
<div class="e-container e-container-radius p-2 pt-3 mb-3">
|
|
|
|
<h1 class="text-center">Source URLs</h1>
|
|
|
|
|
|
|
|
{% include "importer/partials/tabnavbar.html" %}
|
|
|
|
|
|
|
|
<h3>Complete Profiles/Galleries</h3>
|
|
|
|
|
|
|
|
<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>
|
|
|
|
{% 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>
|
|
|
|
|
|
|
|
<hr class="my-3">
|
|
|
|
|
|
|
|
<h3>Single Posts</h3>
|
|
|
|
|
|
|
|
<input type="text" class="form-control input-group-text my-2" onkeyup="filterTable('posts', 0, this.value)" placeholder="Search for URLs...">
|
|
|
|
|
|
|
|
<table id="posts" 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>
|
|
|
|
{% endif %}
|
|
|
|
<th>Active</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{% for url in SourceURLs %}
|
|
|
|
{% if url.source_type == "P" %}
|
|
|
|
<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>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-08-24 09:55:53 +02:00
|
|
|
<script>
|
|
|
|
function filterTable(tableId, columnIndex, input) {
|
|
|
|
console.log(tableId, columnIndex, input.value);
|
|
|
|
// Declare variables
|
|
|
|
var filter = input.toUpperCase();
|
|
|
|
var table = document.getElementById(tableId);
|
|
|
|
var rows = table.getElementsByTagName("tr");
|
|
|
|
|
|
|
|
// Loop through all table rows, and hide those who don't match the search query
|
|
|
|
for (var i = 0; i < rows.length; i++) {
|
|
|
|
var cells = rows[i].getElementsByTagName("td");
|
|
|
|
if (cells.length) {
|
|
|
|
var txtValue = cells[columnIndex].textContent || cells[columnIndex].innerText;
|
|
|
|
if (txtValue.toUpperCase().indexOf(filter) > -1) {
|
|
|
|
rows[i].style.display = "";
|
|
|
|
} else {
|
|
|
|
rows[i].style.display = "none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2024-08-22 22:24:13 +02:00
|
|
|
{% endblock content %}
|