Self hosted FLOSS fitness/workout, nutrition and weight tracker
Render nutrition overview with list groups
Roland Geiderd8e35bf043b6
diff --git a/wger/nutrition/templates/mobile/plan/overview.html b/wger/nutrition/templates/mobile/plan/overview.htmldeleted file mode 100644index 81ebb1875..000000000--- a/wger/nutrition/templates/mobile/plan/overview.html+++ /dev/null@@ -1,52 +0,0 @@-{% extends "base.html" %}-{% load i18n staticfiles wger_extras %}--{% block title %}{% trans "Your nutrition plans" %}{% endblock %}---{% block content %}-<div class="list-group">- {% for plan in plans %}- <a href="{{ plan.get_absolute_url }}" class="list-group-item wger-list-group-item">- <span class="glyphicon glyphicon-chevron-right pull-right"></span>-- <h3 class="list-group-item-heading">{{plan}}</h4>- <p class="list-group-item-text">- {{ plan.creation_date }} –- {{ plan.get_nutritional_values.total.energy|floatformat }} {% trans "kcal" %}- </p>- </a>- {% empty %}- <a href="{% url 'nutrition:plan:add' %}" class="list-group-item wger-list-group-item">- {% trans "No nutrition plans." %}<br>- {% trans "Add one now." %}- </a>- {% endfor %}-</div>-{% endblock %}----{% block sidebar%}-<h4>{% trans "Options" %}</h4>-<p>- <a href="{% url 'nutrition:plan:add' %}" {% auto_link_css flavour %}>- <img src="{% static 'images/icons/new.svg' %}"- width="32"- height="32"- alt="{% trans 'Add nutrition plan' %}"- title="{% trans 'Add nutrition plan' %}">- {% trans "Add nutrition plan" %}</a>-</p>--<p>- <a href="{% url 'nutrition:ingredient:list' %}" {% auto_link_css flavour %}>- <img src="{% static 'images/icons/list.svg' %}"- width="32"- height="32"- alt="{% trans 'Ingredient overview' %}"- title="{% trans 'Ingredient overview' %}">- {% trans "Ingredient overview" %}- </a>-</p>-{% endblock %}diff --git a/wger/nutrition/templates/plan/overview.html b/wger/nutrition/templates/plan/overview.htmlindex 1a80f7176..1aaea347b 100644--- a/wger/nutrition/templates/plan/overview.html+++ b/wger/nutrition/templates/plan/overview.html@@ -6,63 +6,32 @@{% block content %}-{% if plans %}-<table class="table">- <thead>- <tr>- <th>{% trans "Description" %}</th>- <th>{% trans "Date" %}</th>- <th>{% trans "Energy" %}</th>- </tr>- </thead>- <tbody>+<div class="list-group">{% for plan in plans %}- <tr>- <td>- <a href="{{ plan.get_absolute_url }}">{{ plan }}</a>- </td>- <td>- {{ plan.creation_date }}- </td>- <td>- {{ plan.get_nutritional_values.total.energy|floatformat }} {% trans "kcal" %}- </td>- </tr>- {% endfor %}- </tbody>- </table>-{% else %}- <p>- <a href="{% url 'nutrition:plan:add' %}" class="btn btn-default btn-block">- {% trans "No nutrition plans." %} {% trans "Add one now." %}+ <a href="{{ plan.get_absolute_url }}" class="list-group-item">+ <span class="glyphicon glyphicon-chevron-right pull-right"></span>++ <h4 class="list-group-item-heading">{{plan}}</h4>+ <p class="list-group-item-text">+ {{ plan.creation_date }} –+ {{ plan.get_nutritional_values.total.energy|floatformat }} {% trans "kcal" %}+ </p></a>- </p>-{% endif %}-+ {% empty %}+ <a href="{% url 'nutrition:plan:add' %}" class="list-group-item">+ {% trans "No nutrition plans." %}<br>+ {% trans "Add one now." %}+ </a>+ {% endfor %}+</div>{% endblock %}{% block sidebar%}-<h4>{% trans "Options" %}</h4>-<p>- <a href="{% url 'nutrition:plan:add' %}" id="nutrition-create-new">- <img src="{% static 'images/icons/new.svg' %}"- width="32"- height="32"- alt="{% trans 'Add nutrition plan' %}"- title="{% trans 'Add nutrition plan' %}">- {% trans "Add nutrition plan" %}</a>-</p>-<p>- <a href="{% url 'nutrition:ingredient:list' %}" id="ingredient-overview">- <img src="{% static 'images/icons/list.svg' %}"- width="32"- height="32"- alt="{% trans 'Ingredient overview' %}"- title="{% trans 'Ingredient overview' %}">- {% trans "Ingredient overview" %}+ <a href="{% url 'nutrition:plan:add' %}" class="btn btn-success btn-sm">+ {% trans "Add nutrition plan" %}</a></p>{% endblock %}