From 9d887dea9da81e742add9846307fd6ba758a19ed Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Tue, 3 Apr 2018 18:29:37 +0200 Subject: [PATCH] Display icons on quick actions --- gym/templates/gym/base.html | 15 +++++++++++++-- gym/views.py | 3 ++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gym/templates/gym/base.html b/gym/templates/gym/base.html index 12dbdf5..c3e8077 100644 --- a/gym/templates/gym/base.html +++ b/gym/templates/gym/base.html @@ -8,6 +8,11 @@ + + + {% block add-head %} {% endblock %} @@ -36,12 +41,18 @@
{# Visible only on large screens #} {% for qa in quick_actions %} - {{ qa.display }} + + {% if qa.icon %}{% endif %} + {{ qa.display }} + {% endfor %}
{# Visible only on small screens #} {% for qa in quick_actions %} - {{ qa.display }} + + {% if qa.icon %}{% endif %} + {{ qa.display }} + {% endfor %}
diff --git a/gym/views.py b/gym/views.py index 7702532..7474c6e 100644 --- a/gym/views.py +++ b/gym/views.py @@ -56,7 +56,8 @@ class RoomDetailView(LoginRequiredMixin, QuickActionsMixin, SessionResetMixin, g quick_actions.append({ 'url': url, 'category': 'info', - 'display': name + 'display': name, + 'icon': 'fas fa-location-arrow', }) return quick_actions