regluit/frontend/templates/book_panel_addbutton.html

43 lines
1.8 KiB
HTML
Raw Normal View History

2016-05-11 14:41:50 +00:00
{% comment %}
status of book vis-a-vis user's wishlist.
Non-logged-in users should see login to add option.
Logged-in users, book on wishlist:
If they've pledged, that should be displayed, with no removal option.
If they're on their supporter page, they should have the option to remove it (except when pledged).
Elsewhere, they should see that it's on their wishlist.
Everyone else should have add-to-wishlist option.
(Needed ID for wishlist.js varies on search & supporter page.)
{% endcomment %}
{% if request.user.is_anonymous %}
<div class="moreinfo create-account">
2015-04-28 03:24:02 +00:00
<span title="{% if workid %}{% url 'work' workid %}{% else %}{% url 'googlebooks' googlebooks_id %}{% endif %}">Login to Fave</span>
</div>
2017-12-14 21:24:26 +00:00
{% elif supported %}
<div class="moreinfo on-wishlist">
2017-12-14 21:24:26 +00:00
<a href="{% url 'work' workid %}">Supported!</a>
</div>
2016-07-25 18:50:19 +00:00
{% elif supporter == request.user %}
{% if wishlist %}
<div class="moreinfo remove-wishlist">
<span id="p{{ workid }}">Un-Fave</span>
</div>
{% else %}
{% comment %} on the empty-wishlist slideshow {% endcomment %}
<div class="moreinfo add-wishlist">
2014-04-10 19:52:25 +00:00
<span class="work_id" id="p{{ workid }}">Add&nbsp;to&nbsp;Faves</span>
</div>
{% endif %}
2016-07-25 18:50:19 +00:00
{% elif work in wishlist %}
<div class="moreinfo on-wishlist">
<a href="/#">A Fave!</a>
</div>
{% else %}
<div class="moreinfo add-wishlist">
{% if on_search_page %}
2014-04-10 19:52:25 +00:00
<span class="gb_id" id="p{{ googlebooks_id }}">Add&nbsp;to&nbsp;Faves</span>
{% else %}
2014-04-10 19:52:25 +00:00
<span class="work_id" id="p{{ workid }}">Add&nbsp;to&nbsp;Faves</span>
{% endif %}
</div>
2016-07-25 18:50:19 +00:00
{% endif %}