feat: wishlist
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
{% load i18n %}
|
||||
{% if is_wishlisted %}
|
||||
<form action="" hx-post="{% url 'web:delete_from_wishlist' pk=product.pk %}" hx-swap="none">
|
||||
<input type="hidden" name="product" value="{{ product.pk }}">
|
||||
{% csrf_token %}
|
||||
<button class="flex items-center justify-center py-2.5 px-5 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
|
||||
{% include 'components/icons/like.svg' %}
|
||||
{% translate 'Quitar de la lista de deseados' %}
|
||||
</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<form action="" hx-post="{% url 'web:add_to_wishlist' %}" hx-swap="none">
|
||||
<input type="hidden" name="product" value="{{ product.pk }}">
|
||||
{% csrf_token %}
|
||||
<button class="flex items-center justify-center py-2.5 px-5 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-gray-100 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700">
|
||||
{% include 'components/icons/like.svg' %}
|
||||
{% translate 'Añadir a lista de deseados' %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user