Actualización del 2025-06-15 a las 19:26:12

This commit is contained in:
jlimolina 2025-06-15 19:26:12 +02:00
parent d23754d3b8
commit 603149d47a
9 changed files with 350 additions and 122 deletions

44
templates/urls_list.html Normal file
View file

@ -0,0 +1,44 @@
{% extends "base.html" %}
{% block title %}Gestionar Fuentes URL{% endblock %}
{% block content %}
<div class="feed-detail-card">
<div class="feed-header">
<h2>Fuentes de Noticias URL</h2>
<a href="{{ url_for('add_url_source') }}" class="btn btn-small">Añadir Nueva Fuente URL</a>
</div>
<div class="feed-body">
{% if fuentes %}
<table class="table table-hover">
<thead>
<tr>
<th>Nombre</th>
<th>URL</th>
<th>Categoría</th>
<th>País</th>
<th>Idioma</th>
<th>Acciones</th>
</tr>
</thead>
<tbody>
{% for fuente in fuentes %}
<tr>
<td>{{ fuente.nombre }}</td>
<td><a href="{{ fuente.url }}" target="_blank">{{ fuente.url[:50] }}...</a></td>
<td>{{ fuente.categoria or 'N/A' }}</td>
<td>{{ fuente.pais or 'N/A' }}</td>
<td>{{ fuente.idioma }}</td>
<td>
<a href="{{ url_for('edit_url_source', url_id=fuente.id) }}" class="btn btn-small btn-secondary">Editar</a>
<a href="{{ url_for('delete_url_source', url_id=fuente.id) }}" class="btn btn-small btn-danger" onclick="return confirm('¿Estás seguro de que quieres eliminar esta fuente?');">Eliminar</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p class="text-center text-muted">No hay fuentes URL guardadas. ¡Añade la primera!</p>
{% endif %}
</div>
</div>
{% endblock %}