Rendered admin logo width and height attributes only if available

pull/17/head
Fabio Caccamo 2017-05-16 18:38:06 +02:00
parent a09e13fb00
commit dd9de6ba42
1 changed files with 1 additions and 1 deletions

View File

@ -616,7 +616,7 @@
{% get_admin_interface_theme as theme %} {% get_admin_interface_theme as theme %}
<h1 id="site-name"> <h1 id="site-name">
{% if theme.logo_visible and theme.logo %} {% if theme.logo_visible and theme.logo %}
<img class="logo" src="{{ theme.logo.url }}" width="{{ theme.logo.width }}" height="{{ theme.logo.height }}" /> <img class="logo" style="display:none;" src="{{ theme.logo.url }}" {% if theme.logo.width %}width="{{ theme.logo.width }}"{% endif %} {% if theme.logo.height %}height="{{ theme.logo.height }}"{% endif %} />
{% endif %} {% endif %}
{% if theme.title_visible %} {% if theme.title_visible %}
<span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span> <span>{% if theme.title %}{% trans theme.title %}{% else %}{% trans 'Django administration' %}{% endif %}</span>