index.html 3.1 KB

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