diff --git a/cookbook/templates/meal_plan.html b/cookbook/templates/meal_plan.html
index 89483e5f7..7738fc50d 100644
--- a/cookbook/templates/meal_plan.html
+++ b/cookbook/templates/meal_plan.html
@@ -68,34 +68,20 @@
-
+
@@ -410,6 +396,15 @@
this.new_note_text = ''
return new_entry
},
+ planElementName: function (element) {
+ if (element.title) {
+ return element.title
+ } else if (element.recipe_name) {
+ return element.recipe_name
+ } else {
+ return element.name
+ }
+ },
planDetailRecipeUrl: function () {
return "{% url 'view_recipe' 12345 %}".replace(/12345/, this.plan_detail.recipe);
},