138 lines
3.5 KiB
HTML
138 lines
3.5 KiB
HTML
![]() |
{% extends "base.html" %}
|
||
|
{% block content %}
|
||
|
<style>
|
||
|
.table-container {
|
||
|
max-width: 1200px;
|
||
|
margin: 20px auto;
|
||
|
padding: 20px;
|
||
|
background: #ffffff;
|
||
|
border-radius: 8px;
|
||
|
box-shadow: 0 0 10px rgba(0,0,0,0.1);
|
||
|
overflow-x: auto;
|
||
|
}
|
||
|
|
||
|
.records-table {
|
||
|
width: 100%;
|
||
|
border-collapse: collapse;
|
||
|
margin-top: 20px;
|
||
|
}
|
||
|
|
||
|
.records-table th,
|
||
|
.records-table td {
|
||
|
padding: 12px;
|
||
|
text-align: left;
|
||
|
border-bottom: 1px solid #ddd;
|
||
|
}
|
||
|
|
||
|
.records-table th {
|
||
|
background-color: #f8f9fa;
|
||
|
font-weight: 600;
|
||
|
color: #2c3e50;
|
||
|
}
|
||
|
|
||
|
.records-table tr:hover {
|
||
|
background-color: #f5f5f5;
|
||
|
}
|
||
|
|
||
|
.download-link {
|
||
|
display: inline-block;
|
||
|
padding: 6px 12px;
|
||
|
background-color: #3498db;
|
||
|
color: white;
|
||
|
text-decoration: none;
|
||
|
border-radius: 4px;
|
||
|
font-size: 14px;
|
||
|
transition: background-color 0.3s;
|
||
|
}
|
||
|
|
||
|
.download-link:hover {
|
||
|
background-color: #2980b9;
|
||
|
}
|
||
|
|
||
|
.table-header {
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
margin-bottom: 20px;
|
||
|
}
|
||
|
|
||
|
.search-box {
|
||
|
padding: 8px;
|
||
|
border: 1px solid #ddd;
|
||
|
border-radius: 4px;
|
||
|
width: 200px;
|
||
|
}
|
||
|
|
||
|
.no-records {
|
||
|
text-align: center;
|
||
|
padding: 20px;
|
||
|
color: #666;
|
||
|
}
|
||
|
</style>
|
||
|
|
||
|
<div class="table-container">
|
||
|
<div class="table-header">
|
||
|
<h2>PDF Records</h2>
|
||
|
<input type="text" id="searchInput" class="search-box" placeholder="Search records...">
|
||
|
</div>
|
||
|
|
||
|
{% if pdf_records %}
|
||
|
<table class="records-table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<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>
|
||
|
<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>
|
||
|
<a href="{{ record.attendance_file.url }}" class="download-link" download>
|
||
|
Download
|
||
|
</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
<a href="{{ record.res_con_mou_file.url }}" class="download-link" download>
|
||
|
Download
|
||
|
</a>
|
||
|
</td>
|
||
|
</tr>
|
||
|
{% endfor %}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{% else %}
|
||
|
<div class="no-records">
|
||
|
No records found.
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
document.addEventListener('DOMContentLoaded', function() {
|
||
|
const searchInput = document.getElementById('searchInput');
|
||
|
const tableRows = document.querySelectorAll('.records-table tbody tr');
|
||
|
|
||
|
searchInput.addEventListener('input', function(e) {
|
||
|
const searchTerm = e.target.value.toLowerCase();
|
||
|
|
||
|
tableRows.forEach(row => {
|
||
|
const text = row.textContent.toLowerCase();
|
||
|
row.style.display = text.includes(searchTerm) ? '' : 'none';
|
||
|
});
|
||
|
});
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock content %}
|