resolution-archive/templates/resulation/viewresulation.html

93 lines
3.0 KiB
HTML
Raw Permalink Normal View History

2025-01-26 11:22:57 +06:00
{% extends "base.html" %}
{% block content %}
2025-01-30 13:07:48 +06:00
{% load static %}
2025-01-26 11:22:57 +06:00
<div class="table-container">
<div class="table-header">
2025-02-18 16:23:22 +06:00
<h2>Resulation/Meeting Minutes</h2>
2025-01-26 11:22:57 +06:00
<input type="text" id="searchInput" class="search-box" placeholder="Search records...">
</div>
{% if pdf_records %}
2025-01-30 13:07:48 +06:00
<table class="records-table" aria-label="PDF Records">
2025-01-26 11:22:57 +06:00
<thead>
<tr>
2025-01-30 13:07:48 +06:00
<th>ID</th>
<th>Type</th>
2025-01-26 11:22:57 +06:00
<th>Organization</th>
<th>Topic</th>
<th>Title</th>
<th>Meeting Number</th>
<th>Meeting Date</th>
<th>Venue</th>
<th>Attendance</th>
<th>Resolution</th>
</tr>
</thead>
<tbody>
{% for record in pdf_records %}
<tr>
2025-01-30 13:07:48 +06:00
<td>{{ record.eid }}</td>
<td>{{ record.pdftype }}</td>
2025-01-26 11:22:57 +06:00
<td>{{ record.org_unit }}</td>
<td>{{ record.topic }}</td>
<td>{{ record.tittle }}</td>
<td>{{ record.m_number }}</td>
<td>{{ record.m_date|date:"d M Y" }}</td>
<td>{{ record.m_venue }}</td>
<td>
2025-02-02 12:26:20 +06:00
<a href="{% url 'file-download' type="attendance" filename=record.attendance_file %}">Download</a>
2025-01-26 11:22:57 +06:00
</td>
<td>
2025-01-30 13:07:48 +06:00
{% if record.res_con_mou_file %}
2025-02-02 12:26:20 +06:00
<a href="{% url 'file-download' type="resolution" filename=record.res_con_mou_file %}">Download</a>
2025-01-30 13:07:48 +06:00
{% endif %}
2025-01-26 11:22:57 +06:00
</td>
</tr>
{% endfor %}
</tbody>
</table>
2025-02-27 15:58:42 +06:00
<!-- Pagination -->
<div class="pagination">
<div class="page-links">
{% if pdf_records.has_previous %}
<a href="?page={{ pdf_records.previous_page_number }}" class="prev">Previous</a>
{% endif %}
<span class="current-page">{{ pdf_records.number }}</span>
<span class="total-pages">/ {{ pdf_records.paginator.num_pages }}</span>
{% if pdf_records.has_next %}
<a href="?page={{ pdf_records.next_page_number }}" class="next">Next</a>
{% endif %}
</div>
</div>
{% else %}
2025-01-30 13:07:48 +06:00
<p>No records found.</p>
2025-02-27 15:58:42 +06:00
{% endif %}
2025-01-26 11:22:57 +06:00
</div>
<script>
2025-01-30 13:07:48 +06:00
document.getElementById('searchInput').addEventListener('input', function() {
const searchTerm = this.value.toLowerCase();
const rows = document.querySelectorAll('tr');
rows.forEach((row, index) => {
// Skip the header row
if (index === 0) {
return;
}
const cells = row.cells;
let match = false;
for (let i = 0; i < cells.length; i++) {
if (cells[i].textContent.toLowerCase().includes(searchTerm)) {
match = true;
break;
}
}
row.style.display = match ? 'table-row' : 'none';
2025-01-26 11:22:57 +06:00
});
});
</script>
{% endblock content %}