diff options
author | kinitrupti | 2015-09-24 18:23:55 +0530 |
---|---|---|
committer | kinitrupti | 2015-09-24 18:23:55 +0530 |
commit | 5b77fdb95f6c3d71dfa1dd5d7ff06cd8bf519c98 (patch) | |
tree | ecd898de068b63504d834bfbbe92be37728e33ea /tbc | |
parent | 2c58497010b8a2d505cb4ff976ad742a7773abf9 (diff) | |
download | Python-TBC-Interface-5b77fdb95f6c3d71dfa1dd5d7ff06cd8bf519c98.tar.gz Python-TBC-Interface-5b77fdb95f6c3d71dfa1dd5d7ff06cd8bf519c98.tar.bz2 Python-TBC-Interface-5b77fdb95f6c3d71dfa1dd5d7ff06cd8bf519c98.zip |
Hit-Count
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> |