Replace deprecated django.contrib adminmedia with staticfiles.
[htsworkflow.git] / htsworkflow / frontend / templates / admin / index.html
1 {% extends "admin/base_site.html" %}
2 {% load i18n %}
3
4 {% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% load staticfiles %}{% static "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 <div class='module'>
16 <table>
17 <caption>Frequently Used</caption>
18 <tr>
19 <th scope="row"><a href="/admin/samples/library/">Libraries</a></th>
20 <td><a href="/admin/samples/library/add/" class="addlink">{% trans 'Add' %}</a></td>
21 </tr>
22 <tr>
23 <th scope="row"><a href="/admin/experiments/flowcell/">Flowcells</a></th>
24 <td><a href="/admin/experiments/flowcell/add/" class="addlink">{% trans 'Add' %}</a></td>
25 </tr>
26 </table></div>
27
28 <div class='module'>
29 <table>
30 <caption>Label Printing</caption>
31 <tr>
32 <th scope="row"><a href="/admin/labels/labelcontent/">Label Contents</a></th>
33 <td><a href="/admin/labels/labelcontent/add/" class="addlink">{% trans 'Add' %}</a></td>
34 </tr>
35 <tr>
36 <th scope="row"><a href="/admin/labels/labeltemplate/">Label Templates</a></th>
37 <td><a href="/admin/labels/labeltemplate/add/" class="addlink">{% trans 'Add' %}</a></td>
38 </tr>
39 </table></div><BR>
40
41 {% if app_list %}
42     {% for app in app_list %}
43         <div class="module">
44         <table summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
45         <caption><a href="{{ app.app_url }}" class="section">{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</a></caption>
46         {% for model in app.models %}
47             <tr>
48             {% if model.perms.change %}
49                 <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
50             {% else %}
51                 <th scope="row">{{ model.name }}</th>
52             {% endif %}
53
54             {% if model.perms.add %}
55                 <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
56             {% else %}
57                 <td>&nbsp;</td>
58             {% endif %}
59             </tr>
60         {% endfor %}
61         </table>
62         </div>
63     {% endfor %}
64 {% else %}
65     <p>{% trans "You don't have permission to edit anything." %}</p>
66 {% endif %}
67 </div>
68 {% endblock %}
69
70 {% block sidebar %}
71 <div id="content-related">
72     <div class="module" id="recent-actions-module">
73         <h2>{% trans 'Recent Actions' %}</h2>
74         <h3>{% trans 'My Actions' %}</h3>
75             {% load log %}
76             {% get_admin_log 10 as admin_log for_user user %}
77             {% if not admin_log %}
78             <p>{% trans 'None available' %}</p>
79             {% else %}
80             <ul class="actionlist">
81             {% for entry in admin_log %}
82             <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
83                 {% if entry.is_deletion %}
84                     {{ entry.object_repr }}
85                 {% else %}
86                     <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
87                 {% endif %}
88                 <br/>
89                 {% if entry.content_type %}
90                     <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
91                 {% else %}
92                     <span class="mini quiet">{% trans 'Unknown content' %}</span>
93                 {% endif %}
94             </li>
95             {% endfor %}
96             </ul>
97             {% endif %}
98     </div>
99 </div>
100 {% endblock %}