{% extends "dashboard.html" %}
{% load static %}

{% block content %}
<article>
    <header class="object__header">
        <h1><img src="{% static "images/cubes.png" %}" alt=""> Product</h1>
        <a href="edit" class="action-button">Edit</a>
    </header>
    <section class="product__detail">
        <figure class="product__figure">
            <img class="" src="{{product.productphoto_set.first.image.url}}" alt="{{product.productphoto_set.first.image}}">
        </figure>
        <div>
            <h1>{{product.name}}</h1>
            <p>{{product.description}}</p>
            <p>$<strong>{{product.price}}</strong></p>
            <p>{{product.weight.oz}} oz</p>
            <p>Visible in listings: <strong>{{product.visible_in_listings|yesno:"Yes,No"}}</strong></p>
            <p>Ordered {{product.num_ordered|default_if_none:"0"}} time{{ product.num_ordered|pluralize }}.</p>
        </div>
    </section>
</article>
{% endblock content %}
