Files
OSINT/templates/reports/my_reports.html
Iliyan Angelov ed94dd22dd update
2025-11-26 22:32:20 +02:00

78 lines
4.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% extends 'base.html' %}
{% block title %}Моите Доклади - Официален Портал{% endblock %}
{% block content %}
<div class="gov-card">
<div class="gov-card-header">
<h2>Моите Доклади</h2>
<a href="{% url 'reports:create' %}" class="btn btn-primary">Докладване на Измама</a>
</div>
<div class="gov-card-body">
{% if reports %}
<div class="reports-list">
{% for report in reports %}
<div class="report-card">
<div class="report-header">
<h3><a href="{% url 'reports:detail' report.pk %}">{{ report.title }}</a></h3>
<span class="badge badge-{{ report.status }}">{{ report.get_status_display }}</span>
</div>
<div class="report-meta">
<span class="date">{{ report.created_at|date:"d F Y" }}</span>
<span class="scam-type">{{ report.get_scam_type_display }}</span>
</div>
{% if report.status == 'rejected' and report.rejection_action and report.rejection_reason %}
<div class="gov-alert gov-alert-error" style="margin-bottom: 1rem;">
<div class="alert-icon"></div>
<div class="alert-content">
<strong>Докладът е отхвърлен</strong>
<p style="margin: 0.5rem 0 0 0;"><strong>Причина:</strong> {{ report.rejection_reason }}</p>
<p style="margin: 0.5rem 0 0 0; font-size: 0.9rem; color: var(--gov-gray);">
Отхвърлен на {{ report.rejection_action.created_at|date:"d.m.Y в H:i" }} от {{ report.rejection_action.moderator.username|default:"модератор" }}
</p>
</div>
</div>
{% endif %}
<p class="report-description">{{ report.description|truncatewords:30 }}</p>
<div class="report-actions">
<a href="{% url 'reports:detail' report.pk %}" class="btn btn-sm btn-secondary" data-tooltip="Преглед на детайли">Преглед</a>
{% if report.status == 'pending' %}
<a href="{% url 'reports:edit' report.pk %}" class="btn btn-sm btn-secondary" data-tooltip="Редактиране на доклад">Редактиране</a>
<a href="{% url 'reports:delete' report.pk %}"
class="btn btn-sm btn-danger"
data-confirm="Сигурни ли сте, че искате да изтриете този доклад? Това действие не може да бъде отменено."
data-confirm-title="Изтриване на Доклад">Изтриване</a>
{% elif report.status == 'rejected' %}
<a href="{% url 'reports:edit' report.pk %}" class="btn btn-sm btn-primary" data-tooltip="Редактирайте доклада според обратната връзка и изпратете отново">Редактиране и Повторно Изпращане</a>
<a href="{% url 'reports:delete' report.pk %}"
class="btn btn-sm btn-danger"
data-confirm="Сигурни ли сте, че искате да изтриете този отхвърлен доклад? Това действие не може да бъде отменено."
data-confirm-title="Изтриване на Доклад">Изтриване</a>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class="pagination">
{% if page_obj.has_previous %}
<a href="?page=1" class="btn btn-secondary">Първа</a>
<a href="?page={{ page_obj.previous_page_number }}" class="btn btn-secondary">Предишна</a>
{% endif %}
<span class="page-info">Страница {{ page_obj.number }} от {{ page_obj.paginator.num_pages }}</span>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}" class="btn btn-secondary">Следваща</a>
<a href="?page={{ page_obj.paginator.num_pages }}" class="btn btn-secondary">Последна</a>
{% endif %}
</div>
{% else %}
<div class="empty-state">
<p>Все още не сте изпратили доклади. <a href="{% url 'reports:create' %}">Докладвайте първата си измама</a>!</p>
</div>
{% endif %}
</div>
</div>
{% endblock %}