InterroGen / app /templates /reports_list.html
yasserrmd's picture
Update app/templates/reports_list.html
7a0da87 verified
{% extends "base_layout.html" %}
{% block title %}All Reports - InterroGen{% endblock %}
{% block page_content %}
<div class="heading-container">
<h1 class="h3">All Generated Reports</h1>
{# Optional: Add a button to quickly navigate to case creation or other relevant actions #}
<a href="{{ url_for('manage_cases', action='new') }}" class="btn btn-primary"><i class="bi bi-plus-circle-fill me-1"></i>Create New Case</a>
</div>
<div class="card">
<div class="card-header">
<i class="bi bi-archive-fill me-2"></i>List of Reports
</div>
<div class="card-body p-0">
{% if reports %}
<div class="table-responsive">
<table class="table table-hover mb-0">
<thead>
<tr>
<th>Report ID</th>
<th>Case ID</th>
<th>Suspect</th>
<th>Country Context</th>
<th>Generated At</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{% for report in reports | sort(attribute='generated_at', reverse=True) %}
<tr>
<td>{{ report.id }}</td>
<td><a href="{{ url_for('view_case', case_id=report.case.id) }}">{{ report.case.case_id_display }}</a></td>
<td>{{ report.case.suspect_name }}</td>
<td>{{ report.report_country_context.name if report.report_country_context else 'N/A' }}</td>
<td>{{ report.generated_at.strftime('%Y-%m-%d %H:%M') }}</td>
<td>
<a href="{{ url_for('view_report', report_id=report.id) }}" class="btn btn-sm btn-outline-primary">View Report</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="text-center p-5">
<i class="bi bi-journal-x fs-1 text-muted"></i>
<p class="mt-3 text-muted">No reports found in the system.</p>
<p>Reports are generated from individual case detail pages after interrogation questions have been processed.</p>
<a href="{{ url_for('manage_cases') }}" class="btn btn-primary">Go to Cases</a>
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
// Add any reports list page specific JS here if needed
console.log("Reports list page loaded");
</script>
{% endblock %}