acquired ebooks failed to show if wishlist empty [#59972462]
some complicated interaction with wishlists because this template copies a user'spull/1/head
parent
6ce980810e
commit
143b24c368
|
@ -50,7 +50,7 @@ function highlightTarget(targetdiv) {
|
|||
|
||||
|
||||
{% block topsection %}
|
||||
<div id="locationhash">{{ activetab }}</div>
|
||||
<div id="locationhash">{% ifequal activetab '#3' %}#1{% else %}{{ activetab }}{% endifequal %}</div>
|
||||
{% ifequal supporter request.user %}
|
||||
<div class="launch_top pale">You are logged in as the administrator of {{ library.user.username }}
|
||||
</div>
|
||||
|
@ -170,35 +170,16 @@ function highlightTarget(targetdiv) {
|
|||
{% endif %}
|
||||
{% if wishlist %}
|
||||
<div id="content-block-content">
|
||||
{% ifequal wishlist.works.all.count 0 %}
|
||||
{% if not works_active.count and not works_unglued.count %}
|
||||
{% ifequal request.user supporter %}
|
||||
<div class="empty-wishlist">
|
||||
|
||||
<div><h2 style="padding-left:35px;">Add a book to your list to get started.</h2><br /><br /></div>
|
||||
|
||||
<div id="js-slide">
|
||||
<div class="js-main">
|
||||
<div class="jsmodule">
|
||||
{% include "slideshow.html" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="js-maincontainer-bot-block">
|
||||
<div id="js-search">
|
||||
<label>What book would you give to the world? </label>
|
||||
<form action="{% url search %}" method="get">
|
||||
<input type="text" id="watermark" onfocus="imgfocus()" onblur="imgblur(0)" size="25" class="inputbox" name="q" value="{{ q }}">
|
||||
<input type="submit" class="greenbutton" value="Search">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br /><br /><hr />We'd also love to hear your <a href="/feedback">feedback</a>.
|
||||
<h2 style="padding-left:35px;">Your Unglue.it books will be listed here.</h2>
|
||||
<p>The "Available" tab will show all the books you have licensed though Unglue.it.
|
||||
The "Unglued" tab will show public domain, creative commons, and unglued titles that you add to your list of books</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-wishlist">
|
||||
It looks like {{ library.user.username }} is just getting started, and hasn't added books just yet.<br /><br />
|
||||
It looks like {{ library.user.username }} is just getting started, and isn't offering any books just yet.<br /><br />
|
||||
{% endifequal %}
|
||||
{% else %}
|
||||
|
||||
|
@ -257,7 +238,7 @@ function highlightTarget(targetdiv) {
|
|||
</div>
|
||||
|
||||
|
||||
{% endifequal %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
@ -1866,8 +1866,10 @@ def library(request,library_name):
|
|||
context['library'] = library = authenticator.library
|
||||
except Library.DoesNotExist:
|
||||
raise Http404
|
||||
context['works_active']= models.Work.objects.filter(acqs__user=library.user,acqs__license=LIBRARY).distinct()
|
||||
context['activetab'] = "#2"
|
||||
works_active= models.Work.objects.filter(acqs__user=library.user,acqs__license=LIBRARY).distinct()
|
||||
if works_active.count()>0:
|
||||
context['works_active'] = works_active
|
||||
context['activetab'] = "#2"
|
||||
context['ungluers'] = userlists.library_users(library, 5 )
|
||||
return supporter(request,library_name,template_name='libraryauth/library.html', extra_context=context)
|
||||
|
||||
|
|
Loading…
Reference in New Issue