Advertisement
TankorSmash

Untitled

Mar 28th, 2013
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.00 KB | None | 0 0
  1. {% extends "admin/base_site.html" %}
  2. {% load i18n admin_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 %}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="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 %}">
  21.                 {% blocktrans with name=app.name %}{{ name }}{% endblocktrans %}
  22.             </a>
  23.         </caption>
  24.         {% for model in app.models %}
  25.             <tr>
  26.             {% if model.admin_url %}
  27.                 <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
  28.             {% else %}
  29.                 <th scope="row">{{ model.name }}</th>
  30.             {% endif %}
  31.  
  32.             {% if model.add_url %}
  33.                 <td><a href="{{ model.add_url }}" class="addlink">{% trans 'Add' %}</a></td>
  34.             {% else %}
  35.                 <td>&nbsp;</td>
  36.             {% endif %}
  37.  
  38.             {% if model.admin_url %}
  39.                 <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
  40.             {% else %}
  41.                 <td>&nbsp;</td>
  42.             {% endif %}
  43.             </tr>
  44.         {% endfor %}
  45.         </table>
  46.         </div>
  47.     {% endfor %}
  48. {% else %}
  49.     <p>{% trans "You don't have permission to edit anything." %}</p>
  50. {% endif %}
  51. </div>
  52. {% endblock %}
  53.  
  54. {% block sidebar %}
  55. <div id="content-related">
  56.     <div class="module" id="recent-actions-module">
  57.         <h2>{% trans 'Recent Actions' %}</h2>
  58.         <h3>{% trans 'My Actions' %}</h3>
  59.             {% load log %}
  60.             {% get_admin_log 10 as admin_log for_user user %}
  61.             {% if not admin_log %}
  62.             <p>{% trans 'None available' %}</p>
  63.             {% else %}
  64.             <ul class="actionlist">
  65.             {% for entry in admin_log %}
  66.             <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">
  67.                 {% if entry.is_deletion or not entry.get_admin_url %}
  68.                     {{ entry.object_repr }}
  69.                 {% else %}
  70.                     <a href="{{ entry.get_admin_url }}">{{ entry.object_repr }}</a>
  71.                 {% endif %}
  72.                 <br/>
  73.                 {% if entry.content_type %}
  74.                     <span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span>
  75.                 {% else %}
  76.                     <span class="mini quiet">{% trans 'Unknown content' %}</span>
  77.                 {% endif %}
  78.             </li>
  79.             {% endfor %}
  80.             </ul>
  81.             {% endif %}
  82.     </div>
  83. </div>
  84. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement