Skip to content

Commit

Permalink
Use SVG icon instead of font icon in modeladmin index view
Browse files Browse the repository at this point in the history
This uses the same classes and tags than 'wagtailadmin/shared/header.html'
to construct the <header> element and its children.
  • Loading branch information
jeromelebleu committed Oct 4, 2021
1 parent d67fdd1 commit 4cc4704
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions wagtail/contrib/modeladmin/templates/modeladmin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@

{% block content %}
{% block header %}
<header class="nice-padding hasform">
<div class="row">
<header class="hasform">
<div class="row nice-padding">
<div class="left header-left">
<div class="col header-title">
{% block h1 %}
<h1 {% if view.header_icon %}class="icon icon-{{ view.header_icon }}"{% endif %}>
{{ view.get_page_title }}
{% include 'modeladmin/includes/result_count.html' %}
</h1>
<h1>
{% if view.header_icon %}{% icon name=view.header_icon class_name="header-title-icon" %}{% endif %}
{{ view.get_page_title }}
{% include 'modeladmin/includes/result_count.html' %}
</h1>
{% endblock %}
</div>
{% block search %}{% search_form %}{% endblock %}
Expand Down

0 comments on commit 4cc4704

Please sign in to comment.