{% extends "name/base.html" %}
{% block title %}{{ name_app_title }}{% endblock %}
{% load humanize %}
{% load name_extras %}

{%  block head-extra %}
    <link rel="canonical" href="{% absolute_url "name:landing" %}">
{% endblock head-extra %}

{% block content %}
    <div class="row">
        <div class="col-sm-12">
            <div class="jumbotron">
                <h1>{{ name_app_title }}</h1>
                <p>is for reference, disambiguation and storage of name records.</p>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <table class="table">
                <caption>Total Record Count</caption>
                {% if counts.personal > 0 %}
                    <tr>
                        <th>Personal Names:</th>
                        <td>
                            <a href="{% url "name:search" %}?q_type=Personal&amp;q=">{{ counts.personal|intcomma }}</a>
                        </td>
                    </tr>
                {% endif %}
                {% if counts.organization > 0 %}
                    <tr>
                        <th>Organization Names:</th>
                        <td>
                            <a href="{% url "name:search" %}?q_type=Organization&amp;q">{{ counts.organization|intcomma }}</a>
                        </td>
                    </tr>
                {% endif %}
                {% if counts.event > 0 %}
                    <tr>
                        <th>Event Names:</th>
                        <td>
                            <a href="{% url "name:search" %}?q_type=Event&amp;q=">{{ counts.event|intcomma }}</a>
                        </td>
                    </tr>
                {% endif %}
                {% if counts.software > 0 %}
                    <tr>
                        <th>Software Names:</th>
                        <td>
                            <a href="{% url "name:search" %}?q_type=Software&amp;q=">{{ counts.software|intcomma }}</a>
                        </td>
                    </tr>
                {% endif %}
                {% if counts.building > 0 %}
                    <tr>
                        <th>Building Names:</th>
                        <td>
                            <a href="{% url "name:search" %}?q_type=Building&amp;q=">{{ counts.building|intcomma }}</a>
                        </td>
                    </tr>
                {% endif %}
                <tr>
                    <th>Total Names:</th>
                    <td>{{ counts.total|intcomma }}</td>
                </tr>
            </table>
        </div>
    </div>
{% endblock %}
