{% extends 'material/frontend/base_module.html' %}
{% load i18n material_form material_frontend %}

{% block breadcrumbs_items %}
<a href="{% url view.model|frontend_urlname:'list' %}">{{ view.model|verbose_name_plural|title }}</a>
<a class="active">{{ object }}</a>
{% endblock %}

{% block content %}
<div class="row frontend-form">
    <div class="col s12 m12 l9">
        <div class="card">
            <div class="card-content">
                {% block card %}
                <div class="form-title">{{ view.model|verbose_name|title }}: {{ object }}</div>
                <table class="table bordered">
                    {% for field_name, value in object_data %}
                    <tr>
                        <th>{{ field_name }}</th>
                        <td>{{ value }}</td>
                        {% endfor %}
                    </tr>
                    {% endblock %}
                </table>
            </div>
            <div class="card-action">
                <div class="right-align">
                    {% if delete_url %}<a class="waves-effect waves-light btn red white-text" href="{{ delete_url }}">{% trans 'Delete' %}</a>{% endif %}
                    {% if change_url %}<a class="waves-effect waves-light btn white-text" href="{{ change_url }}">{% trans 'Change' %}</a>{% endif %}
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
