44 lines
1.3 KiB
HTML

{% extends 'dashboard.html' %}
{% load static %}
{% block head_title %}{{ customer.get_full_name }} | {% endblock %}
{% block content %}
<article>
<p>
<a href="{% url 'dashboard:customer-list' %}">&larr; Back to customers</a>
</p>
<header class="object-header">
<h1><img src="{% static "images/customer.png" %}"> Customer: {{customer.get_full_name}}</h1>
{% if perms.core.change_customer %}
<a href="{% url 'dashboard:customer-update' customer.pk %}" class="btn">Edit</a>
{% endif %}
</header>
<section class="panel">
<header class="panel-header">
<h4>Details</h4>
</header>
<dl class="panel-datalist">
<dt>Email address</dt>
<dd>
<a href="mailto:{{ customer.email }}">{{ customer.email }} &nearr;</a>
</dd>
<dt>Shipping address</dt>
<dd>
{% include 'dashboard/partials/_address.html' with full_name=customer.get_full_name address=customer %}
</dd>
</dl>
</section>
<section class="panel">
<header class="panel-header">
<h4>Orders</h4>
</header>
<table>
{% include 'dashboard/order/_table.html' with order_list=customer.orders.all %}
</table>
</section>
</article>
{% endblock content %}