Spaces:
Runtime error
Runtime error
{% extends 'base.html' %} | |
{% block content %} | |
<h1 class="text-center">Welcome to E-Content Sharing Platform</h1> | |
<div class="mt-4"> | |
<form method="POST" action="/search"> | |
<div class="input-group mb-3"> | |
<input type="text" class="form-control" name="query" placeholder="Search by name, subject code, author, or year"> | |
<button class="btn btn-primary" type="submit">Search</button> | |
</div> | |
</form> | |
</div> | |
<div class="mt-4"> | |
<h3>Available PDFs</h3> | |
<table class="table table-striped"> | |
<thead> | |
<tr> | |
<th>File Name</th> | |
<th>Subject</th> | |
<th>Author</th> | |
<th>Year</th> | |
<th>Download</th> | |
</tr> | |
</thead> | |
<tbody> | |
{% for file in files %} | |
<tr> | |
<td>{{ file.file_name }}</td> | |
<td>{{ file.subject_name }}</td> | |
<td>{{ file.author_name }}</td> | |
<td>{{ file.year }}</td> | |
<td><a href="/uploads/{{ file.file_name }}" class="btn btn-success btn-sm">Download</a></td> | |
</tr> | |
{% endfor %} | |
</tbody> | |
</table> | |
</div> | |
{% endblock %} | |