1 {% extends
"base.html" %}
3 <title>Product Information for {{pname}}
</title>
8 <h2>Product Information for {{pname}}
</h2>
10 <p><br>(For expository purposes, all document fields are listed below with their actual names;
11 a real customer-facing app would expose this information differently.)
</p>
14 {% for field in prod_doc.fields %}
15 <b>{{field.name}}
</b>:
{{field.value}}
<br/>
17 <br/><a href=
"{{review_link}}">Reviews for {{pname}}
</a>
21 <h4>Create a Review for {{pname}}
</h4>
23 <form action=
"/create_review" method=
"post">
24 <input type=
"hidden" name=
"pid" value=
"{{pid}}" />
25 <input type=
"hidden" name=
"category" value=
"{{category}}" />
26 <input type=
"hidden" name=
"pname" value=
"{{pname}}" />
27 <div class=
"clearfix">
28 <label for=
"comment">review comment:
</label>
30 <textarea name=
"comment" rows=
"3" cols=
"80">{{comment}}
</textarea>
34 <div class=
"clearfix">
35 <label for=
"rating">rating (
1-
5):
</label>
37 <input type=
"text" id=
"rating" name=
"rating" value=
"{{rating}}"/>
42 <input class=
"btn primary" id=
"subreview" name=
"subreview" type=
"submit" value=
"Review"/>
43 <input type=
"reset" class=
"btn primary" name=
"reviewreset" value=
"Clear"/>
47 {% if user_is_admin %}
48 <p>Delete this product and its reviews; no undo (admin).
</p>
49 <form action=
"/admin/delete_product" method=
"post">
50 <input type=
"hidden" name=
"pid" value=
"{{pid}}" />
52 <input class=
"btn primary" id=
"delete_prod" name=
"delete_prod" type=
"submit" value=
"Delete Product"/>