298f34ea752d5a60fd7a3ad46bc277202313c1d8
[wolnelektury.git] / src / catalogue / templates / catalogue / snippets / like_button.html
1 {% load likes_book from social_tags %}
2 {% likes_book book as likes %}
3 <div class="star {% if not likes %}un{% endif %}like">
4   <div class="if-like" >
5     <a id="social-book-sets-{{ book.slug }}" data-callback='social-book-sets'
6        class='ajaxable' href='{% url "social_book_sets" book.slug %}'>★</a>
7   </div>
8   <div class="if-unlike">
9     <form id="social-like-book-{{ book.slug }}"
10           data-callback='social-like-book' method='post'
11           class='ajax-form' action='{% url "social_like_book" book.slug %}'>
12       {% csrf_token %}
13       <button type='submit'>☆</button>
14     </form>
15   </div>
16 </div>