{% extends "base.html" %}
{% block title %}Category Details{% endblock %}
{% block content %}
<div class="container mt-4">
    <h2>Category Details</h2>
    <table class="table table-bordered">
    <tr><th>ID</th><td>{{ category.id }}</td></tr>
    <tr><th>Name</th><td>{{ category.name }}</td></tr>
    <tr><th>Parent</th><td>{% if category.parent %}{{ category.parent.name|default:category.parent.id }}{% endif %}</td></tr>
    <tr><th>Description</th><td>{{ category.description|safe }}</td></tr>
        <tr><th>Status</th><td>{{ category.status }}</td></tr>
        <tr><th>Trash</th><td>{{ category.trash }}</td></tr>
        <tr><th>Image</th><td>{% if category.image %}<img src="{{ category.image.url }}" width="120">{% endif %}</td></tr>
        <tr><th>Created</th><td>{{ category.created_at }}</td></tr>
        <tr><th>Deleted At</th><td>{{ category.deleted_at }}</td></tr>
    </table>
    <a href="{% url 'category-management' %}" class="btn btn-secondary">Back</a>
    <a href="{% url 'category-edit' category.id %}" class="btn btn-warning">Edit</a>
</div>
{% endblock %}
