index.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n admin_static log %}
  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 content %}
  7. <div class="dashboard-item">
  8. <div class="dashboard-item-header">
  9. <span class="dashboard-item-header-title">
  10. {% trans "Applications" %}
  11. </span>
  12. </div>
  13. <div class="dashboard-item-content">
  14. {% if app_list %}
  15. <ul>
  16. {% for app in app_list %}
  17. <li class="contrast">
  18. {% if app.name != app.app_label|capfirst|escape %}
  19. <a href="{{ app.app_url }}" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a>
  20. {% else %}
  21. {% trans app.app_label as app_label %}
  22. <a href="{{ app.app_url }}" title="{% blocktrans with name=app_label %}Models in the {{ name }} application{% endblocktrans %}">{{ app_label }}</a>
  23. {% endif %}
  24. </li>
  25. {% for model in app.models %}
  26. <li>
  27. <span class="float-right">
  28. {% if model.add_url %}
  29. <a href="{{ model.add_url }}" class="addlink" title="{% trans 'Add' %}"><span class="icon-add3"></span></a>
  30. {% else %}
  31. &nbsp;
  32. {% endif %}
  33. {% if model.admin_url %}
  34. <a href="{{ model.admin_url }}" class="changelink" title="{% trans 'Change' %}"><span class="icon-edit"></span></a>
  35. {% else %}
  36. &nbsp;
  37. {% endif %}
  38. </span>
  39. {% if model.admin_url %}
  40. <a href="{{ model.admin_url }}">{{ model.name }}</a>
  41. {% else %}
  42. {{ model.name }}
  43. {% endif %}
  44. </li>
  45. {% endfor %}
  46. {% endfor %}
  47. </ul>
  48. {% else %}
  49. <p>{% trans "You don't have permission to edit anything." %}</p>
  50. {% endif %}
  51. </div>
  52. </div>
  53. {% endblock %}
  54. {% block sidebar %}
  55. {% get_admin_log 10 as admin_log for_user user %}
  56. <div class="dashboard-item">
  57. <div class="dashboard-item-header">
  58. <span class="dashboard-item-header-title">
  59. {% trans 'Recent Actions' %}
  60. </span>
  61. </div>
  62. <div class="dashboard-item-content">
  63. <ul>
  64. {% if not admin_log %}
  65. <li>
  66. {% trans 'None available' %}
  67. </li>
  68. {% else %}
  69. {% for entry in admin_log %}
  70. <li class="nowrap">
  71. <span class="float-right">
  72. <span class="icon-user tooltip" title="{{ entry.user }}"></span>
  73. <span class="icon-clock tooltip" title="{{ entry.action_time }}"></span>
  74. </span>
  75. {% if entry.is_addition %}
  76. <span class="icon-add3"></span>
  77. {% endif %}
  78. {% if entry.is_change %}
  79. <span class="icon-edit"></span>
  80. {% endif %}
  81. {% if entry.is_deletion %}
  82. <span class="icon-cross"></span>
  83. {% endif %}
  84. {% if entry.content_type %}
  85. <span class="mini quiet">{% filter capfirst %}{{ entry.content_type }}{% endfilter %}</span>
  86. {% else %}
  87. <span class="mini quiet">{% trans 'Unknown content' %}</span>
  88. {% endif %}
  89. {% if entry.is_deletion or not entry.get_admin_url %}
  90. {{ entry.object_repr }}
  91. {% else %}
  92. <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
  93. {% endif %}
  94. </li>
  95. {% endfor %}
  96. {% endif %}
  97. </ul>
  98. </div>
  99. </div>
  100. {% endblock %}