9b333c4020f8bd727930dcda019856753924cb81
[wolnelektury.git] / src / catalogue / templates / catalogue / snippets / like_button.html
1 {% load likes_book from social_tags %}
2 {% likes_book book.pk as likes %}
3 <div class="star {{ likes.if }}{{ likes.else }}un{{ likes.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>