mention this on the detail page
This commit is contained in:
parent
1367f05e00
commit
25ded403b7
2 changed files with 4 additions and 1 deletions
|
@ -36,7 +36,8 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="doc-link"><span class="doc-link-intro">Get print label: </span>
|
||||
<div class="doc-link">
|
||||
<span class="doc-link-intro">Get {% if document.is_pdf %}document with {% endif %}print label: </span>
|
||||
<a href="{% url "pile:label" document.id %}">{% url "pile:label" document.id %}</a></div>
|
||||
|
||||
{% if document.url %}
|
||||
|
|
|
@ -93,6 +93,8 @@ class DocumentView(BasePileView):
|
|||
except ObjectDoesNotExist:
|
||||
raise Http404
|
||||
|
||||
document.is_pdf = document.file.name is not None and document.file.name.endswith(".pdf")
|
||||
|
||||
return {
|
||||
'document': document,
|
||||
**base_context_data
|
||||
|
|
Loading…
Reference in a new issue