app_list.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% load i18n %}
  2. <ul>
  3. {% for app in module.children %}
  4. <li class="contrast">
  5. {% if app.name != app.app_label|capfirst|escape %}
  6. <a href="{{ app.app_url }}" title="{% blocktrans with name=app.name %}Models in the {{ name }} application{% endblocktrans %}">{{ app.name }}</a>
  7. {% else %}
  8. {% trans app.app_label as app_label %}
  9. <a href="{{ app.app_url }}" title="{% blocktrans with name=app_label %}Models in the {{ name }} application{% endblocktrans %}">{{ app_label }}</a>
  10. {% endif %}
  11. </li>
  12. {% for model in app.models %}
  13. <li>
  14. <span class="float-right">
  15. {% if model.add_url %}
  16. <a href="{{ model.add_url }}" class="addlink" title="{% trans 'Add' %}"></a>
  17. {% else %}
  18. &nbsp;
  19. {% endif %}
  20. {% if model.admin_url %}
  21. <a href="{{ model.admin_url }}" class="changelink" title="{% trans 'Change' %}"></a>
  22. {% else %}
  23. &nbsp;
  24. {% endif %}
  25. </span>
  26. {% if model.admin_url %}
  27. <a href="{{ model.admin_url }}">{{ model.name }}</a>
  28. {% else %}
  29. {{ model.name }}
  30. {% endif %}
  31. </li>
  32. {% endfor %}
  33. {% endfor %}
  34. </ul>