74 lines
2.7 KiB
HTML
74 lines
2.7 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}我的申诉{% endblock %}
|
|
|
|
{% block content %}
|
|
<h2 class="mb-4">我的申诉记录</h2>
|
|
|
|
{% if appeals.items %}
|
|
<div class="table-responsive">
|
|
<table class="table table-hover">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>针对站点</th>
|
|
<th>状态</th>
|
|
<th>提交时间</th>
|
|
<th>最后更新</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for appeal in appeals.items %}
|
|
<tr>
|
|
<td>#{{ appeal.id }}</td>
|
|
<td>{{ appeal.blacklist_entry.pt_site if appeal.blacklist_entry else '已删除' }}</td>
|
|
<td>
|
|
<span class="badge
|
|
{% if appeal.status in ['approved', 'rejected'] %} bg-secondary
|
|
{% elif 'user' in appeal.status %} bg-warning text-dark
|
|
{% else %} bg-info text-dark {% endif %}">
|
|
{{ appeal.status }}
|
|
</span>
|
|
</td>
|
|
<td>{{ appeal.created_at.strftime('%Y-%m-%d %H:%M') }}</td>
|
|
<td>{{ appeal.updated_at.strftime('%Y-%m-%d %H:%M') }}</td>
|
|
<td>
|
|
<a href="{{ url_for('main.appeal_detail', appeal_id=appeal.id) }}" class="btn btn-sm btn-outline-primary">查看详情</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- 分页 -->
|
|
{% if appeals.pages > 1 %}
|
|
<nav>
|
|
<ul class="pagination justify-content-center">
|
|
<li class="page-item {% if not appeals.has_prev %}disabled{% endif %}">
|
|
<a class="page-link" href="{{ url_for('main.my_appeals', page=appeals.prev_num) if appeals.has_prev else '#' }}">上一页</a>
|
|
</li>
|
|
{% for p in appeals.iter_pages(left_edge=1, right_edge=1, left_current=2, right_current=2) %}
|
|
{% if p %}
|
|
<li class="page-item {% if p == appeals.page %}active{% endif %}">
|
|
<a class="page-link" href="{{ url_for('main.my_appeals', page=p) }}">{{ p }}</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="page-item disabled"><span class="page-link">...</span></li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
<li class="page-item {% if not appeals.has_next %}disabled{% endif %}">
|
|
<a class="page-link" href="{{ url_for('main.my_appeals', page=appeals.next_num) if appeals.has_next else '#' }}">下一页</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
{% endif %}
|
|
|
|
{% else %}
|
|
<div class="alert alert-info">
|
|
<p class="mb-0">您还没有提交过任何申诉。</p>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|