Ticket #12803: admin_message_icons.diff

File admin_message_icons.diff, 1.2 KB (added by Simon Meers, 15 years ago)

DRYer CSS, alternate icon for warnings (though maybe less visual emphasis)

  • django/contrib/admin/media/css/base.css

     
    445445    background: #ffc url(../img/admin/icon_success.gif) 5px .3em no-repeat;
    446446}
    447447
     448ul.messagelist li.warning{
     449    background-image: url(../img/admin/icon_alert.gif);
     450}
     451
     452ul.messagelist li.error{
     453    background-image: url(../img/admin/icon_error.gif);
     454}
     455
    448456.errornote {
    449457    font-size: 12px !important;
    450458    display: block;
  • django/contrib/admin/templates/admin/base.html

     
    5555    {% endif %}
    5656
    5757        {% if messages %}
    58         <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
     58        <ul class="messagelist">{% for message in messages %}
     59          <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
     60        {% endfor %}</ul>
    5961        {% endif %}
    6062
    6163    <!-- Content -->
Back to Top