diff options
Diffstat (limited to 'tbc')
-rwxr-xr-x | tbc/templates/base.html | 7 | ||||
-rw-r--r-- | tbc/templates/tbc/book-details.html | 13 |
2 files changed, 18 insertions, 2 deletions
diff --git a/tbc/templates/base.html b/tbc/templates/base.html index a4a637c..639ce13 100755 --- a/tbc/templates/base.html +++ b/tbc/templates/base.html @@ -364,5 +364,10 @@ </script> <noscript><p><img src="http://analytics.spoken-tutorial.org/piwik.php?idsite=15" style="border:0;" alt="" /></p></noscript> <!-- End Piwik Code --> - </body> +{% block hitcount_javascript %}{% endblock %} +<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> +{% load staticfiles %} +{# example of adding your own hitcount-jquery #} +<script src="{% static 'hitcount/hitcount-jquery.js' %}"></script> +</body> </html> diff --git a/tbc/templates/tbc/book-details.html b/tbc/templates/tbc/book-details.html index 99c8ba6..470870c 100644 --- a/tbc/templates/tbc/book-details.html +++ b/tbc/templates/tbc/book-details.html @@ -1,6 +1,6 @@ {% extends 'base.html' %} {% load static %} - +{% load hitcount_tags %} {% block script %} <script> function redirectToIpynb(notebook) @@ -77,5 +77,16 @@ function redirectToIpynb(notebook) </tr> </table> +{% get_hit_count_js_variables for book as hitcount %} +{% get_hit_count for book as total_hits %} +<div class="row"> +<dl class="dl-horizontal"> +<dt>Total Hits:</dt> +<dd>{{ total_hits }}</dd> +</dl> </div> +{%endblock%} +{% block hitcount_javascript %} +{% insert_hit_count_js_variables for book %} {% endblock %} +</div> |