{% extends "main.html" %}
{% load karaage_tags %}
{% load render_table from django_tables2 %}
{% block title %}Home{% endblock %}


{% block content %}
<div id="content-main">

    {% for_each_app_include "index_top.html" %}

    {% if is_admin %}

    <div class="module">
        <h2>Newest People</h2>
        {% render_table newest_people %}
    </div>

    <div class="module">
        <h2>Newest Projects</h2>
        {% render_table newest_projects %}
    </div>

    {% else %}

    <div class="module">
        <h2>Welcome</h2>
        <p>On this site you can:</p>
        <ul>
            <li>Check/edit your personal details</li>
            <li>View your projects and usage</li>
            <li>View and agree to license terms for restricted software</li>
            <li>Change your password</li>
        </ul>
    </div>

    {% endif %}

    {% for_each_app_include "index_bottom.html" %}

    {% if is_admin %}
    <div class="module">
        <h2>Recent Actions</h2>
        {% render_table recent_actions %}
        <div class="object-tools">
            <ul>
                <li><a href="{% url "kg_log_list" %}">View All</a></li>
            </ul>
        </div>
    </div>
    {% endif %}

</div>
{% endblock %}
