{% extends 'userapp/base.html' %}
{% block content %}
<h3>Welcome, {{ user.username }}</h3>
<a href="{% url 'create_resume' %}" class="btn btn-primary my-3">+ Create Resume</a>

<h4>Your Resumes</h4>
<table class="table table-striped">
  <thead>
    <tr>
      <th>Full Name</th>
      <th>Email</th>
      <th>Template</th>
      <th>Actions</th>
    </tr>
  </thead>
  <tbody>
    {% for resume in resumes %}
    <tr>
      <td>{{ resume.full_name }}</td>
      <td>{{ resume.email }}</td>
      <td>{{ resume.template_choice }}</td>
      <td>
        <a href="{% url 'resume_detail' resume.pk %}" class="btn btn-info btn-sm">View</a>
        <a href="{% url 'delete_resume' resume.pk %}" class="btn btn-danger btn-sm">Delete</a>
      </td>
    </tr>
    {% empty %}
    <tr><td colspan="4">No resumes yet.</td></tr>
    {% endfor %}
  </tbody>
</table>
{% endblock %}
