From 3428e75b869b5e5be845c821c221ea53a16363df Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Tue, 24 Dec 2019 09:39:53 +0100 Subject: [PATCH] nice checkboxes --- .idea/jsLibraryMappings.xml | 2 +- cookbook/templates/recipe_view.html | 19 ++++++++++++++++--- cookbook/views/api.py | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml index e27c444b4..edf47886c 100644 --- a/.idea/jsLibraryMappings.xml +++ b/.idea/jsLibraryMappings.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/cookbook/templates/recipe_view.html b/cookbook/templates/recipe_view.html index d32e66ffe..ce439a200 100644 --- a/cookbook/templates/recipe_view.html +++ b/cookbook/templates/recipe_view.html @@ -5,6 +5,11 @@ {% block title %}{% trans 'View' %}{% endblock %} +{% block extra_head %} + +{% endblock %} + {% block content %}

{{ recipe.name }}

@@ -40,9 +45,16 @@ {% for i in ingredients %} - - - + + {% endfor %}
{{ i.amount.normalize }} {{ i.unit }}{{ i.name }} +
+ +
+ +
+
+ +
{{ i.name }}
@@ -114,4 +126,5 @@ {% if recipe.storage %} {% include 'include/recipe_open_modal.html' %} {% endif %} + {% endblock %} \ No newline at end of file diff --git a/cookbook/views/api.py b/cookbook/views/api.py index 628016e75..9104f7e6c 100644 --- a/cookbook/views/api.py +++ b/cookbook/views/api.py @@ -15,7 +15,7 @@ from cookbook.provider.nextcloud import Nextcloud def get_file_link(request, recipe_id): recipe = Recipe.objects.get(id=recipe_id) - if recipe.instructions: + if recipe.internal: return HttpResponse(reverse('view_recipe', args=[recipe_id])) if recipe.storage.method == Storage.DROPBOX: if recipe.link == "":