1+ {% extends "admin/base_site.html" %}
2+ {% load i18n static %}
3+
4+ {% block extrastyle %}{{ block.super }}< link rel ="stylesheet " href ="{% static "admin /css/dashboard.css" %}"> {% endblock %}
5+
6+ {% block coltype %}colMS{% endblock %}
7+
8+ {% block bodyclass %}{{ block.super }} dashboard{% endblock %}
9+
10+ {% block nav-breadcrumbs %}{% endblock %}
11+
12+ {% block nav-sidebar %}{% endblock %}
13+
14+ {% block content %}
15+ < div id ="content-main ">
16+ {% include "admin/app_list.html" with app_list=app_list show_changelinks=True %}
17+ </ div >
18+ {% endblock %}
19+
20+ {% block sidebar %}
21+ < div id ="content-related ">
22+ < div class ="module " id ="admin-actions-module ">
23+ < h2 > {% translate 'Admin actions' %}</ h2 >
24+ < div class ="module-content ">
25+ < form method ="post " action ="{% url 'load_test_data' %} ">
26+ {% csrf_token %}
27+ < button type ="submit " class ="button " style ="padding: 10px 20px; margin-left: 15px; ">
28+ {% trans "Load Test Data" %}
29+ </ button >
30+ </ form >
31+ < form method ="post " action ="{% url 'load_default_data' %} ">
32+ {% csrf_token %}
33+ < button type ="submit " class ="button " style ="padding: 10px 20px; margin-left: 15px; ">
34+ {% trans "Load Default Data" %}
35+ </ button >
36+ </ form >
37+ </ div >
38+ </ div >
39+ < div class ="module " id ="recent-actions-module ">
40+ < h2 > {% translate 'Recent actions' %}</ h2 >
41+ < h3 > {% translate 'My actions' %}</ h3 >
42+ {% load log %}
43+ {% get_admin_log 10 as admin_log for_user user %}
44+ {% if not admin_log %}
45+ < p > {% translate 'None available' %}</ p >
46+ {% else %}
47+ < ul class ="actionlist ">
48+ {% for entry in admin_log %}
49+ < li class ="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %} ">
50+ < span class ="visually-hidden "> {% if entry.is_addition %}{% translate 'Added:' %}{% elif entry.is_change %}{% translate 'Changed:' %}{% elif entry.is_deletion %}{% translate 'Deleted:' %}{% endif %}</ span >
51+ {% if entry.is_deletion or not entry.get_admin_url %}
52+ {{ entry.object_repr }}
53+ {% else %}
54+ < a href ="{{ entry.get_admin_url }} "> {{ entry.object_repr }}</ a >
55+ {% endif %}
56+ < br >
57+ {% if entry.content_type %}
58+ < span class ="mini quiet "> {% filter capfirst %}{{ entry.content_type.name }}{% endfilter %}</ span >
59+ {% else %}
60+ < span class ="mini quiet "> {% translate 'Unknown content' %}</ span >
61+ {% endif %}
62+ </ li >
63+ {% endfor %}
64+ </ ul >
65+ {% endif %}
66+ </ div >
67+ </ div >
68+ {% endblock %}
0 commit comments