Display icons on quick actions
This commit is contained in:
parent
b318270fb0
commit
9d887dea9d
2 changed files with 15 additions and 3 deletions
|
@ -8,6 +8,11 @@
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"
|
||||||
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="{% static 'gym/style.css' %}">
|
<link rel="stylesheet" href="{% static 'gym/style.css' %}">
|
||||||
|
|
||||||
|
<script defer src="https://use.fontawesome.com/releases/v5.0.9/js/all.js"
|
||||||
|
integrity="sha384-8iPTk2s/jMVj81dnzb/iFR2sdA7u06vHJyyLlAd4snFpCl/SnyUjRrbdJsw1pGIl"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
|
||||||
{% block add-head %}
|
{% block add-head %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
@ -36,12 +41,18 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 d-none d-md-block"> {# Visible only on large screens #}
|
<div class="col-12 d-none d-md-block"> {# Visible only on large screens #}
|
||||||
{% for qa in quick_actions %}
|
{% for qa in quick_actions %}
|
||||||
<a href="{{ qa.url }}" class="btn btn-{{ qa.category }}">{{ qa.display }}</a>
|
<a href="{{ qa.url }}" class="btn btn-{{ qa.category }}">
|
||||||
|
{% if qa.icon %}<i class="{{ qa.icon }}"></i>{% endif %}
|
||||||
|
{{ qa.display }}
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 d-md-none"> {# Visible only on small screens #}
|
<div class="col-12 d-md-none"> {# Visible only on small screens #}
|
||||||
{% for qa in quick_actions %}
|
{% for qa in quick_actions %}
|
||||||
<a href="{{ qa.url }}" class="btn btn-{{ qa.category }} btn-block">{{ qa.display }}</a>
|
<a href="{{ qa.url }}" class="btn btn-{{ qa.category }} btn-block">
|
||||||
|
{% if qa.icon %}<i class="{{ qa.icon }}"></i>{% endif %}
|
||||||
|
{{ qa.display }}
|
||||||
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -56,7 +56,8 @@ class RoomDetailView(LoginRequiredMixin, QuickActionsMixin, SessionResetMixin, g
|
||||||
quick_actions.append({
|
quick_actions.append({
|
||||||
'url': url,
|
'url': url,
|
||||||
'category': 'info',
|
'category': 'info',
|
||||||
'display': name
|
'display': name,
|
||||||
|
'icon': 'fas fa-location-arrow',
|
||||||
})
|
})
|
||||||
return quick_actions
|
return quick_actions
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue