{% extends "mongonaut/base.html" %}
{% load mongonaut_tags %}

{% block breadcrumbs %}
<li><a href="{% url index %}">Mongonaut</a> <span class="divider">/</span></li>
<li><a href="{% url document_list app_label document_name %}">{{ document_name }}s</a> <span class="divider">/</span></li>
<li><a href="">{{ document_name }}</a> <a href="">{{ document.id }}</a></li>
{% endblock %}

{% block content %}

<h1>{{ document_name }} Detail</h1>


<div class="row" >
    <div class="span16" id="document-actions">
        <p>
            {% if has_edit_permission %}            
                <a class="btn small document-action-btn" href="{% url document_detail_edit_form app_label document_name document.id %}">Edit</a>
            {% endif %}
            {% if has_delete_permission %}                        
                <a class="btn small danger document-action-btn" href="#">Delete</a>        
            {% endif %}
        </p>
    </div>
</div>

<div class="row">
    <div class="span16">
        <table class="bordered-table zebra-striped">
            <thead>
                <tr>
                    <th>Key</th>
                    <th>Value</th>                    
                </tr>
            </thead>
            {% for key in keys %}
                <tr>
                    <td>{{ key}}</td>
                    <td>{% get_document_value document key %}</td>                    
                </tr>
            {% endfor %}
        </table>
    </div>
</div>    

{% endblock %}
