diff options
Diffstat (limited to 'templates/thread.html')
| -rw-r--r-- | templates/thread.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/thread.html b/templates/thread.html index 508b03a..b15dd45 100644 --- a/templates/thread.html +++ b/templates/thread.html @@ -53,6 +53,7 @@ $(".voteup").click(function() { // @TODO: Extract the message id from the HTML DOM element instead of hard coding it in Javascript. message_id = this.parentElement.getAttribute('messageid'); + {% if user.is_authenticated %} $.ajax({ type : "POST", url : '/vote/{{list_address}}/', @@ -67,10 +68,14 @@ } }); return false; + {% else %} + alert('You need to login in order to vote'); + {% endif %} }); $(".votedown").click(function() { message_id = this.parentElement.getAttribute('messageid'); + {% if user.is_authenticated %} $.ajax({ type : "POST", url : '/vote/{{list_address}}/', @@ -85,6 +90,10 @@ } }); return false; + {% else %} + alert('You need to login in order to vote'); + {% endif %} + }); }); |
