Source

Herbisport / run / templates / article / recipe_detail.html

Full commit
{% extends "index.html" %}

{% block extrahead %}
	<meta name="keywords" content="Vegan, Vegetarian, Recipes, low fat, fat-free,{% for t in r.recipe_tags.all %}{{t.tag_name}},{%endfor%}" />
	<meta name="description" content="{%if recipe%} {{recipe.recipe_name}}: {{recipe.recipe_description}} {% endif %}" />
	<script type="text/javascript" src="http://photos.happyherbivore.com/swfobject.js?v=2.2"></script>
	<script type="text/javascript">
	var flashvars = {dataFile: "/recipexml/1/{%if recipe %}{{recipe.id}}{%endif%}/", showRegistration: "false"};
	var params = {wmode:"transparent", repeat: "false",};
	var attributes = {id: "monoslideshow", name: "monoslideshow",};
	swfobject.embedSWF("http://photos.happyherbivore.com/monoslideshow.swf", "flashContent", "500", "358", "10", false, flashvars, params, attributes);
	</script>
{% endblock %}

{% block title %} {{ recipe.recipe_name }} {% endblock %}

{% block content %} 
<div class="box_content box_shadow margin">
  <div class="box_content_head"></div>
	<div class="box_content_body">
	<div class="menu_content">
	{% if recipe %}
	{% load fractions %}
		<!-- Begin Recipe -->
		<article class="recipe">
		  <header>
		    <h1 class="recipe_name" style='font-size:1.5em;'>{{ recipe.recipe_name }}</h1>
		    {% if photocount %}
		      <div id="flashContent" style="height:317px;">
			    <p>Please <a href="http://get.adobe.com/flashplayer/">install Flash&reg;</a> and turn on Javascript.</p>		
		      </div>
		    {% endif %}  
		     <!--
		    <div>Rating: ****  Read Reviews (20)</div>
		    <div>Rate/Review | 121 people have saved this.</div>
		    <span>
		    <form action="/lists/add/{{ recipe.id}}/" method="post">
		    <input type="submit" value="Add to Shopping List" /></form></span> -->
		    <h2 style="font-size:'0.8em;color:#888;'">Servings: {{ recipe.recipe_servings|floatformat:"-2" }}</h2>
		  </header>
		    <h2>Description:</h2>
		    <div class="description">{{ recipe.recipe_description|safe }}</div>
				
		    <h2>Ingredients:</h2>
		    <ul class="ingredients">
		    {% for r in recipe.recipeingredient_set.all %}
			    <li>{% if r.ri_amount %}<strong>{{ r.ri_amount|html_fraction|safe}}</strong>{% endif %} {{ r.ri_measurement.m_name }}
			    {{ r.ri_ingred.ingred_name }} {% if r.ri_optional %}(optional){% endif %}
			    </li>
		    {% endfor %}
		    </ul>
		    
		    <h2>Instructions:</h2>
		    <p>{{ recipe.recipe_instructions|safe|linebreaks }}</p>
		    <p>
		    <time datetime='{{ recipe.recipe_date_create }}' class="headline disqus_margin" pubdate>Recipe added on {{ recipe.recipe_date_create|date:"F j, Y"  }} | 
		    <!--- ShareThis -->
		    <script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=75a72ea6-5c90-44a6-9a1e-f90987fdd149&amp;type=website&amp;post_services=email%2Cfacebook%2Ctwitter%2Cmyspace%2Cdigg%2Csms%2Cdelicious%2Cstumbleupon%2Creddit%2Cgoogle_bmarks%2Clinkedin%2Cbebo%2Cybuzz%2Cblogger%2Cyahoo_bmarks%2Cmixx%2Ctechnorati%2Cfriendfeed%2Cwordpress%2Cxanga"></script>
		    <!--- END ShareThis -->
		    </p>	
		
		</article>
		<!-- End Recipe -->
		<!-- Begin Comments -->
		{% ifequal recipe.recipe_enable_comments 1 %}
			{% load comments %}
			{% load mytags %}
				{% get_comment_list for recipe as comment_list %}
				{% get_comment_count for recipe as comment_count %}
				<div class="comments_intro">
					<p>
					<span class="bracket">{</span>
					<span>{{ comment_count }}</span>
					Reviews... read them below or
					<a rel="nofollow" href="#respond">add one</a>
					<span class="bracket">}</span>
					</p>					
				</div>
				
					<dl id="comment_list">
				{% for comment in comment_list %}
						<dt>
						<span class="avatar"><a rel="external nofollow" href={{ comment.user_url}}>{% show_gravatar comment.user_email 48 %}</a></span>
						<span class="comment_author"><a rel="external nofollow" href={{ comment.user_url}}>{{ comment.user_name }}</a></span>
						<span class="comment_time">{{ comment.submit_date|date:"F j, Y h:i A" }}</span>
						</dt>
							<dd>{{ comment.comment }}</dd>
				{% endfor %}		
					</dl>
			
				{% render_comment_form for recipe %}
		{% endifequal %}
	
	{% else %}
		<p>No Recipe exists for your request.</p>
	{% endif %}
	
	
	</div>
	</div><!-- box_content_body -->
	<div class="content_box_footer"></div>
</div><!-- box_content margin --> 		
{% endblock %}