Hide read button if no epub

foundation/reader
nicholas antonov 2018-04-03 13:32:00 -04:00
parent 03a9a30a0b
commit 0efba31c86
2 changed files with 4 additions and 1 deletions

View File

@ -179,11 +179,13 @@
</div>
</div>
<div class="bookSidebar">
{% if has_online_book %}
<div class="bookRead">
<a href="{% url 'read' work_id %}">
<button class="button expanded success">Read</button>
</a>
</div>
{% endif %}
<div class="bookDownload">
<a href="{% url 'download' work_id %}">
<button class="button expanded success">Download</button>

View File

@ -422,7 +422,8 @@ def work(request, work_id, action='display'):
'cover_width': cover_width_number,
'action': action,
'formset': formset,
'kwform': SubjectSelectForm()
'kwform': SubjectSelectForm(),
'has_online_book': work.first_epub() != None,
})
def edition_uploads(request, edition_id):