Mercurial > agora-palash
comparison templates/snippet/snippet_details.djhtml @ 201:c2a1c8950db2
Added code for Ratings Module to snippets template file
author | Ahsan Ali Shahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Fri, 19 Jul 2013 21:55:04 +0500 |
parents | 134f726fd62c |
children | c13a3ab314ab |
comparison
equal
deleted
inserted
replaced
200:49cda19bff99 | 201:c2a1c8950db2 |
---|---|
72 {% endif %} | 72 {% endif %} |
73 — | 73 — |
74 Language: {{ language }} | 74 Language: {{ language }} |
75 — | 75 — |
76 Number of views: {{ snippet.num_views }} | 76 Number of views: {{ snippet.num_views }} |
77 {% load ratings %} | |
78 Total Votes: {{ snippet.rating.votes }} | |
79 Rating: {{ score }} | |
77 </div> | 80 </div> |
78 </div><!-- closes .snippet-options --> | 81 </div><!-- closes .snippet-options --> |
79 <br /> | 82 <br /> |
80 | 83 |
81 {% include "snippet/snippet_box.djhtml" with lines=snippet.content_splitted %} | 84 {% include "snippet/snippet_box.djhtml" with lines=snippet.content_splitted %} |
82 | 85 |
83 <br /> | 86 <br /> |
87 <div id = "radio_votes"> | |
88 | |
89 <form action = "rating/process/" method = "POST" id="rate_form"> | |
90 {% csrf_token%} | |
91 <h3 id ="rate_label">Rate this Snippet:</h3> | |
92 {{ snippet_form.Rate }} | |
93 <input type="hidden" name="next" value="{{ request.get_full_path }}" /> | |
94 </form> | |
95 </div> | |
96 <br/> | |
84 <h2> Comments for this snippet: </h2>{% with snippet as object %}{% include "comments/rawcomment.html" %}{% endwith %}. | 97 <h2> Comments for this snippet: </h2>{% with snippet as object %}{% include "comments/rawcomment.html" %}{% endwith %}. |
85 | 98 |
86 <h2 id="revise">{% trans "Revise this snippet" %}</h2> | 99 <h2 id="revise">{% trans "Revise this snippet" %}</h2> |
87 | 100 |
88 {% include "snippet/snippet_form.djhtml" %} | 101 {% include "snippet/snippet_form.djhtml" %} |