|
{% extends "base.html" %} |
|
|
|
{% block title %}Amendments - PoliSage{% endblock %} |
|
|
|
{% block content %} |
|
<div class="container mt-4"> |
|
<div class="d-flex justify-content-between align-items-center mb-3"> |
|
<h2>Proposed Amendments</h2> |
|
<a href="{{ url_for("amendment.propose_amendment") }}" class="btn btn-primary"> |
|
<i class="bi bi-plus-circle me-1"></i> Propose Amendment |
|
</a> |
|
</div> |
|
|
|
{% with messages = get_flashed_messages(with_categories=true) %} |
|
{% if messages %} |
|
{% for category, message in messages %} |
|
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert"> |
|
{{ message }} |
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button> |
|
</div> |
|
{% endfor %} |
|
{% endif %} |
|
{% endwith %} |
|
|
|
{% if amendments %} |
|
<div class="list-group"> |
|
{% for amendment in amendments %} |
|
<a href="{{ url_for("amendment.view_amendment", amendment_id=amendment.id) }}" class="list-group-item list-group-item-action flex-column align-items-start"> |
|
<div class="d-flex w-100 justify-content-between"> |
|
<h5 class="mb-1">Amendment for: {{ amendment.legislation.title if amendment.legislation else "Unknown Legislation" }} (ID: {{ amendment.legislation_id }})</h5> |
|
<small>{{ amendment.last_updated.strftime("%Y-%m-%d %H:%M") }}</small> |
|
</div> |
|
<p class="mb-1">Status: <span class="badge bg-warning text-dark">{{ amendment.status }}</span></p> |
|
<small>Proposed by: {{ amendment.author.username if amendment.author else "N/A" }}</small> |
|
</a> |
|
{% endfor %} |
|
</div> |
|
{% else %} |
|
<div class="alert alert-info" role="alert"> |
|
No amendments found. <a href="{{ url_for("amendment.propose_amendment") }}">Propose a new one?</a> |
|
</div> |
|
{% endif %} |
|
</div> |
|
{% endblock %} |
|
|
|
|