Skip to content

Commit

Permalink
Merge pull request #97 from SADiLaR/feature/fix-download-file-error
Browse files Browse the repository at this point in the history
remove download if no document
  • Loading branch information
OnaMosimege authored Jul 23, 2024
2 parents 9f1b97b + 0c4723f commit ccf81cd
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 ccf81cd

Please sign in to comment.