<!-- plugins/admin/templates/admin/orphaned_media_list.html -->

{% extends 'core/base.html' %}

{% block title %}Orphaned Media – Admin – Nature In Pots{% endblock %}

{% block content %}
  <h1>Orphaned Media</h1>
  <table class="table">
    <thead>
      <tr>
        <th>ID</th>
        <th>Original URL</th>
        <th>New URL</th>
        <th>Orphaned At</th>
      </tr>
    </thead>
    <tbody>
      {% for m in items %}
      <tr>
        <td>{{ m.id }}</td>
        <td><a href="{{ m.original_file_url }}" target="_blank">{{ m.original_file_url }}</a></td>
        <td><a href="{{ m.file_url }}" target="_blank">{{ m.file_url }}</a></td>
        <td>{{ m.orphaned_at.strftime('%Y-%m-%d %H:%M:%S') }}</td>
      </tr>
      {% else %}
      <tr>
        <td colspan="4" class="text-center">No orphaned media found.</td>
      </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}
