root/templates/admin/admin_index.html

Revision 1, 2.7 KB (checked in by alex, 4 years ago)
  • initial djangoquest import
Line 
1{% extends "admin/base_site.html" %}
2{% load i18n %}
3
4{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css{% endblock %}
5
6{% block coltype %}colMS{% endblock %}
7
8{% block bodyclass %}dashboard{% endblock %}
9
10{% block breadcrumbs %}{% endblock %}
11
12{% block content %}
13<div id="content-main">
14
15{% if app_list %}
16    {% for app in app_list %}
17        <div class="module">
18        <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
19        <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
20        {% for model in app.models %}
21            <tr>
22            {% if model.perms.change %}
23                <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
24            {% else %}
25                <th scope="row">{{ model.name }}</th>
26            {% endif %}
27
28            {% if model.perms.add %}
29                <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
30            {% else %}
31                <td>&nbsp;</td>
32            {% endif %}
33
34            {% if model.perms.change %}
35                <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
36            {% else %}
37                <td>&nbsp;</td>
38            {% endif %}
39            </tr>
40        {% endfor %}
41        <tr><td colspan='2'><A href='/questionnaire/send_invitations'>Send
42        invitations</a></td></tr>
43        <tr><td colspan='2'><A href='/questionnaire/export_csv'>Export-to-CSV</a></td></tr>
44        </table>
45        </div>
46    {% endfor %}
47{% else %}
48    <p>{% trans "You don't have permission to edit anything." %}</p>
49{% endif %}
50</div>
51{% endblock %}
52
53{% block sidebar %}
54<div id="content-related">
55    <div class="module" id="recent-actions-module">
56        <h2>{% trans 'Recent Actions' %}</h2>
57        <h3>{% trans 'My Actions' %}</h3>
58            {% load log %}
59            {% get_admin_log 10 as admin_log for_user user %}
60            {% if not admin_log %}
61            <p>{% trans 'None available' %}</p>
62            {% else %}
63            <ul class="actionlist">
64            {% for entry in admin_log %}
65            <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
66            {% endfor %}
67            </ul>
68            {% endif %}
69    </div>
70</div>
71{% endblock %}
Note: See TracBrowser for help on using the browser.