Ticket #8158: 8158.diff

File 8158.diff, 5.7 KB (added by Marinho Brandão, 16 years ago)
  • django/contrib/admin/templates/admin/base_index.html

     
     1{% extends "admin/base_site.html" %}
     2{% load i18n %}
     3
     4{% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}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 summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
     19        <caption>{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</caption>
     20        {% for model in app.models %}
     21            <tr>
     22            {% if model.perms.change %}
     23                <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
     24            {% else %}
     25                <th scope="row">{{ model.name }}</th>
     26            {% endif %}
     27
     28            {% if model.perms.add %}
     29                <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
     30            {% else %}
     31                <td>&nbsp;</td>
     32            {% endif %}
     33
     34            {% if model.perms.change %}
     35                <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
     36            {% else %}
     37                <td>&nbsp;</td>
     38            {% endif %}
     39            </tr>
     40        {% endfor %}
     41        </table>
     42        </div>
     43    {% endfor %}
     44{% else %}
     45    <p>{% trans "You don't have permission to edit anything." %}</p>
     46{% endif %}
     47</div>
     48{% endblock %}
     49
     50{% block sidebar %}
     51<div id="content-related">
     52    <div class="module" id="recent-actions-module">
     53        <h2>{% trans 'Recent Actions' %}</h2>
     54        <h3>{% trans 'My Actions' %}</h3>
     55            {% load log %}
     56            {% get_admin_log 10 as admin_log for_user user %}
     57            {% if not admin_log %}
     58            <p>{% trans 'None available' %}</p>
     59            {% else %}
     60            <ul class="actionlist">
     61            {% for entry in admin_log %}
     62            <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
     63            {% endfor %}
     64            </ul>
     65            {% endif %}
     66    </div>
     67</div>
     68{% endblock %}
  • django/contrib/admin/templates/admin/index.html

     
    1 {% extends "admin/base_site.html" %}
    2 {% load i18n %}
    3 
    4 {% block stylesheet %}{% load adminmedia %}{% admin_media_prefix %}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 summary="{% blocktrans with app.name as name %}Models available in the {{ name }} application.{% endblocktrans %}">
    19         <caption>{% blocktrans with app.name as name %}{{ name }}{% endblocktrans %}</caption>
    20         {% for model in app.models %}
    21             <tr>
    22             {% if model.perms.change %}
    23                 <th scope="row"><a href="{{ model.admin_url }}">{{ model.name }}</a></th>
    24             {% else %}
    25                 <th scope="row">{{ model.name }}</th>
    26             {% endif %}
    27 
    28             {% if model.perms.add %}
    29                 <td><a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></td>
    30             {% else %}
    31                 <td>&nbsp;</td>
    32             {% endif %}
    33 
    34             {% if model.perms.change %}
    35                 <td><a href="{{ model.admin_url }}" class="changelink">{% trans 'Change' %}</a></td>
    36             {% else %}
    37                 <td>&nbsp;</td>
    38             {% endif %}
    39             </tr>
    40         {% endfor %}
    41         </table>
    42         </div>
    43     {% endfor %}
    44 {% else %}
    45     <p>{% trans "You don't have permission to edit anything." %}</p>
    46 {% endif %}
    47 </div>
    48 {% endblock %}
    49 
    50 {% block sidebar %}
    51 <div id="content-related">
    52     <div class="module" id="recent-actions-module">
    53         <h2>{% trans 'Recent Actions' %}</h2>
    54         <h3>{% trans 'My Actions' %}</h3>
    55             {% load log %}
    56             {% get_admin_log 10 as admin_log for_user user %}
    57             {% if not admin_log %}
    58             <p>{% trans 'None available' %}</p>
    59             {% else %}
    60             <ul class="actionlist">
    61             {% for entry in admin_log %}
    62             <li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
    63             {% endfor %}
    64             </ul>
    65             {% endif %}
    66     </div>
    67 </div>
    68 {% endblock %}
     1{% extends "admin/base_index.html" %}
Back to Top