| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- {% extends 'base/layout.html' %}
- {% load get_status %}
- {% load helpers %}
- {% block header %}{% endblock %}
- {% block title %}Home{% endblock %}
- {% block content %}
- {# General stats #}
- <div class="row masonry">
- {% for section, items in stats %}
- <div class="col col-sm-12 col-lg-6 col-xl-4 my-2 masonry-item">
- <div class="card">
- <h6 class="card-header text-primary text-center">{{ section }}</h6>
- <div class="card-body">
- <div class="list-group list-group-flush">
- {% for item in items %}
- {% if item.count %}
- <a href="{% url item.url %}" class="list-group-item list-group-item-action{% if item.disabled %} disabled{% endif %}">
- <div class="d-flex w-100 justify-content-between align-items-center">
- {{ item.label }}
- <h4 class="mb-1">{{ item.count }}</h4>
- </div>
- </a>
- {% endif %}
- {% endfor %}
- </div>
- </div>
- </div>
- </div>
- {% endfor %}
- </div>
- {# Changelog #}
- <div class="row my-4 flex-grow-1 changelog-container">
- <div class="col">
- <h5 class="text-center">Changelog</h5>
- {% if changelog and perms.extras.view_objectchange %}
- {# TODO: Replace this with a django-tables2 Table #}
- <table class="table align-middle table-hover">
- <thead>
- <tr>
- <th scope="col">User</th>
- <th scope="col">Action</th>
- <th scope="col">Type</th>
- <th scope="col">Object</th>
- <th scope="col">Time</th>
- <th scope="col" align="right"></th>
- </tr>
- </thead>
- <tbody>
- {% for change in changelog %}
- <tr class="{% get_status change.get_action_display %}">
- <th scope="row">{{ change.user|default:change.user_name }}</th>
- <td>{{ change.get_action_display|bettertitle }}</td>
- <td>{{ change.changed_object_type.name|bettertitle }}</td>
- <td>
- {% if change.changed_object.get_absolute_url %}
- <a class="text-body" href="{{ change.changed_object.get_absolute_url }}">{{ change.changed_object }}</a>
- {% else %} {{ change.changed_object|default:change.object_repr }} {% endif %}
- </td>
- <td>{{ change.time|date:'SHORT_DATETIME_FORMAT' }}</td>
- <td>
- <a role="button" class="text-body" href="{{ change.get_absolute_url }}">
- <i class="mdi mdi-dots-horizontal" data-bs-toggle="tooltip" data-bs-placement="left" title="View Change Details"></i>
- </a>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% elif perms.extras.view_objectchange %}
- <div class="alert alert-secondary mt-4" role="alert">
- No change history found.
- </div>
- {% endif %}
- </div>
- </div>
- {% endblock content %}
|