{% extends current_module.base_template %}
{% 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 %}
{% block left-panel %}
<div class="left-panel">
    <div class="card">
        <div class="card-content">
            {% block card %}
            <div class="card-title">{{ view.model|verbose_name|title }}: {{ object }}</div>
            <table class="table bordered">
                {% for field_name, value in object_data %}
                <tr>
                    <th>{{ field_name }}</th>
                    {% if value.get_absolute_url %}
                    <td><a href="{{ value.get_absolute_url }}">{{ value }}</a></td>
                    {% else %}
                    <td>{{ value }}</td>
                    {% endif %}
                </tr>
                {% endfor %}
            </table>
            {% endblock %}
        </div>
        <div class="card-action">
            <div class="right-align">
                {% block actions_row %}
                {% 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 %}
                {% endblock actions_row %}
            </div>
        </div>
    </div>
</div>
{% endblock left-panel %}
{% block right-panel %}{% endblock right-panel %}
{% endblock %}
