Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Delete and fix more mobile templates

Roland Geider939e6171da4d
diff --git a/wger/config/templates/language/overview.html b/wger/config/templates/language/overview.html
index eff92f514..b2da9d2a6 100644
--- a/wger/config/templates/language/overview.html
+++ b/wger/config/templates/language/overview.html
@@ -1,7 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
+{% load i18n staticfiles wger_extras %}
{% block title %}{% trans "Languages" %}{% endblock %}
@@ -31,7 +29,7 @@
{% block sidebar %}
<h3>{% trans "Options" %}</h3>
<p>
- <a href="{% url 'config:language-add' %}">
+ <a href="{% url 'config:language-add' %}" {% auto_link_css flavour %}>
<img src="{% static 'images/icons/folder-new.svg' %}"
width="32"
height="32"
diff --git a/wger/config/templates/language/view.html b/wger/config/templates/language/view.html
index 38d5655f4..9a07ed899 100644
--- a/wger/config/templates/language/view.html
+++ b/wger/config/templates/language/view.html
@@ -60,10 +60,6 @@ in A).{% endblocktrans %}</p>
{% endfor %}
</tbody>
</table>
-
-
-
-
{% endblock %}
@@ -73,7 +69,7 @@ in A).{% endblocktrans %}</p>
<p>
<a href="{% url 'config:language-edit' view_language.id %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/edit.svg' %}"
width="32"
height="32"
@@ -85,7 +81,7 @@ in A).{% endblocktrans %}</p>
<p>
<a href="{% url 'config:language-delete' view_language.id %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/trash.svg' %}"
width="32"
height="32"
diff --git a/wger/config/templates/mobile/language/overview.html b/wger/config/templates/mobile/language/overview.html
deleted file mode 100644
index 7b4784a3a..000000000
--- a/wger/config/templates/mobile/language/overview.html
+++ /dev/null
@@ -1,47 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-
-{% block title %}{% trans "Languages" %}{% endblock %}
-
-
-{% block content %}
-<table>
-<thead>
- <tr>
- <th>{% trans "Language short name" %}</th>
- <th>{% trans "Language full name" %}</th>
- </tr>
-</thead>
-<tbody>
-{% for language in language_list %}
- <tr>
- <td>{{language.short_name}}</td>
- <td><a href="{% url 'config:language-view' language.id %}">{{language.full_name}}</a></td>
- </tr>
-{% endfor %}
-</tbody>
-
-</table>
-{% endblock %}
-
-
-
-{% block sidebar %}
-<h3>{% trans "Options" %}</h3>
-<p>
- <a href="{% url 'config:language-add' %}"
- data-role="button">
- <img src="{% static 'images/icons/folder-new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add' %}"
- >
- {% trans "Add" %}
- </a>
-</p>
-<p>{% blocktrans %}After adding a new language here you need to add it to
-the global_settings.py file and make sure there is a corresponding flag icon
-in static/images/icons.{% endblocktrans %}</p>
-{% endblock %}
diff --git a/wger/config/templates/mobile/language/view.html b/wger/config/templates/mobile/language/view.html
deleted file mode 100644
index 5bd84c811..000000000
--- a/wger/config/templates/mobile/language/view.html
+++ /dev/null
@@ -1,101 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-
-{% block title %}{{ view_language }}{% endblock %}
-
-
-{% block content %}
-<table>
-<thead>
- <tr>
- <th>{% trans "Language short name" %}</th>
- <th>{% trans "Language full name" %}</th>
- </tr>
-</thead>
-<tbody>
- <tr>
- <td>{{view_language.short_name}}</td>
- <td>{{view_language.full_name}}</td>
- </tr>
-</tbody>
-</table>
-
-
-<h3>{% trans "Configuration" %}</h3>
-<p>{% blocktrans %}Use the configuration to select in what languages the
-exercises and ingredients will be shown for the current language (for example
-the exercises should be shown in languages A, B and C; the ingredients only
-in A).{% endblocktrans %}</p>
-
-<table>
-<thead>
- <tr>
- <th>{% trans "Language full name" %}</th>
- <th>{% trans "Show" %}</th>
- </tr>
-</thead>
-<tbody>
- {% for config in view_language.language_source.all %}
- {% ifchanged config.get_item_display %}
- <tr>
- <td colspan="2" style="text-align:center; background-color:#eeeeec;">{{config.get_item_display}}</td>
- </tr>
- {% endifchanged %}
- <tr>
- <td>
- <a href="{% url 'config:languageconfig-edit' config.id %}" data-role="button" data-inline="true" data-mini="true">
- {{config.language_target.full_name}}
- </a>
- </td>
- <td>
- {% if config.show %}
- <img src="{% static 'images/icons/status-on.svg' %}"
- {% else %}
- <img src="{% static 'images/icons/status-off.svg' %}"
- {% endif %}
- width="16"
- height="16"
- alt="">
- </td>
- </tr>
- {% endfor %}
-</tbody>
-</table>
-
-
-
-
-{% endblock %}
-
-
-
-{% block sidebar %}
-<h3>{% trans "Options" %}</h3>
-
-<p>
- <a href="{% url 'config:language-edit' view_language.id %}"
- data-role="button">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Edit' %}"
- >
- {% trans "Edit" %}
- </a>
-</p>
-
-<p>
- <a href="{% url 'config:language-delete' view_language.id %}"
- data-role="button">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete' %}"
- >
- {% trans "Delete" %}
- </a>
-</p>
-
-{% endblock %}
diff --git a/wger/exercises/tests/test_equipment.py b/wger/exercises/tests/test_equipment.py
index b910b3264..1d892e016 100644
--- a/wger/exercises/tests/test_equipment.py
+++ b/wger/exercises/tests/test_equipment.py
@@ -150,10 +150,7 @@ class EquipmentCacheTestCase(WorkoutManagerTestCase):
new_search = cache.get(get_template_cache_name('exercise-overview-search', 2))
self.assertNotEqual(old_exercise.name, new_exercise.name)
- if not self.is_mobile:
- self.assertNotEqual(old_overview, new_overview)
- else:
- self.assertNotEqual(old_search, new_search)
+ self.assertNotEqual(old_overview, new_overview)
class EquipmentApiTestCase(api_base_test.ApiBaseResourceTestCase):
diff --git a/wger/manager/tests/test_schedule.py b/wger/manager/tests/test_schedule.py
index f4fac3493..72caaced2 100644
--- a/wger/manager/tests/test_schedule.py
+++ b/wger/manager/tests/test_schedule.py
@@ -124,10 +124,8 @@ class ScheduleTestCase(WorkoutManagerTestCase):
response = self.client.get(reverse('schedule-overview'))
self.assertEqual(response.status_code, 200)
self.assertEqual(len(response.context['schedules']), 3)
- if self.is_mobile:
- self.assertContains(response, '<p class="ui-li-aside"><em>active</em></p>')
- else:
- self.assertContains(response, '<span class="label label-primary">active</span>')
+ self.assertContains(response,
+ '<span class="label label-primary pull-right"><em>active</em></span>')
schedule = Schedule.objects.get(pk=4)
schedule.is_active = False
schedule.save()
diff --git a/wger/nutrition/templates/ingredient/overview.html b/wger/nutrition/templates/ingredient/overview.html
index 7638d7540..f0a684cad 100644
--- a/wger/nutrition/templates/ingredient/overview.html
+++ b/wger/nutrition/templates/ingredient/overview.html
@@ -32,7 +32,12 @@ $(document).ready(function() {
{% if ingredients_list %}
<div class="list-group">
{% for ingredient in ingredients_list %}
- <a class="list-group-item" href="{{ ingredient.get_absolute_url }}">{{ ingredient.name }}</a>
+ <a class="list-group-item {% if flavour == 'mobile' %}wger-list-group-item{% endif %}" href="{{ ingredient.get_absolute_url }}">
+ {% if flavour == 'mobile' %}
+ <span class="glyphicon glyphicon-chevron-right pull-right"></span>
+ {% endif %}
+ {{ ingredient.name }}
+ </a>
{% endfor %}
</div>
{% else %}
@@ -52,7 +57,7 @@ $(document).ready(function() {
{% if user.is_authenticated and not user.userprofile.is_temporary %}
<h3>{% trans "Add ingredient" %}</h3>
<p>
- <a href="{% url 'ingredient-add' %}">
+ <a href="{% url 'ingredient-add' %}" {% auto_link_css flavour %}>
<img src="{% static 'images/icons/new.svg' %}"
width="32"
height="32"
diff --git a/wger/nutrition/templates/ingredient/view.html b/wger/nutrition/templates/ingredient/view.html
index 590e72ca3..7893f46b0 100644
--- a/wger/nutrition/templates/ingredient/view.html
+++ b/wger/nutrition/templates/ingredient/view.html
@@ -192,7 +192,7 @@ the search.{% endblocktrans %}
<p>
<a href="{% url 'ingredient-delete' ingredient.id %}"
title="{% trans 'Delete ingredient' %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/trash.svg' %}"
width="32"
height="32"
@@ -204,7 +204,8 @@ the search.{% endblocktrans %}
<p>
<a href="{% url 'ingredient-edit' ingredient.id %}"
- title="{% trans 'Edit ingredient' %}">
+ title="{% trans 'Edit ingredient' %}"
+ {% auto_link_css flavour %}>
<img src="{% static 'images/icons/edit.svg' %}"
width="32"
height="32"
@@ -217,7 +218,7 @@ the search.{% endblocktrans %}
<h3>{% trans "Weight units" %}</h3>
<p>
<a href="{% url 'weight-unit-ingredient-add' ingredient.id %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/new.svg' %}"
width="32"
height="32"
@@ -241,7 +242,7 @@ the search.{% endblocktrans %}
<span class="editoptions float-right">
<a href="{% url 'weight-unit-ingredient-edit' unit.id %}"
title="{% trans 'Edit' %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/edit.svg' %}"
width="16"
height="16"
@@ -250,7 +251,7 @@ the search.{% endblocktrans %}
</a>
<a href="{% url 'weight-unit-ingredient-delete' unit.id %}"
title="{% trans 'Delete' %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/trash.svg' %}"
width="16"
height="16"
diff --git a/wger/nutrition/templates/mobile/ingredient/overview.html b/wger/nutrition/templates/mobile/ingredient/overview.html
deleted file mode 100644
index 53233754c..000000000
--- a/wger/nutrition/templates/mobile/ingredient/overview.html
+++ /dev/null
@@ -1,84 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-{% load cache %}
-
-{% block header %}
-<script>
-$(document).ready(function() {
- // Prevent the form from being submited if JavaScript is enabled
- $("#search_form").submit(function() {return false;});
-
- // Init the autocompleter
- $("#ingredient-search").autocomplete({
- source: "{% url 'ingredient-search' %}",
- minLength: 2,
- select: function(event, ui) {
-
- // Redirect to exercise after clicking on a result
- // Path is hard coded here, because we can't use the url-tag
- window.location.href = '/nutrition/ingredient/' + ui.item.id + '/view/'
- }
- });
-});
-</script>
-{% endblock %}
-
-{% block title %}{% trans "Ingredient overview" %}{% endblock %}
-
-
-{% block content %}
-{% if ingredients_list %}
-<ul data-role="listview">
- {% for ingredient in ingredients_list %}
- <li>
- <a href="{{ ingredient.get_absolute_url }}" data-ajax="false">{{ ingredient.name }}</a>
- </li>
- {% endfor %}
-</ul>
-{% else %}
- <p>
- <a href="{% url 'ingredient-add' %}" data-role="button">
- {% trans "No ingredients." %} {% trans "Add one now." %}
- </a>
- </p>
-{% endif %}
-
-
-<div style="padding-top:3em;"></div>
-{% pagination paginator page_obj %}
-
-
-{% endblock %}
-
-{% block sidebar %}
-<h3>{% trans "Search" %}</h3>
-<div class="ui-widget">
- <form action="{% url 'ingredient-search' %}"
- method="get"
- id="search_form">
- {% csrf_token %}
- <input name="term"
- type="search"
- id="ingredient-search"
- class="ajax-form-element"
- placeholder="{% trans 'ingredient name' %}"
- style="width:100%;">
- </form>
-</div>
-
-{% if user.is_authenticated and not user.userprofile.is_temporary %}
-<h3>{% trans "Add ingredient" %}</h3>
-<p>
- <a href="{% url 'ingredient-add' %}" data-role="button">
- <img src="{% static 'images/icons/new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add ingredient' %}"
- title="{% trans 'Add ingredient' %}">
- {% trans "Add ingredient" %}
- </a>
-</p>
-{% endif %}
-{% endblock %}
diff --git a/wger/nutrition/templates/mobile/ingredient/view.html b/wger/nutrition/templates/mobile/ingredient/view.html
deleted file mode 100644
index 388de6286..000000000
--- a/wger/nutrition/templates/mobile/ingredient/view.html
+++ /dev/null
@@ -1,277 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-
-{% block title %}{{ingredient.name}}{% endblock %}
-
-{% block header %}
-<script>
-$(document).on('pageinit', function(){
- init_ingredient_detail("{% url 'api-ingredient-get-values' ingredient.id %}");
-});
-</script>
-{% endblock %}
-
-
-
-{% block content %}
-
-{% if ingredient.status == ingredient.INGREDIENT_STATUS_PENDING %}
-<div class="alert">
-<h3>{% trans "Ingredient is pending review" %}</h3>
-<p>{% blocktrans %}This user submitted ingredient is pending a decision to be
-included in the database. Till then, it will not be shown in the overview or
-the search.{% endblocktrans %}
-{% if perms.exercises %}{% trans "Please select one of the options below." %}{% endif %}
-</p>
-
-{% if perms.exercises %}
-<div class="ym-grid linearize-level-1">
- <div class="ym-g50 ym-gl">
- <div class="ym-gbox-left">
- <div class="alert alert-success">
- <a href="{% url 'ingredient-accept' ingredient.id %}">
- <img src="{% static 'images/icons/status-on.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Accept' %}">
- {% trans "Accept" %}
- </a>
- </div>
- </div>
- </div>
- <div class="ym-g50 ym-gl">
- <div class="ym-gbox-left">
- <div class="alert alert-error">
- <a href="{% url 'ingredient-decline' ingredient.id %}">
- <img src="{% static 'images/icons/status-off.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Decline' %}">
- {% trans "Decline" %}
- </a>
- </div>
- </div>
- </div>
-</div>
-{% endif %} {# end check permissions #}
-
-</div>
-{% endif %} {# end ingredient is pending review #}
-
-
-
-
-<div itemscope itemtype="http://schema.org/NutritionInformation">
-<meta itemprop="name" content="{{ingredient.name}}" />
-
-<form method="GET"
- action="{% url 'api-ingredient-get-values' ingredient.id %}"
- id="nutritional-values-form"
- style="background-color: transparent; border-width: 0px; box-shadow: 0px 0px 0px 0px transparent;">
- <div id="calculator-errors" class="ym-error"></div>
- <input type="hidden" value="{{ingredient.id}}" name="ingredient"></input>
-
- <div class="ym-grid">
- <div class="ym-g33 ym-gl" style="text-align:right;">
- {% trans 'Nutritional values in' %}
- </div>
-
- <div class="ym-g33 ym-gl">
- <div class="ym-fbox-text {% if form.amount.errors %}ym-error{% endif %}">{{form.amount}}</div>
- </div>
-
- <div class="ym-g33 ym-gl">
- <div class="ym-fbox-select {% if form.unit.errors %}ym-error{% endif %}">{{form.unit}}</div>
- </div>
- </div>
-</form>
-
-<table >
- <thead>
- <tr>
- <th colspan="2">
- {% trans "Macronutrients" %}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td style="width:80%;">{% trans "Energy" %}</td>
- <td itemprop="calories">
- <span id="value-energy">{{ingredient.energy}}</span> kcal
- </td>
- </tr>
- <tr>
- <td>{% trans "Protein" %}</td>
- <td itemprop="proteinContent">
- <span id="value-protein">{{ingredient.protein}}</span> g
- </td>
- </tr>
- <tr>
- <td>{% trans "Carbohydrates" %}</td>
- <td itemprop="carbohydrateContent">
- <span id="value-carbohydrates">{{ingredient.carbohydrates}}</span> g
- </td>
- </tr>
- <tr>
- <td style="padding-left: 3em;">{% trans "Sugar content in carbohydrates" %}</td>
- <td itemprop="sugarContent">
- {% if ingredient.carbohydrates_sugar %}
- <span id="value-carbohydrates-sugar">{{ingredient.carbohydrates_sugar}}</span> g
- {% else %}
- {% trans "n.A." %}
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>{% trans "Fat" %}</td>
- <td itemprop="fatContent">
- <span id="value-fat">{{ingredient.fat}}</span> g
- </td>
- </tr>
- <tr>
- <td style="padding-left: 3em;">{% trans "Saturated fat content in fats" %}</td>
- <td itemprop="saturatedFatContent">
- {% if ingredient.fat_saturated %}
- <span id="value-fat-saturated">{{ingredient.fat_saturated}}</span> g
- {% else %}
- {% trans "n.A." %}
- {% endif %}
- </td>
- </tr>
- </tbody>
-</table>
-
-<table>
- <thead>
- <tr>
- <th colspan="2">
- {% trans "Others" %}
- </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td style="width:80%;">{% trans "Fibres" %}</td>
- <td itemprop="fiberContent" id="value-fibres">
- {% if ingredient.fibres %}
- <span id="value-fibres">{{ingredient.fibres}}</span> g
- {% else %}
- {% trans "n.A." %}
- {% endif %}
- </td>
- </tr>
- <tr>
- <td>{% trans "Sodium" %}</td>
- <td itemprop="sodiumContent" id="value-sodium">
- {% if ingredient.sodium %}
- <span id="value-sodium">{{ingredient.sodium}}</span> g
- {% else %}
- {% trans "n.A." %}
- {% endif %}
- </td>
- </tr>
- </tbody>
-</table>
-</div>
-
-{% endblock %}
-
-
-
-{% block sidebar %}
-
-{% if ingredient.status == ingredient.INGREDIENT_STATUS_ACCEPTED %}
-<div class="alert" style="margin-top:1em;">
-<h3>{% trans "User submitted ingredient" %}</h3>
-{% with username=ingredient.user.username %}
-<p>{% blocktrans %}This exercise was submitted by <strong>{{username}}</strong>.{% endblocktrans %}
-{% endwith %}
-</div>
-{% endif %}
-
-
-{% if perms.exercises %}
-<h3>{% trans "Options" %}</h3>
-
-<p>
-<a href="{% url 'ingredient-delete' ingredient.id %}"
- title="{% trans 'Delete ingredient' %}"
- data-role="button">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Delete ingredient' %}"
- title="{% trans 'Delete ingredient' %}">
- {% trans 'Delete ingredient' %}
-</a>
-</p>
-
-<p>
-<a href="{% url 'ingredient-edit' ingredient.id %}"
- title="{% trans 'Edit ingredient' %}"
- data-role="button">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Edit ingredient' %}"
- title="{% trans 'Edit ingredient' %}">
-{% trans 'Edit ingredient' %}
-</a>
-</p>
-
-<h3>{% trans "Weight units" %}</h3>
-<p>
-<a href="{% url 'weight-unit-ingredient-add' ingredient.id %}"
- data-role="button">
- <img src="{% static 'images/icons/new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add new weight unit' %}"
- title="{% trans 'Add new weight unit' %}">
-{% trans "Add new weight unit" %}
-</a>
-</p>
-{% if ingredient.ingredientweightunit_set.exists %}
- <table>
- <thead>
- <tr>
- <th>{% trans "Name" %}</th>
- </tr>
- </thead>
- <tbody>
- {% for unit in ingredient.ingredientweightunit_set.select_related %}
- <tr>
- <td>
- {{unit.amount}} {{unit.unit.name}} = {{unit.gramm}}g
- <span class="editoptions float-right">
- <a href="{% url 'weight-unit-ingredient-edit' unit.id %}"
- title="{% trans 'Edit' %}">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Edit' %}"
- title="{% trans 'Edit' %}">
- </a>
- <a href="{% url 'weight-unit-ingredient-delete' unit.id %}"
- title="{% trans 'Delete' %}">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="16"
- height="16"
- alt="{% trans 'Delete' %}"
- title="{% trans 'Delete' %}">
- </a>
- </span>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
-{% endif %}
-{% endif %}
-
-{% license_sidebar ingredient.license ingredient.license_author %}
-
-{% endblock %}
diff --git a/wger/nutrition/templates/mobile/plan/overview.html b/wger/nutrition/templates/mobile/plan/overview.html
index c9148b149..6a9066b75 100644
--- a/wger/nutrition/templates/mobile/plan/overview.html
+++ b/wger/nutrition/templates/mobile/plan/overview.html
@@ -1,27 +1,24 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
+{% load i18n staticfiles wger_extras %}
{% block title %}{% trans "Your nutrition plans" %}{% endblock %}
{% block content %}
-<ul data-role="listview" data-inset="false">
+<div class="list-group">
{% for plan in plans %}
- <li>
- <a href="{% url 'nutrition-view' plan.id %}" data-ajax="false">
- <h3>{{plan}}</h3>
- <p>{{ plan.creation_date }}</p>
+ <a href="{% url 'nutrition-view' plan.id %}" class="list-group-item wger-list-group-item">
+ <span class="glyphicon glyphicon-chevron-right pull-right"></span>
+
+ <h3 class="list-group-item-heading">{{plan}}</h3>
+ <p class="list-group-item-text">{{ plan.creation_date }}</p>
</a>
- </li>
{% empty %}
- <li>
- <a href="{% url 'nutrition-add' %}">
- {% trans "No nutrition plans." %}<br> {% trans "Add one now." %}
+ <a href="{% url 'nutrition-add' %}" class="list-group-item wger-list-group-item">
+ {% trans "No nutrition plans." %}<br>
+ {% trans "Add one now." %}
</a>
- </li>
{% endfor %}
-</ul>
{% endblock %}
@@ -29,7 +26,7 @@
{% block sidebar%}
<h3>{% trans "Options" %}</h3>
<p>
- <a href="{% url 'nutrition-add' %}" id="nutrition-create-new" data-role="button">
+ <a href="{% url 'nutrition-add' %}" {% auto_link_css flavour %}>
<img src="{% static 'images/icons/new.svg' %}"
width="32"
height="32"
@@ -39,7 +36,7 @@
</p>
<p>
- <a href="{% url 'ingredient-list' %}" id="ingredient-overview" data-role="button">
+ <a href="{% url 'ingredient-list' %}" {% auto_link_css flavour %}>
<img src="{% static 'images/icons/list.svg' %}"
width="32"
height="32"
diff --git a/wger/nutrition/templates/mobile/rate/form.html b/wger/nutrition/templates/mobile/rate/form.html
deleted file mode 100644
index d84d56a04..000000000
--- a/wger/nutrition/templates/mobile/rate/form.html
+++ /dev/null
@@ -1,175 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-
-{% block header %}
-<script>
-$(document).ready(function() {
- init_calories_calculator();
-});
-</script>
-{% endblock %}
-
-<!--
- Title
--->
-{% block title %}{% trans "Daily calories calculator" %}{% endblock %}
-
-
-<!--
- Main Content
--->
-{% block content %}
-
-<h3>1 - {%trans "Basal metabolic rate" %}</h3>
-<p>{% blocktrans %}The basal metabolic rate is the amount of energy expended daily
-at rest. This is the minimum energy needed for the body to function, without any
-additional physical activity.{% endblocktrans %}</p>
-<form action="{% url 'calories-calculate-bmr' %}"
- method="post"
- class="ym-form calories-autoform"
- id="bmr-form">
-{% csrf_token %}
-
-{% if form.non_field_errors %}
-<div class="ym-fbox-text ym-error">
- {% for error in form.non_field_errors %}
- <p class="ym-message">{% trans error %}</p>
- {% endfor %}
-</div>
-{% endif %}
-
-<table>
- {% for current_field in form %}
- {% render_form_field current_field %}
- {% endfor %}
-</table>
-</form>
-
-<div id="bmr-result-container" style="display:hidden;">
- <p>{% trans 'Your basic metabolic rate is: ' %}
- <strong>
- <span id="bmr-result-value">{{user.userprofile.calculate_basal_metabolic_rate|floatformat:2}}</span>
- </strong>
- </p>
-</div>
-
-
-
-
-<h3>2 - {%trans "Physical activities" %}</h3>
-<p>{% blocktrans %}The physical activity level (PAL) is a factor used to to express
-the additional physical activity and is used to calculate the total energy
-required per day.{% endblocktrans %}</p>
-<form action="{% url 'calories-calculate-activities' %}"
- method="post"
- class="ym-form calories-autoform"
- id="activities-form">
-{% csrf_token %}
-
-{% if form.non_field_errors %}
-<div class="ym-fbox-text ym-error">
- {% for error in form_activities.non_field_errors %}
- <p class="ym-message">{% trans error %}</p>
- {% endfor %}
-</div>
-{% endif %}
-
-
-<table>
- {% render_form_field form_activities.sleep_hours %}
- <tr>
- <td class="dimmed">{% trans form_activities.work_hours.help_text %}</td>
- <td class="dimmed">{% trans form_activities.work_intensity.label %}</td>
- </tr>
- <tr>
- <td colspan="2">{% trans form_activities.work_hours.label %}</td>
- </tr>
- <tr>
- <td>{{form_activities.work_hours}}</td>
- <td>{{form_activities.work_intensity}}</td>
- </tr>
-
- <tr>
- <td colspan="2">{% trans form_activities.sport_hours.label %}</td>
- </tr>
- <tr>
- <td>{{form_activities.sport_hours}}</td>
- <td>{{form_activities.sport_intensity}}</td>
- </tr>
-
- <tr>
- <td colspan="2">{% trans form_activities.freetime_hours.label %}</td>
- </tr>
- <tr>
- <td>{{form_activities.freetime_hours}}</td>
- <td>{{form_activities.freetime_intensity}}</td>
- </tr>
-</table>
-
-
-</form>
-
-<div id="activities-result-container" style="display:hidden;">
- <p>{% trans 'Factor for daily activities: ' %} <strong><span id="activities-result-value">{{user.userprofile.calculate_activities|floatformat:2}}</span></strong></p>
-</div>
-
-
-
-
-
-<h3>3 - {% trans "Total daily calories" %}</h3>
-<p>{% blocktrans %}The base caloric intake is the amount of calories your metabolism
-needs based on your level of physical activity.{% endblocktrans %}</p>
-<form action=""
- method="post"
- class="ym-form calories-autoform"
- id="base-calories-form">
-{% csrf_token %}
-<table>
- <tr>
- <td>{% trans "Basic caloric intake" %}</td>
- <td><span id="id_base_calories"></span></td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="submit" value="{% trans 'Calculate basic caloric intake' %}" id="form-calculate-daily-calories">
- </td>
- </tr>
-</table>
-</form>
-
-
-<p>{% blocktrans %}The total calories are the actual total calories per day. This
-might include e.g. a surplus or deficit if you are bulking or cutting. Alternatively
-you might just enter yourself the amount of calories if you know the value.{% endblocktrans %}
-</p>
-<form action=""
- method="post"
- class="ym-form"
- id="total-calories-form">
-{% csrf_token %}
-<table>
- {% render_form_field form_calories.additional_calories %}
- {% render_form_field form_calories.calories %}
-</table>
-
-<input type="submit" value="{% trans 'Transfer basic intake to total daily calories' %}" id="form-transfer-calories">
-<input type="submit" value="{% trans 'Add additional calories to total daily calories' %}" id="add-calories-total">
-<input type="submit" value="{% trans 'Save total calories to profile' %}" id="form-update-calories">
-</form>
-
-
-{% endblock %}
-
-
-{# #}
-{# Side bar #}
-{# #}
-{% block sidebar %}
-<h3>{% trans "Info" %}</h3>
-<p>{% blocktrans %}Please note that these calculations can only be an
-approximation. If you base your nutrition plan on these values, observe
-yourself for some weeks and change the total amount if needed.{% endblocktrans %}</p>
-{% endblock %}
diff --git a/wger/nutrition/templates/mobile/units/list.html b/wger/nutrition/templates/mobile/units/list.html
deleted file mode 100644
index 030fc9a3b..000000000
--- a/wger/nutrition/templates/mobile/units/list.html
+++ /dev/null
@@ -1,75 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-
-{% block title %}{% trans "Ingredient weight units" %}{% endblock %}
-
-
-{% block content %}
-
-<table>
-<thead>
-<tr>
- <th>{% trans "Actions" %}</th>
- <th>{% trans "Name" %}</th>
-</tr>
-</thead>
-<tbody>
-{% for unit in unit_list %}
-<tr>
- <td class="no-hover">
- <a href="{% url 'weight-unit-delete' unit.id %}"
- data-role="button"
- data-inline="true"
- data-mini="true">
- <img src="{% static 'images/icons/trash.svg' %}"
- width="22"
- height="22"
- alt="{% trans 'Delete' %}"
- title="{% trans 'Delete' %}">
- </a>
- <a href="{% url 'weight-unit-edit' unit.id %}"
- data-role="button"
- data-inline="true"
- data-mini="true">
- <img src="{% static 'images/icons/edit.svg' %}"
- width="22"
- height="22"
- alt="{% trans 'Edit' %}"
- title="{% trans 'Edit' %}">
- </a>
- </td>
- <td>{{unit.name}}</td>
-</tr>
-{% empty %}
-<tr>
- <td colspan="2">{% trans "No units found" %}</td>
-</tr>
-{% endfor %}
-</tbody>
-
-</table>
-<div style="padding-top:3em;"></div>
-{% pagination paginator page_obj %}
-{% endblock %}
-
-
-
-
-{% block sidebar %}
-{% if perms.exercises %}
-<h3>{% trans "Options" %}</h3>
-<p>
- <a href="{% url 'weight-unit-add' %}"
- data-role="button">
- <img src="{% static 'images/icons/new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add new weight unit' %}"
- title="{% trans 'Add new weight unit' %}">
- {% trans "Add new weight unit" %}
- </a>
-</p>
-{% endif %}
-{% endblock %}
diff --git a/wger/nutrition/templates/rate/form.html b/wger/nutrition/templates/rate/form.html
index 5807cdb8a..1815261f0 100644
--- a/wger/nutrition/templates/rate/form.html
+++ b/wger/nutrition/templates/rate/form.html
@@ -62,12 +62,12 @@ required per day.{% endblocktrans %}</p>
{% render_form_field form_activities.sleep_hours %}
<div class="row">
- <div class="col-md-6">
+ <div class="col-md-6 col-xs-6">
{% render_form_field form_activities.work_hours %}
{% render_form_field form_activities.sport_hours %}
{% render_form_field form_activities.freetime_hours %}
</div>
- <div class="col-md-6">
+ <div class="col-md-6 col-xs-6">
{% render_form_field form_activities.work_intensity %}
{% render_form_field form_activities.sport_intensity %}
{% render_form_field form_activities.freetime_intensity %}
@@ -109,12 +109,13 @@ needs based on your level of physical activity.{% endblocktrans %}</p>
might include e.g. a surplus or deficit if you are bulking or cutting. Alternatively
you might just enter yourself the amount of calories if you know the value.{% endblocktrans %}
</p>
+
<form action=""
method="post"
class="form-horizontal"
id="total-calories-form">
- <div class="row">
{% csrf_token %}
+
{% render_form_field form_calories.additional_calories %}
{% render_form_field form_calories.calories %}
@@ -129,10 +130,7 @@ you might just enter yourself the amount of calories if you know the value.{% en
<p>
<input type="submit" class="btn btn-default btn-block" value="{% trans 'Save total calories to profile' %}" id="form-update-calories">
</p>
- </div>
</form>
-
-
{% endblock %}
diff --git a/wger/nutrition/templates/units/list.html b/wger/nutrition/templates/units/list.html
index 8eb4c0976..59018a7a8 100644
--- a/wger/nutrition/templates/units/list.html
+++ b/wger/nutrition/templates/units/list.html
@@ -58,7 +58,7 @@
<h3>{% trans "Options" %}</h3>
<p>
<a href="{% url 'weight-unit-add' %}"
- class="wger-modal-dialog">
+ {% auto_link_css flavour "wger-modal-dialog" %}>
<img src="{% static 'images/icons/new.svg' %}"
width="32"
height="32"
diff --git a/wger/software/templates/functions.html b/wger/software/templates/functions.html
index adefea7ce..e1c2f82f6 100644
--- a/wger/software/templates/functions.html
+++ b/wger/software/templates/functions.html
@@ -137,7 +137,7 @@ This means that other training forms like pyramid training or similar are
not a problem.{% endblocktrans %}</p>
<img src="{% static 'images/workout-manager-1.0.3-en.png' %}"
- class="bordered flexible"
+ class="img-responsive img-rounded"
alt="">
<p>{% blocktrans %}<strong>Note:</strong> it has no 'preset' workouts that you
@@ -163,7 +163,8 @@ the weights and repetitions you did for each exercise. As with the (body) weight
it will generate some diagrams so so you can see at a glance how well you are doing.
The raw numbers are still accessible as a table.{% endblocktrans %}</p>
-<img src="{% static 'images/workout-log-1.1-en.png' %}" class="bordered flexible">
+<img src="{% static 'images/workout-log-1.1-en.png' %}"
+ class="img-responsive img-rounded">
<a name="workout-schedules"></a>
<h3>{% trans "Workout schedules" %}</h3>
@@ -189,7 +190,9 @@ will display your progress.{% endblocktrans %}</p>
review, it will be added to the general database.{% endblocktrans %}</p>
-<img src="{% static 'images/muscle-overview-1.1-en.png' %}" class="bordered flexible" alt="">
+<img src="{% static 'images/muscle-overview-1.1-en.png' %}"
+ class="img-responsive img-rounded"
+ alt="">
<a name="weight-tracker"></a>
@@ -201,7 +204,9 @@ reaching your goals (be it gaining mass or losing it).{% endblocktrans %}</p>
<p>{% blocktrans %}In case you want to jump ship after inputing your data from the
last years, simply export the data as CSV.{% endblocktrans %}</p>
-<img src="{% static 'images/weight-chart-1.0.3-en.png' %}" class="bordered flexible" alt="">
+<img src="{% static 'images/weight-chart-1.0.3-en.png' %}"
+ class="img-responsive img-rounded"
+ alt="">
<a name="weight-import"></a>
<h3>{% trans "Import" %}</h3>
@@ -218,7 +223,9 @@ carbohydrates, and so on) about it. For the ingredients, it uses the very comple
list provided by the US Department of Agriculture, with around 8000
entries.{% endblocktrans %}</p>
-<img src="{% static 'images/nutrition-manager-1.0.3-en.png' %}" class="bordered flexible" alt="">
+<img src="{% static 'images/nutrition-manager-1.0.3-en.png' %}"
+ class="img-responsive img-rounded"
+ alt="">
<p>{% blocktrans %}<strong>Note:</strong> this is not a log keeper. It does not
keep track of what you actually ate during the day and how it compares to
diff --git a/wger/software/templates/mobile/functions.html b/wger/software/templates/mobile/functions.html
deleted file mode 100644
index e7d643026..000000000
--- a/wger/software/templates/mobile/functions.html
+++ /dev/null
@@ -1,235 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-
-
-{% block title %}{% trans "Features" %}{% endblock %}
-
-{% block content %}
-
-<div style="text-align:center;">
- <img src="{% static 'images/logos/logo-no-padding.svg' %}"
- width="60%"
- alt="wger Workout Manager">
-</div>
-
-<p>{% blocktrans %}wger Workout Manager is a free, open source web application that manages
-your exercises and workouts. It started as a pet project of mine to replace my
-growing collection of different spreadsheets, but it has become something other
-people could also find useful.{% endblocktrans %}</p>
-
-
-<div data-role="collapsible-set" data-inset="false" style="margin-top:1.5em;">
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "Edit window for a new set" %}</h3>
- <img src="{% static 'images/screen7-crop.png' %}" width="100%;">
- <p>{% blocktrans %}With this simple form you create
-a new set with the repetitions and exercises you want. Repeat this
-step a couple of times, and you have your workout ready.{% endblocktrans %}</p>
- </div>
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "The workout manager" %}</h3>
- <img src="{% static 'images/screen1-crop.png' %}" width="100%;">
- <p>{% blocktrans %}A day of a simple workout with a few exercises.
-If you don't want to see the comments for correct execution, you can hide
-them.{% endblocktrans %}</p>
- </div>
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "Weight log" %}</h3>
- <img src="{% static 'images/screen2-crop.png' %}" width="100%;">
- <p>{% blocktrans %}Some weight entries for two exercises. Each
-colour represents a different repetition so you can see how well you are
-doing.{% endblocktrans %}</p>
- </div>
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "Muscle overview" %}</h3>
- <img src="{% static 'images/screen3-crop.png' %}" width="100%;">
- <p>{% blocktrans %}An overview of the body's muscles and the
-available exercises that mainly train the currently selected one.{% endblocktrans %}</p>
- </div>
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "Body weight" %}</h3>
- <img src="{% static 'images/screen4-crop.png' %}" width="100%;">
- <p>{% blocktrans %}The chart shows the evolution of the
-body weight. With the small version below, you can zoom in a time period.{% endblocktrans %}</p>
-
- </div>
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "Nutrition plan" %}</h3>
- <img src="{% static 'images/screen5-crop.png' %}" width="100%;">
- <p>{% blocktrans %}The two first meals of a nutritional plan.
-The nutritional values (energy, protein, etc.) are calculated too, but
-are not shown in the picture.{% endblocktrans %}</p>
- </div>
- <div data-role="collapsible" data-content-theme="c">
- <h3>{%trans "Ingredient detail view" %}</h3>
- <img src="{% static 'images/screen6-crop.png' %}" width="100%;">
- <p>{% blocktrans %}A detail view of an ingredient. With the
-calculator on the top it's possible to quickly calculate the nutritional
-values for a amount. 'Human' units such as slices are available for some
-ingredients.{% endblocktrans %}</p>
- </div>
-</div>
-
-
-<h3>{% trans "In short:" %}</h3>
-
-<div class="warning box">
-<h3>{% trans "a workout manager" %}</h3>
-<p>{% blocktrans %}create and manage your workout routines by selecting how
-many days your workout constists of, and adding different exercises to each.
-Print the generated PDF to keep a log.{% endblocktrans %}</p>
-</div>
-
-<div class="warning box">
-<h3>{% trans "a weight tracker" %}</h3>
-<p>{% blocktrans %}keep track of your progress with the weight log chart
-for each exercise and your own body weight. This makes it easy to see if you
-are reaching your goals or need to adjust something.{% endblocktrans %}</p>
-</div>
-
-<div class="warning box">
-<h3>{% trans "a nutrition manager" %}</h3>
-<p>{% blocktrans %}create a diet plan and see its nutritional
-values (total energy, protein, carbohydrates, and so on) about
-it. Select from more than 8000 ingredients for this.{% endblocktrans %}</p>
-</div>
-
-<a name="workout-manager"></a>
-<h2>{% trans "The workout manager" %}</h2>
-
-<p>{% blocktrans %}You probably guessed, this is the main function.
-It creates the workout you tell it, the way you tell it. It is pretty flexible
-so if you do supersets, no need to worry, it is supported and you will
-know which exercises <em>belong together</em>. Each set can have a different
-number of repetitions you want to reach and which you enter yourself.
-This means that other training forms like pyramid training or similar are
-not a problem.{% endblocktrans %}</p>
-
-<img src="{% static 'images/workout-manager-1.0.3-en.png' %}"
- alt=""
- width="100%;">
-
-<p>{% blocktrans %}<strong>Note:</strong> it has no 'preset' workouts that you
-can simply use (e.g. beginner, etc.). It will happily make the routine you tell
-it to do, but you have to decide which exercises and how many repetitions you'll
-do.{% endblocktrans %}</p>
-
-<a name="pdf-export"></a>
-<h3>{% trans "PDF export" %}</h3>
-
-{% with link='href="/static/pdf/workout-pdf-1.4-en.pdf" data-ajax="false" class="pdf-button"' %}
-<p>{% blocktrans %}It can also generate a PDF with your current routine.
-This is suitable for printing so you can bring it to the gym and keep a log
-for 7 weeks. In case you wonder how it looks like, <a {{link}}>here's a sample</a>.{% endblocktrans %}
-</p>
-{% endwith %}
-
-<a name="exercise-log"></a>
-<h3>{% trans "Exercise log" %}</h3>
-
-<p>{% blocktrans %}The electronic version of the above PDF output, you can enter
-the weights and repetitions you did for each exercise. As with the (body) weight,
-it will generate some diagrams so so you can see at a glance how well you are doing.
-The raw numbers are still accessible as a table.{% endblocktrans %}</p>
-
-<img src="{% static 'images/workout-log-1.1-en.png' %}"
- alt=""
- width="100%;">
-
-<a name="workout-schedules"></a>
-<h3>{% trans "Workout schedules" %}</h3>
-
-<p>{% blocktrans %}If you always do a couple of workouts in succession or
-are following a program that changes each week, you can manage this with
-the workout schedules. You enter how many weeks you want to do each individual
-workout and whether it should loop after reaching the last one. The correct
-currently active workout will then be shown on your dashboard.{% endblocktrans %}</p>
-
-
-<a name="muscle-exercise-db"></a>
-<h2>{% trans "Muscle and exercise database" %}</h2>
-<p>{% blocktrans %}The exercise database contains around hundred exercises
-from which you can choose when creating a workout. Some have important notes
-about the form to perform them. This is displayed in the workout overview
-page, so you keep them in mind.{% endblocktrans %}</p>
-
-<p>{% blocktrans %}If you entered weight logs for the currently shown exercise, it
-will display your progress.{% endblocktrans %}</p>
-
-<p>{% blocktrans %}You can also submit your own, if you miss one. After a quick
-review, it will be added to the general database.{% endblocktrans %}</p>
-
-
-<img src="{% static 'images/muscle-overview-1.1-en.png' %}" alt="" width="100%;">
-
-
-<a name="weight-tracker"></a>
-<h2>{% trans "The weight tracker" %}</h2>
-<p>{% blocktrans %}This simple part lets you log your body weight. From this
-data it generates a rather nice looking chart, so you can see if you are
-reaching your goals (be it gaining mass or losing it).{% endblocktrans %}</p>
-
-<p>{% blocktrans %}In case you want to jump ship after inputing your data from the
-last years, simply export the data as CSV.{% endblocktrans %}</p>
-
-<img src="{% static 'images/weight-chart-1.0.3-en.png' %}" alt="" width="100%;">
-
-<a name="weight-import"></a>
-<h3>{% trans "Import" %}</h3>
-
-<p>{% blocktrans %}If you already kept your weight in a spreadsheet, you can just
-import it by copy-and-paste'ing it into the import assistant.{% endblocktrans %}</p>
-
-
-<a name="nutritional-plans"></a>
-<h2>{% trans "The nutrition schedule manager" %}</h2>
-<p>{% blocktrans %}And finally it is a nutrition schedule manager. Here you can
-create a diet plan and see some nutritional values (total energy, protein,
-carbohydrates, and so on) about it. For the ingredients, it uses the very complete
-list provided by the US Department of Agriculture, with around 8000
-entries.{% endblocktrans %}</p>
-
-<img src="{% static 'images/nutrition-manager-1.0.3-en.png' %}" alt="" width="100%;">
-
-<p>{% blocktrans %}<strong>Note:</strong> this is not a log keeper. It does not
-keep track of what you actually ate during the day and how it compares to
-what the plan says. It simply shows you the nutritional values of the plan
-you create.{% endblocktrans %}</p>
-
-{% with link='href="/static/pdf/nutrition-plan-pdf-1.4-en.pdf" data-ajax="false" class="pdf-button"' %}
-<p>{% blocktrans %}It can also be downloaded as a PDF you can keep on your
-fridge, so you don't forget to follow the plan... And as with the workout
-log, <a {{link}}>here's a sample</a>.{% endblocktrans %}</p>
-{% endwith %}
-{% endblock %}
-
-
-{% block sidebar %}
-<h3>{% trans "Overview" %}</h3>
-<ul>
- <li>
- <a href="#workout-manager">{% trans "The workout manager" %}</a>
- <ul>
- <li><a href="#pdf-export">{% trans "PDF export" %}</a></li>
- <li><a href="#exercise-log">{% trans "Exercise log" %}</a></li>
- <li><a href="#workout-schedules">{% trans "Workout schedules" %}</a></li>
- </ul>
- </li>
-
- <li>
- <a href="#muscle-exercise-db">{% trans "Muscle and exercise database" %}</a>
- </li>
- <li>
- <a href="#weight-tracker">{% trans "The weight tracker" %}</a>
- <ul>
- <li><a href="#weight-import">{% trans "Import" %}</a>
- </ul>
- </li>
- <li>
- <a href="#nutritional-plans">{% trans "The nutrition schedule manager" %}</a>
-
- </li>
-</ul>
-{% endblock %}
diff --git a/wger/weight/templates/mobile/weight_overview.html b/wger/weight/templates/mobile/weight_overview.html
deleted file mode 100644
index e1c96adde..000000000
--- a/wger/weight/templates/mobile/weight_overview.html
+++ /dev/null
@@ -1,93 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-
-<!--
- Title
--->
-{% block title %}{% trans "Weight overview" %}{% endblock %}
-
-<!--
- Header data
--->
-{% block header %}
-<script src="{% static 'js/d3.js' %}"></script>
-<script src="{% static 'js/jquery-globalize/lib/globalize.js' %}"></script>
-
-
-<script type="text/javascript">
-$(document).on('pageinit', function () {
-
- $.getJSON("/weight/api/get_weight_data/", function(json) {
- weight_chart(json, $('#content').width() * 0.95);
- });
-});
-</script>
-{% endblock %}
-
-
-<!--
- Main Content
--->
-{% block content %}
-{% if not min_date %}
-<p>
- {% trans "There is no chart here because there are no weight entries." %}
- {% trans "Use link to add one." %}
-</p>
-{% endif %}
-
-<div id="weight_diagram"></div>
-
-<p>
-<a href="{% url 'weight-add' %}"
- id="add-weight-entry"
- data-role="button">{% trans "Add weight entry" %}</a>
-</p>
-
-<p>
- <em>{% trans "You can click on a value on the chart to edit it. "%}</em>
-</p>
-
-{% endblock %}
-
-
-<!--
- Side bar
--->
-{% block sidebar %}
-<h3>{% trans "Filter options" %}</h3>
-<p>{% blocktrans %}
-Use the second chart to pan or zoom by clicking and dragging the selection. Clicking
-on the background resets it.
-{% endblocktrans %}</p>
-
-
-<h3>{% trans "Options" %}</h3>
-<p>
- <a href="{% url 'wger.weight.views.export_csv' %}"
- target="_blank"
- data-role="button">
- <img src="{% static 'images/icons/save.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Export as CSV' %}"
- title="{% trans 'Export as CSV' %}">
- {% trans "Export as CSV" %}
- </a>
-</p>
-
-<p>
- <a href="{% url 'weight-import-csv' %}"
- data-role="button">
- <img src="{% static 'images/icons/csv-table.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Import from spreadsheet' %}"
- title="{% trans 'Import from spreadsheet' %}">
- {% trans "Import from spreadsheet" %}
- </a>
-</p>
-
-
-{% endblock %}
diff --git a/wger/weight/templates/weight_overview.html b/wger/weight/templates/weight_overview.html
index d00dede61..36b988201 100644
--- a/wger/weight/templates/weight_overview.html
+++ b/wger/weight/templates/weight_overview.html
@@ -1,6 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
+{% load i18n staticfiles wger_extras %}
<!--
Title
@@ -40,7 +39,7 @@ $(document).ready(function () {
<p>
<a href="{% url 'weight-add' %}"
- class="wger-modal-dialog"
+ {% auto_link_css flavour "wger-modal-dialog" %}
id="add-weight-entry">{% trans "Add weight entry" %}</a>
</p>
@@ -65,7 +64,8 @@ on the background resets it.
<h3>{% trans "Options" %}</h3>
<p>
<a href="{% url 'wger.weight.views.export_csv' %}"
- target="_blank">
+ target="_blank"
+ {% auto_link_css flavour %}>
<img src="{% static 'images/icons/save.svg' %}"
width="32"
height="32"
@@ -76,7 +76,7 @@ on the background resets it.
</p>
<p>
- <a href="{% url 'weight-import-csv' %}">
+ <a href="{% url 'weight-import-csv' %}" {% auto_link_css flavour %}>
<img src="{% static 'images/icons/csv-table.svg' %}"
width="32"
height="32"