diff --git a/cookbook/templates/shopping_list.html b/cookbook/templates/shopping_list.html index 615b27190..6ac9eca30 100644 --- a/cookbook/templates/shopping_list.html +++ b/cookbook/templates/shopping_list.html @@ -196,6 +196,31 @@ + + {% trans 'Export' %} + + +
+
+ +
+ +
+ +
+
+ + + +
+
+ + +
+ @@ -220,6 +245,7 @@ shopping_list_id: {% if shopping_list_id %}{{ shopping_list_id }}{% else %}null{% endif %}, loading: true, edit_mode: false, + export_text_prefix: '', //TODO add userpreference recipe_query: '', recipes: [], shopping_list: undefined, @@ -264,6 +290,13 @@ return entries }, + export_text() { + let text = '' + for (let e of this.display_entries) { + text += `${this.export_text_prefix}${e.amount} ${e.unit.name} ${e.food.name} \n` + } + return text + }, }, /* watch: {