Procházet zdrojové kódy

[templates] Add food to homepage

Colin Powell před 1 měsícem
rodič
revize
6782ed312d
1 změnil soubory, kde provedl 11 přidání a 1 odebrání
  1. 11 1
      vrobbler/templates/scrobbles/_last_scrobbles.html

+ 11 - 1
vrobbler/templates/scrobbles/_last_scrobbles.html

@@ -13,8 +13,18 @@
         {% include "scrobbles/_scrobble_table.html" %}
         {% endwith %}
         {% else %}
-        No tracks today
+        <p>No tracks today</p>
         {% endif %}
+
+        <h3><a href="{% url 'foods:food_list' %}">Food</a></h3>
+        {% if Food %}
+        {% with scrobbles=Food count=Food_count time=Food_time %}
+        {% include "scrobbles/_scrobble_table.html" %}
+        {% endwith %}
+        {% else %}
+        <p>No food today</p>
+        {% endif %}
+
     </div>
     <div class="col-md">