2f406a1754e98e634d91784ecfb9ce93a5950629
[htsworkflow.git] / htswfrontend / templates / admin / index.html
1 {% extends "admin/base_site.html" %}
2 {% load i18n %}
3
4 {% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}css/dashboard.css{% endblock %}
5 {% block coltype %}colMS{% endblock %}
6 {% block bodyclass %}dashboard{% endblock %}
7 {% block breadcrumbs %}{% endblock %}
8 {% block content %}
9 <div id="content-main">
10
11 {% load adminapplist %}
12
13 {% get_admin_app_list as app_list %}
14 {% if app_list %}
15     {% for app in app_list %}
16         <div class="module">
17         <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
18         <caption>{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</caption>
19         {% for model in app.models %}
20             <tr>
21             {% if model.perms.change %}
22                 <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
23             {% else %}
24                 <th scope="row">{{ model.name }}</th>
25             {% endif %}
26
27             {% if model.perms.add %}
28                 <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
29             {% else %}
30                 <td>&nbsp;</td>
31             {% endif %}
32
33             {% if model.perms.change %}
34                 <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
35             {% else %}
36                 <td>&nbsp;</td>
37             {% endif %}
38             </tr>
39         {% endfor %}
40         </table>
41         </div>
42     {% endfor %}
43 {% else %}
44     <p>{% trans "You don't have permission to edit anything." %}</p>
45 {% endif %}
46 </div>
47 {% endblock %}
48
49 {% block sidebar %}
50 <div id="content-related">
51     <div class="module" id="recent-actions-module">
52         <h2>{% trans 'Recent Actions' %}</h2>
53         <h3>{% trans 'My Actions' %}</h3>
54             {% load log %}
55             {% get_admin_log 10 as admin_log for_user user %}
56             {% if not admin_log %}
57             <p>{% trans 'None available' %}</p>
58             {% else %}
59             <ul class="actionlist">
60             {% for entry in admin_log %}
61             <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>
62             {% endfor %}
63             </ul>
64             {% endif %}
65     </div>
66 </div>
67 {% endblock %}