Add samples for search API.
[gae-samples.git] / search / product_search_python / templates / product.html
blobaee24e73478aab1b37cb5426e7d0298c7f72e2ad
1 {% extends "base.html" %}
2 {% block head %}
3 <title>Product Information for {{pname}}</title>
4 {% endblock %}
7 {% block content %}
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>
13 <p><br/>
14 {% for field in prod_doc.fields %}
15 <b>{{field.name}}</b>:&nbsp;{{field.value}} <br/>
16 {% endfor %}
17 <br/><a href="{{review_link}}">Reviews for {{pname}}</a>
18 </p>
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>
29 <div class="input">
30 <textarea name="comment" rows="3" cols="80">{{comment}}</textarea>
31 </div>
32 </div>
34 <div class="clearfix">
35 <label for="rating">rating (1-5):</label>
36 <div class="input">
37 <input type="text" id="rating" name="rating" value="{{rating}}"/>
38 </div>
39 </div>
41 <div class="actions">
42 <input class="btn primary" id="subreview" name="subreview" type="submit" value="Review"/>
43 <input type="reset" class="btn primary" name="reviewreset" value="Clear"/>
44 </div>
45 </form>
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}}" />
51 <div class="actions">
52 <input class="btn primary" id="delete_prod" name="delete_prod" type="submit" value="Delete Product"/>
53 </div>
54 </form>
55 {% endif %}
57 {% endblock %}