Skip to content

Commit

Permalink
Merge pull request #123 from federicobond/svg-icons
Browse files Browse the repository at this point in the history
Replace removed gif icons with svg versions
  • Loading branch information
camilonova committed Feb 8, 2016
2 parents 5bfe0f3 + 1558a7c commit 8121802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions constance/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def changelist_view(self, request, extra_context=None):
'opts': Config._meta,
'form': form,
'media': self.media + form.media,
'icon_type': 'gif' if VERSION < (1, 9) else 'svg',
}
for name, options in settings.CONFIG.items():
default, help_text = options[0], options[1]
Expand Down
4 changes: 2 additions & 2 deletions constance/templates/admin/constance/change_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
</td>
<td>
{% if item.modified %}
<img src="{% static 'admin/img/icon-yes.gif' %}" alt="{{ item.modified }}" />
<img src="{% static 'admin/img/icon-yes.'|add:icon_type %}" alt="{{ item.modified }}" />
{% else %}
<img src="{% static 'admin/img/icon-no.gif' %}" alt="{{ item.modified }}" />
<img src="{% static 'admin/img/icon-no.'|add:icon_type %}" alt="{{ item.modified }}" />
{% endif %}
</td>
</tr>
Expand Down

0 comments on commit 8121802

Please sign in to comment.