Template source: _article_like_button.html

{% load i18n %} <form id="form-like" class="form-like" onsubmit="like(event)" action="{% url 'ajax_like_article' article.pk %}"> <div class="article-like"> {% if request.user.is_authenticated %} <button type="submit" class="btn article-like"> <i class='fa fa-thumbs-o-up'></i> {% trans 'Like' %} <span class="likes-count">{{ article.likes.count }}</span> </button> {% else %} <button type="button" class="btn article-like" data-toggle="modal" data-target="#modal-login"> <i class='fa fa-thumbs-o-up'></i> {% trans 'Like' %} <span class="likes-count">{{ article.likes.count }}</span> </button> {% endif %} <span class="messages-block"></span> </div> </form>