|
| 1 | +{% extends "admin/base_site.html" %} |
| 2 | +{% load i18n static %} |
| 3 | + |
| 4 | +{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/dashboard.css" %}">{% endblock %} |
| 5 | + |
| 6 | +{% block coltype %}colMS{% endblock %} |
| 7 | + |
| 8 | +{% block bodyclass %}{{ block.super }} 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="app-{{ app.app_label }} module"> |
| 18 | + <table> |
| 19 | + <caption> |
| 20 | + <a href="{{ app.app_url }}" class="section" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a> |
| 21 | + </caption> |
| 22 | + {% for model in app.models %} |
| 23 | + <tr class="model-{{ model.object_name|lower }}"> |
| 24 | + {% if model.admin_url %} |
| 25 | + <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th> |
| 26 | + {% else %} |
| 27 | + <th scope="row">{{ model.name }}</th> |
| 28 | + {% endif %} |
| 29 | + |
| 30 | + {% if model.add_url %} |
| 31 | + <td><a href="{{ model.add_url }}" class="addlink">{% trans 'Add' %}</a></td> |
| 32 | + {% else %} |
| 33 | + <td> </td> |
| 34 | + {% endif %} |
| 35 | + |
| 36 | + {% if model.admin_url %} |
| 37 | + {% if model.view_only %} |
| 38 | + <td><a href="{{ model.admin_url }}" class="viewlink">{% trans 'View' %}</a></td> |
| 39 | + {% else %} |
| 40 | + <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td> |
| 41 | + {% endif %} |
| 42 | + {% else %} |
| 43 | + <td> </td> |
| 44 | + {% endif %} |
| 45 | + </tr> |
| 46 | + {% endfor %} |
| 47 | + </table> |
| 48 | + </div> |
| 49 | + {% endfor %} |
| 50 | +{% else %} |
| 51 | + <p>{% trans "You don't have permission to view or edit anything." %}</p> |
| 52 | +{% endif %} |
| 53 | +</div> |
| 54 | +{% endblock %} |
| 55 | + |
| 56 | +{% block sidebar %} |
| 57 | +<div id="content-related"> |
| 58 | + <div class="module" id="recent-actions-module"> |
| 59 | + <h2>{% trans 'Recent actions' %}</h2> |
| 60 | + <h3>{% trans 'My actions' %}</h3> |
| 61 | + {% load log %} |
| 62 | + {% get_admin_log 10 as admin_log for_user user %} |
| 63 | + {% if not admin_log %} |
| 64 | + <p>{% trans 'None available' %}</p> |
| 65 | + {% else %} |
| 66 | + <ul class="actionlist"> |
| 67 | + {% for entry in admin_log %} |
| 68 | + <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}"> |
| 69 | + {% if entry.is_deletion or not entry.get_admin_url %} |
| 70 | + {{ entry.object_repr }} |
| 71 | + {% else %} |
| 72 | + <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a> |
| 73 | + {% endif %} |
| 74 | + <br> |
| 75 | + {% if entry.content_type %} |
| 76 | + <span class="mini quiet">{% filter capfirst %}{{ entry.content_type }}{% endfilter %}</span> |
| 77 | + {% else %} |
| 78 | + <span class="mini quiet">{% trans 'Unknown content' %}</span> |
| 79 | + {% endif %} |
| 80 | + </li> |
| 81 | + {% endfor %} |
| 82 | + </ul> |
| 83 | + {% endif %} |
| 84 | + </div> |
| 85 | +</div> |
| 86 | +{% endblock %} |
0 commit comments