Added recipe editing pages.
[cookbook.git] / cookbook / template / recipe.html
index 5864d23a649564592eed3c649264ed0e4a21cf55..cd20d128bf17952144276cefc4669170c04e6e28 100644 (file)
@@ -51,6 +51,7 @@
     </form>
     {% endif %}
 
+    {% if recipe.ingredient_blocks %}
     <div id="recipe-ingredient-blocks">
     {% for ingredient_block in recipe.ingredient_blocks %}
        <h2>{{ ingredient_block.heading() }}</h2>
        </table>
     {% endfor %}
     </div>
+    {% endif %}
 
+    {% if recipe.directions %}
     <div id="recipe-directions">
     <h2>Directions</h2>
     {% for paragraph in recipe.directions.wrapped_paragraphs() %}
         <p>{{ paragraph }}</p>
     {% endfor %}
     </div>
+    {% endif %}
+
+    <p><a href="edit?name={{ recipe.clean_name(ascii=True) }}">
+       edit receipe</a></p>
 {% endblock %}