Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add a quick action link on warning boxes (no ingredients, no sets...)

Roland Geider55395175d8c4
diff --git a/manager/locale/de/LC_MESSAGES/django.mo b/manager/locale/de/LC_MESSAGES/django.mo
index ea7372efb..0037fb71a 100644
Binary files a/manager/locale/de/LC_MESSAGES/django.mo and b/manager/locale/de/LC_MESSAGES/django.mo differ
diff --git a/manager/locale/de/LC_MESSAGES/django.po b/manager/locale/de/LC_MESSAGES/django.po
index 369d4cdd9..de6307380 100644
--- a/manager/locale/de/LC_MESSAGES/django.po
+++ b/manager/locale/de/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-12 09:22+0200\n"
+"POT-Creation-Date: 2012-10-21 11:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -112,9 +112,9 @@ msgstr ""
msgid "Rest day"
msgstr "Ruhetag"
-#: views.py:359 views.py:369 templates/index.html:15
-#: templates/index.html.py:21 templates/workout/overview.html:21
-#: templates/workout/view.html:6 templates/workout/view.html.py:41
+#: views.py:359 views.py:369 templates/index.html:15 templates/index.html.py:21
+#: templates/workout/overview.html:21 templates/workout/view.html:6
+#: templates/workout/view.html.py:41
msgid "Workout"
msgstr "Trainingsplan"
@@ -210,6 +210,12 @@ msgstr "Unter der Affero GPL veröffentlicht"
msgid "Layout based on <a href='http://www.yaml.de'>YAML</a>"
msgstr "Layout basiert auf <a href='http://www.yaml.de'>YAML</a>"
+#: templates/form.html:45 templates/day/edit.html:26 templates/set/edit.html:59
+#: templates/setting/ajax_edit.html:71 templates/setting/edit.html:32
+#: templates/user/preferences.html:21 templates/workout/edit.html:25
+msgid "Save"
+msgstr ""
+
#: templates/index.html:5
msgid "Workout list"
msgstr "Liste der Trainingspläne"
@@ -223,8 +229,7 @@ msgid "No workouts found."
msgstr "Keine Trainingspläne gefunden."
#: templates/index.html:42 templates/index.html.py:80
-#: templates/tags/render_day.html:119 templates/tags/render_day.html.py:153
-#: templates/workout/overview.html:34 templates/workout/view.html:57
+#: templates/workout/overview.html:34
msgid "Use link to add one."
msgstr "Benutzen Sie den Verweis zum Hinzufügen."
@@ -250,7 +255,7 @@ msgstr ""
#: templates/index.html:80
msgid "No nutrition plans."
-msgstr "Keine Ernährungspläne"
+msgstr "Keine Ernährungspläne."
#: templates/index.html:85
msgid "Your current weight is: "
@@ -262,8 +267,7 @@ msgstr "Ihr aktuelles Gewicht ist: "
msgid "Add workout"
msgstr "Trainingsplan hinzufügen"
-#: templates/index.html:113 templates/index.html.py:114
-#: templates/index.html:115
+#: templates/index.html:113 templates/index.html.py:114 templates/index.html:115
msgid "Add nutrition plan"
msgstr "Ernährungsplan hinzufügen"
@@ -273,15 +277,14 @@ msgid ""
"goal."
msgstr ""
"Nach dem hinzufügen eines Training- oder Ernährungsplanes, kann man sie "
-"bearbeiten, um ein Ziel oder Beschreibung zu setzen"
+"bearbeiten, um ein Ziel oder Beschreibung zu setzen."
#: templates/index.html:129 templates/user/preferences.html:29
-#: templates/workout/overview.html:43 templates/workout/view.html:119
+#: templates/workout/overview.html:43 templates/workout/view.html:122
msgid "Options"
msgstr "Optionen"
-#: templates/index.html:135 templates/index.html.py:136
-#: templates/index.html:137
+#: templates/index.html:135 templates/index.html.py:136 templates/index.html:137
msgid "My preferences"
msgstr "Meine Einstellungen"
@@ -290,7 +293,7 @@ msgid "No account?"
msgstr "Kein Account?"
#: templates/login.html:35 templates/user/change_password.html:21
-#: templates/user/registration.html:20
+#: templates/user/registration.html:20 templates/user/reset_password.html:18
msgid "Register"
msgstr "Registrieren"
@@ -301,17 +304,11 @@ msgstr "Details für Tag"
#: templates/day/edit.html:15 templates/set/edit.html:31
#: templates/setting/edit.html:15 templates/tags/render_day.html:42
#: templates/tags/render_day.html.py:47 templates/tags/render_day.html:60
-#: templates/tags/render_day.html.py:64 templates/tags/render_day.html:126
-#: templates/tags/render_day.html.py:131
+#: templates/tags/render_day.html.py:64 templates/tags/render_day.html:130
+#: templates/tags/render_day.html.py:135
msgid "Edit"
msgstr "Bearbeiten"
-#: templates/day/edit.html:26 templates/set/edit.html:59
-#: templates/setting/ajax_edit.html:71 templates/setting/edit.html:32
-#: templates/user/preferences.html:21 templates/workout/edit.html:25
-msgid "Save"
-msgstr ""
-
#: templates/set/edit.html:8 templates/setting/edit.html:7
msgid "Set details"
msgstr "Details für Satz"
@@ -330,20 +327,29 @@ msgid "Move me"
msgstr "Bewege mich"
#: templates/tags/render_day.html:119
-msgid "No settings for this exercise."
-msgstr "Keine Wiederholungen für diese Übung."
+msgid "This exercise has no settings."
+msgstr "Diese Übung hat keine Einstellungen."
+
+#: templates/tags/render_day.html:122
+msgid "Edit them now."
+msgstr "Jetzt editieren."
-#: templates/tags/render_day.html:153
+#: templates/tags/render_day.html:157
msgid "No sets for this day."
msgstr "Keine Sätze für diesen Tag."
-#: templates/tags/render_day.html:161
+#: templates/tags/render_day.html:159
+msgid "Add one now."
+msgstr "Jetzt hinzufügen."
+
+#: templates/tags/render_day.html:168
msgid "Add workout set"
msgstr "Satz hinzufügen"
#: templates/user/change_password.html:4 templates/user/change_password.html:8
#: templates/user/preferences.html:44 templates/user/preferences.html.py:45
-#: templates/user/preferences.html:46
+#: templates/user/preferences.html:46 templates/user/reset_password.html:4
+#: templates/user/reset_password.html:8
msgid "Change password"
msgstr "Passwort ändern"
@@ -352,8 +358,8 @@ msgid "Preferences"
msgstr "Einstellungen"
#: templates/workout/edit.html:7 templates/workout/edit.html.py:15
-#: templates/workout/view.html:138 templates/workout/view.html.py:139
-#: templates/workout/view.html:140
+#: templates/workout/view.html:141 templates/workout/view.html.py:142
+#: templates/workout/view.html:143
msgid "Edit workout"
msgstr "Trainingsplan bearbeiten"
@@ -369,50 +375,53 @@ msgstr "Ziel"
msgid "No days for this workout."
msgstr "Keine Tage für diesen Trainingsplan."
-#: templates/workout/view.html:64
+#: templates/workout/view.html:59 templates/workout/view.html.py:67
msgid "Add training day"
msgstr "Trainingstag hinzufügen"
-#: templates/workout/view.html:69
+#: templates/workout/view.html:72
msgid "Show/Hide exercise comments"
msgstr "Kommentare der Übungen ein/ausblenden"
-#: templates/workout/view.html:82
+#: templates/workout/view.html:85
msgid "Steps"
msgstr "Schritte"
-#: templates/workout/view.html:85
+#: templates/workout/view.html:88
msgid "Add training days"
msgstr "Trainingstag hinzufügen"
-#: templates/workout/view.html:86
+#: templates/workout/view.html:89
msgid "Add working sets to days"
msgstr "Sätze zu den Tagen hinzufügen"
-#: templates/workout/view.html:88
+#: templates/workout/view.html:91
msgid "Set the repetitions for each set"
msgstr "Wiederholungen für den Satz eingeben"
-#: templates/workout/view.html:89
+#: templates/workout/view.html:92
msgid "use '99' for 'all repetitions you can do'"
msgstr "benutzen Sie '99' für 'So viele Wiederholungen wie es geht'"
-#: templates/workout/view.html:94
+#: templates/workout/view.html:97
msgid "Muscles trained"
msgstr "Trainierte Muskeln"
-#: templates/workout/view.html:97
+#: templates/workout/view.html:100
msgid ""
"Images show combined muscles as trained by the exercises on the workout."
msgstr ""
"Das Bild zeigt die kombinierten Muskeln, wie sie von den Übungen traniert "
"werden."
-#: templates/workout/view.html:126 templates/workout/view.html.py:127
-#: templates/workout/view.html:128
+#: templates/workout/view.html:129 templates/workout/view.html.py:130
+#: templates/workout/view.html:131
msgid "Download as PDF"
msgstr "Als PDF runterladen"
-#: templates/workout/view.html:149 templates/workout/view.html.py:150
+#: templates/workout/view.html:152 templates/workout/view.html.py:153
msgid "Delete this workout"
msgstr "Trainingsplan löschen"
+
+#~ msgid "No settings for this exercise."
+#~ msgstr "Keine Wiederholungen für diese Übung."
diff --git a/manager/static/css/workout-manager.css b/manager/static/css/workout-manager.css
index 429408b54..3246273d0 100644
--- a/manager/static/css/workout-manager.css
+++ b/manager/static/css/workout-manager.css
@@ -177,3 +177,14 @@ circle{
header h1{
text-shadow: 2px 3px 3px #292929;
}
+
+
+/*
+ * Links in warning boxes get a different style, the default blue doesn't match
+ * well with orange
+ */
+div.warning a, div.warning a:hover, div.warning a:active{
+ color: black;
+ text-decoration: underline;
+ background-color: transparent;
+}
\ No newline at end of file
diff --git a/manager/templates/tags/render_day.html b/manager/templates/tags/render_day.html
index d9ce08263..8afcc8581 100644
--- a/manager/templates/tags/render_day.html
+++ b/manager/templates/tags/render_day.html
@@ -114,7 +114,11 @@ $(document).ready(function() {
</span>
{% empty %}
<div class="box warning">
- {% trans "No settings for this exercise." %} {% trans "Use link to add one." %}
+ {% trans "This exercise has no settings." %}
+ <a href="{% url manager.views.edit_setting workout.id set.id exercise.id None %}"
+ class="ajax-set-edit">
+ {% trans "Edit them now."%}
+ </a>
</div>
{% endfor %} <!--for setting in exercise-->
</span>
@@ -148,7 +152,10 @@ $(document).ready(function() {
<tr>
<td colspan="2">
<div class="box warning">
- {% trans "No sets for this day." %} {% trans "Use link to add one." %}
+ {% trans "No sets for this day." %}
+ <a href="{% url manager.views.edit_set workout.id day.id None %}"
+ class="modal-dialog">{% trans "Add one now." %}
+ </a>
</div>
{% endfor %} <!--for set in day-->
</td>
diff --git a/manager/templates/workout/view.html b/manager/templates/workout/view.html
index 88864f816..105d41d27 100644
--- a/manager/templates/workout/view.html
+++ b/manager/templates/workout/view.html
@@ -54,13 +54,16 @@ $(document).ready(function() {
</div>
{% empty %}
<p class="box warning">
- {% trans "No days for this workout." %} {% trans "Use link to add one." %}
+ {% trans "No days for this workout." %}
+ <a href="{% url manager.views.edit_day workout.id None %}" class="modal-dialog">
+ {% trans "Add training day" %}
+ </a>
</p>
{% endfor %}
<p>
-<a href="{% url manager.views.edit_day workout.id day.id %}" class="modal-dialog">
+<a href="{% url manager.views.edit_day workout.id None %}" class="modal-dialog">
{% trans "Add training day" %}
</a>
diff --git a/nutrition/locale/de/LC_MESSAGES/django.po b/nutrition/locale/de/LC_MESSAGES/django.po
index 8aa2ad74c..79e5ef4f0 100644
--- a/nutrition/locale/de/LC_MESSAGES/django.po
+++ b/nutrition/locale/de/LC_MESSAGES/django.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-12 09:16+0200\n"
+"POT-Creation-Date: 2012-10-21 11:48+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -22,7 +22,7 @@ msgstr ""
msgid "User"
msgstr "Benutzer"
-#: models.py:39 models.py:90
+#: models.py:39 models.py:92
msgid "Language"
msgstr "Sprache"
@@ -41,74 +41,77 @@ msgid ""
msgstr ""
"Eine Beschreibung des Ernährungplanes, z.B. \"Vorbereitung für den Sommer\""
-#: models.py:93
+#: models.py:95
msgid "Name"
msgstr ""
-#: models.py:96 templates/view_ingredient.html:37
-#: templates/view_nutrition_plan.html:187
+#: models.py:98 templates/view_ingredient.html:37
+#: templates/view_nutrition_plan.html:195
msgid "Energy"
msgstr "Energie"
-#: models.py:97
+#: models.py:99
msgid "In kcal per 100g"
msgstr "In kcal pro 100g"
-#: models.py:100 templates/view_ingredient.html:41
-#: templates/view_nutrition_plan.html:191
+#: models.py:102 templates/view_ingredient.html:41
+#: templates/view_nutrition_plan.html:199
msgid "Protein"
msgstr "Eiweiß"
-#: models.py:101 models.py:105 models.py:110 models.py:114 models.py:119
-#: models.py:124 models.py:129
+#: models.py:103 models.py:107 models.py:112 models.py:116 models.py:121
+#: models.py:126 models.py:131
msgid "In g per 100g of product"
msgstr "In g pro 100g Produkt"
-#: models.py:104 templates/view_ingredient.html:45
-#: templates/view_nutrition_plan.html:195
+#: models.py:106 templates/view_ingredient.html:45
+#: templates/view_nutrition_plan.html:203
msgid "Carbohydrates"
msgstr "Kohlenhydrate"
-#: models.py:109 templates/view_ingredient.html:49
+#: models.py:111 templates/view_ingredient.html:49
+#: templates/view_nutrition_plan.html:207
msgid "Sugar content in carbohydrates"
msgstr "Davon Zucker"
-#: models.py:113 templates/view_ingredient.html:53
-#: templates/view_nutrition_plan.html:199
+#: models.py:115 templates/view_ingredient.html:53
+#: templates/view_nutrition_plan.html:211
msgid "Fat"
msgstr "Fett"
-#: models.py:118 templates/view_ingredient.html:57
+#: models.py:120 templates/view_ingredient.html:57
+#: templates/view_nutrition_plan.html:215
msgid "Saturated fat content in fats"
msgstr "Davon gesättigte Fette"
-#: models.py:123 templates/view_ingredient.html:73
-#: templates/view_nutrition_plan.html:215
+#: models.py:125 templates/view_ingredient.html:73
+#: templates/view_nutrition_plan.html:231
msgid "Fibres"
msgstr "Ballastoffe"
-#: models.py:128 templates/view_ingredient.html:77
+#: models.py:130 templates/view_ingredient.html:77
+#: templates/view_nutrition_plan.html:235
msgid "Sodium"
msgstr "Natrium"
-#: models.py:141 models.py:155 templates/nutrition_overview.html:20
+#: models.py:143 models.py:157 templates/nutrition_overview.html:20
#: templates/view_nutrition_plan.html:5 templates/view_nutrition_plan.html:46
msgid "Nutrition plan"
msgstr "Ernährungsplan"
-#: models.py:142 models.py:156
+#: models.py:144 models.py:158
msgid "Order"
msgstr "Reihenfolge"
-#: models.py:143
+#: models.py:145
msgid "Time (approx)"
msgstr "Uhrzeit (ca.)"
-#: models.py:160
+#: models.py:162
msgid "Amount in gramms"
msgstr "Menge in Gramm"
-#: models.py:169
+#: models.py:171
msgid "Ingredient"
msgstr "Zutat"
@@ -136,8 +139,8 @@ msgid "Created on the <b>%s</b>"
msgstr ""
#: templates/edit_ingredient.html:5 templates/edit_ingredient.html.py:10
-#: templates/view_ingredient.html:104 templates/view_ingredient.html.py:109
-#: templates/view_ingredient.html:110 templates/view_ingredient.html.py:111
+#: templates/view_ingredient.html:104 templates/view_ingredient.html.py:108
+#: templates/view_ingredient.html:109 templates/view_ingredient.html.py:110
msgid "Edit ingredient"
msgstr "Zutat bearbeiten"
@@ -174,13 +177,11 @@ msgid "No ingredients."
msgstr "Keine Zutaten"
#: templates/ingredient_overview.html:32 templates/nutrition_overview.html:29
-#: templates/view_nutrition_plan.html:130
-#: templates/view_nutrition_plan.html:139
msgid "Use link to add one."
msgstr ""
#: templates/ingredient_overview.html:39 templates/nutrition_overview.html:38
-#: templates/view_ingredient.html:88 templates/view_nutrition_plan.html:227
+#: templates/view_ingredient.html:88 templates/view_nutrition_plan.html:243
msgid "Options"
msgstr ""
@@ -210,11 +211,11 @@ msgstr "Ernährungsplan hinzufügen"
msgid "Nutritional values in 100g of product."
msgstr "Ernährungswerte in 100g Produkt"
-#: templates/view_ingredient.html:31 templates/view_nutrition_plan.html:181
+#: templates/view_ingredient.html:31 templates/view_nutrition_plan.html:189
msgid "Macronutrients"
msgstr "Makronährstoffe"
-#: templates/view_ingredient.html:67 templates/view_nutrition_plan.html:209
+#: templates/view_ingredient.html:67 templates/view_nutrition_plan.html:225
msgid "Others"
msgstr "Andere"
@@ -252,6 +253,7 @@ msgstr "Mahlzeit löschen"
#: templates/view_nutrition_plan.html:79
#: templates/view_nutrition_plan.html:119
#: templates/view_nutrition_plan.html:124
+#: templates/view_nutrition_plan.html:132
msgid "Edit"
msgstr ""
@@ -267,21 +269,26 @@ msgstr "Zutat zur Mahlzeit hinzufügen"
msgid "No items for this meal."
msgstr "Keine Zutaten für diese Mahlzeit."
-#: templates/view_nutrition_plan.html:139
+#: templates/view_nutrition_plan.html:134
+#: templates/view_nutrition_plan.html:146
+msgid "Add one now."
+msgstr ""
+
+#: templates/view_nutrition_plan.html:144
msgid "No meals for this plan."
msgstr "Keine Mahlzeiten für diesen Ernährungsplan"
-#: templates/view_nutrition_plan.html:149
-#: templates/view_nutrition_plan.html:150
-#: templates/view_nutrition_plan.html:151
+#: templates/view_nutrition_plan.html:157
+#: templates/view_nutrition_plan.html:158
+#: templates/view_nutrition_plan.html:159
msgid "Add a new meal"
msgstr "Neue Mahlzeit hinzufügen"
-#: templates/view_nutrition_plan.html:153
+#: templates/view_nutrition_plan.html:161
msgid "After adding, edit to set the time."
msgstr "Nach dem Hinzufügen, bearbeiten um die Uhrzeit zu setzen."
-#: templates/view_nutrition_plan.html:161
+#: templates/view_nutrition_plan.html:169
msgid ""
"If you find the ingredient list too short, you might want to activate the "
"preference to also show English ingredients."
@@ -289,34 +296,33 @@ msgstr ""
"Wenn die Liste der verfügbaren Zutaten zu kurz ist, können Sie die Option "
"benutzen, um auch Zutaten auf englisch anzuzeigen."
-#: templates/view_nutrition_plan.html:162
+#: templates/view_nutrition_plan.html:170
msgid "That's done here"
msgstr "Das wird hier gemacht"
-#: templates/view_nutrition_plan.html:166
-#: templates/view_nutrition_plan.html:256
-#: templates/view_nutrition_plan.html:257
+#: templates/view_nutrition_plan.html:174
+#: templates/view_nutrition_plan.html:272
+#: templates/view_nutrition_plan.html:273
msgid "Delete nutrition plan"
msgstr "Ernährungplan löschen"
-#: templates/view_nutrition_plan.html:176
+#: templates/view_nutrition_plan.html:184
msgid "Nutritional data"
msgstr "Ernährungswerte"
-#: templates/view_nutrition_plan.html:219
-msgid "Natrium"
-msgstr "Natrium"
-
-#: templates/view_nutrition_plan.html:234
-#: templates/view_nutrition_plan.html:235
-#: templates/view_nutrition_plan.html:236
+#: templates/view_nutrition_plan.html:250
+#: templates/view_nutrition_plan.html:251
+#: templates/view_nutrition_plan.html:252
msgid "Download as PDF"
msgstr ""
-#: templates/view_nutrition_plan.html:246
-#: templates/view_nutrition_plan.html:247
+#: templates/view_nutrition_plan.html:262
+#: templates/view_nutrition_plan.html:263
msgid "Edit nutrition plan"
msgstr "Ernährungplan bearbeiten"
+#~ msgid "Natrium"
+#~ msgstr "Natrium"
+
#~ msgid "Details for nutrition plan"
#~ msgstr "Details für Ernährungsplan"
diff --git a/nutrition/templates/view_nutrition_plan.html b/nutrition/templates/view_nutrition_plan.html
index 13745291c..1b76a8077 100644
--- a/nutrition/templates/view_nutrition_plan.html
+++ b/nutrition/templates/view_nutrition_plan.html
@@ -127,7 +127,12 @@ $(document).ready(function() {
</li>
{% empty %}
<div class="box warning">
- {% trans "No items for this meal." %} {% trans "Use link to add one." %}
+ {% trans "No items for this meal." %}
+ <a href="{% url nutrition.views.edit_meal_item plan.id meal.id item.id %}"
+ title="{% trans 'Edit' %}"
+ class="modal-dialog edit-meal">
+ {% trans "Add one now."%}
+ </a>
</div>
{% endfor %}
</ul>
@@ -136,7 +141,10 @@ $(document).ready(function() {
{% empty %}
<div class="box warning">
- {% trans "No meals for this plan." %} {% trans "Use link to add one." %}
+ {% trans "No meals for this plan." %}
+ <a href="{% url nutrition.views.add_meal plan.id %}">
+ {% trans "Add one now." %}
+ </a>
</div>
{% endfor %}