Skip to content

Commit

Permalink
remove download button if there is no document uploaded
Browse files Browse the repository at this point in the history
  • Loading branch information
“OMosimege” committed Jul 23, 2024
1 parent 3217164 commit 0c4723f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions app/templates/app/document_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ <h1>{{ document.title }}</h1>
</a>

<div class="mb-3">
<a href="{{ document.uploaded_file.url }}" download>
<button class="btn btn-primary btn-sm" type="submit">
<i class="detail-icon bi-file-earmark-arrow-down-fill"></i> {% trans "Download File" %}
</button>
</a>
{% if document.uploaded_file %}
<a href="{{ document.uploaded_file.url }}" download>
<button class="btn btn-primary btn-sm" type="submit">
<i class="detail-icon bi-file-earmark-arrow-down-fill"></i> {% trans "Download File" %}
</button>
</a>
{% endif %}
</div>

<div class="project-body">
Expand Down

0 comments on commit 0c4723f

Please sign in to comment.