Ticket #13652: style_messages_for_level.patch

File style_messages_for_level.patch, 1.4 KB (added by Sebastian Noack, 14 years ago)
  • django/contrib/admin/media/css/base.css

    diff --git a/django/contrib/admin/media/css/base.css b/django/contrib/admin/media/css/base.css
    index da502f3..3da399a 100644
    a b ul.messagelist li {  
    442442    margin: 0 0 3px 0;
    443443    border-bottom: 1px solid #ddd;
    444444    color: #666;
     445}
     446
     447ul.messagelist li.success,
     448ul.messagelist li.info {
    445449    background: #ffc url(../img/admin/icon_success.gif) 5px .3em no-repeat;
    446450}
    447451
     452ul.messagelist li.warning,
     453ul.messagelist li.debug {
     454    background: #ffc url(../img/admin/icon_alert.gif) 5px .3em no-repeat;
     455}
     456
     457ul.messagelist li.error {
     458    background: #ffc url(../img/admin/icon_error.gif) 5px .3em no-repeat;
     459}
     460
    448461.errornote {
    449462    font-size: 12px !important;
    450463    display: block;
  • django/contrib/admin/templates/admin/base.html

    diff --git a/django/contrib/admin/templates/admin/base.html b/django/contrib/admin/templates/admin/base.html
    index 3fd9eb3..7386fed 100644
    a b  
    5656    {% endif %}
    5757
    5858        {% if messages %}
    59         <ul class="messagelist">{% for message in messages %}<li>{{ message }}</li>{% endfor %}</ul>
     59        <ul class="messagelist">{% for m in messages %}<li class="{% if m.tags %}{{ m.tags.split|last }}{% else %}info{% endif %}">{{ m }}</li>{% endfor %}</ul>
    6060        {% endif %}
    6161
    6262    <!-- Content -->
Back to Top