Began versioning
[cookbook.git] / cookbook / template / recipe.html
1 {% extends "base.html" %}
2
3 {% block page_title %}
4     {% if recipe.url %}
5         <a href="{{ recipe.url }}">{{ recipe.name }}</a>
6     {% else %}
7         {{ recipe.name }}
8     {% endif %}
9 {% endblock %}
10
11 {% block content %}
12     <p id="recipe-details">
13     {% if recipe.yield_ %}
14         <span class="detail-field-header">Yield:</span>
15         <span class="detail-field-contents">{{ recipe.yield_ }}</span><br />
16     {% endif %}
17     {% if recipe.author %}
18         <span class="detail-field-header">Author:</span>
19         <span class="detail-field-contents">{{ recipe.author }}</span><br />
20     {% endif %}
21     {% if recipe.source %}
22         <span class="detail-field-header">Source:</span>
23         <span class="detail-field-contents">{{ recipe.source }}</span><br />
24     {% endif %}
25
26     <div id="recipe-ingredient-blocks">
27     {% for ingredient_block in recipe.ingredient_blocks %}
28         <h2>{{ ingredient_block.heading() }}</h2>
29         <table>
30         {% for ingredient in ingredient_block %}
31             <tr>{{ ingredient.__unicode__() }}</tr>
32         {% endfor %}
33         </table>
34     {% endfor %}
35     </div>
36
37     <div id="recipe-directions">
38     <h2>Directions</h2>
39     {% for paragraph in recipe.directions.wrapped_paragraphs() %}
40         <p>{{ paragraph }}</p>
41     {% endfor %}
42     </div>
43 {% endblock %}