Revert "Updated a lot of stuff"
This reverts commit 915febb352.
Made on behalf of @ComputerTech312
This commit is contained in:
128
templates/modapp.html
Normal file
128
templates/modapp.html
Normal file
@@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ircquotes: Admin Panel</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}" />
|
||||
</head>
|
||||
<body bgcolor="#ffffff" text="#000000" link="#c08000" vlink="#c08000" alink="#c08000">
|
||||
|
||||
<!-- Navigation -->
|
||||
<center>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c08000" align="left">
|
||||
<font size="+1"><b><i>ircquotes</i></b></font>
|
||||
</td>
|
||||
<td bgcolor="#c08000" align="right">
|
||||
<font face="arial" size="+1"><b>Admin Panel</b></font>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="2" cellspacing="0" width="80%" border="0">
|
||||
<tr>
|
||||
<td class="footertext" align="left" bgcolor="#f0f0f0"></td>
|
||||
<td align="right" bgcolor="#f0f0f0" class="toplinks" colspan="2">
|
||||
<a href="/">Home</a> /
|
||||
<a href="/random">Random</a> /
|
||||
<a href="/submit">Submit</a> /
|
||||
<a href="/browse">Browse</a> /
|
||||
<a href="/modapp">Modapp</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
<!-- Main Content: All Quotes for Moderation -->
|
||||
<center>
|
||||
<h2>All Quotes for Moderation</h2>
|
||||
|
||||
<!-- Filter Options -->
|
||||
<form method="GET" action="/modapp">
|
||||
<label for="filter">Filter by:</label>
|
||||
<select name="filter" id="filter">
|
||||
<option value="pending" {% if filter_status == 'pending' %}selected{% endif %}>Pending</option>
|
||||
<option value="approved" {% if filter_status == 'approved' %}selected{% endif %}>Approved</option>
|
||||
<option value="rejected" {% if filter_status == 'rejected' %}selected{% endif %}>Rejected</option>
|
||||
</select>
|
||||
<input type="submit" value="Apply Filter">
|
||||
</form>
|
||||
|
||||
{% if quotes.items %}
|
||||
<!-- Table for Quotes -->
|
||||
<table border="1" cellpadding="5" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<th>Quote ID</th>
|
||||
<th>Quote</th>
|
||||
<th>Status</th>
|
||||
<th>Submitted At</th>
|
||||
<th>IP Address</th>
|
||||
<th>User Agent</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<!-- Loop through quotes -->
|
||||
{% for quote in quotes.items %}
|
||||
<tr style="background-color:
|
||||
{% if quote.status == 1 %} #d4edda {% elif quote.status == 2 %} #f8d7da {% else %} #fff {% endif %}">
|
||||
<td>#{{ quote.id }}</td>
|
||||
<td>{{ quote.text }}</td>
|
||||
<td>
|
||||
{% if quote.status == 0 %}
|
||||
Pending
|
||||
{% elif quote.status == 1 %}
|
||||
Approved
|
||||
{% else %}
|
||||
Rejected
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{ quote.submitted_at.strftime('%Y-%m-%d %H:%M:%S') if quote.submitted_at else 'N/A' }}</td>
|
||||
<td>{{ quote.ip_address }}</td>
|
||||
<td>{{ quote.user_agent }}</td>
|
||||
<td>
|
||||
<a href="/approve/{{ quote.id }}">Approve</a> |
|
||||
<a href="/reject/{{ quote.id }}">Reject</a> |
|
||||
<a href="/delete/{{ quote.id }}">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
<!-- Pagination Links -->
|
||||
<div id="pagination">
|
||||
{% if quotes.has_prev %}
|
||||
<a href="{{ url_for('modapp', page=quotes.prev_num, filter=filter_status) }}">« Previous</a>
|
||||
{% endif %}
|
||||
<span>Page {{ quotes.page }} of {{ quotes.pages }}</span>
|
||||
{% if quotes.has_next %}
|
||||
<a href="{{ url_for('modapp', page=quotes.next_num, filter=filter_status) }}">Next »</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p>No quotes available for moderation.</p>
|
||||
{% endif %}
|
||||
</center>
|
||||
|
||||
<!-- Footer -->
|
||||
<center>
|
||||
<table border="0" cellpadding="2" cellspacing="0" width="80%" bgcolor="#c08000">
|
||||
<tr>
|
||||
<td bgcolor="#f0f0f0" class="toplinks" colspan="2">
|
||||
<a href="/">Home</a> /
|
||||
<a href="/random">Random</a> /
|
||||
<a href="/submit">Submit</a> /
|
||||
<a href="/browse">Browse</a> /
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footertext" align="left"> </td>
|
||||
<td class="footertext" align="right">
|
||||
{{ approved_count }} quotes approved; {{ pending_count }} quotes pending; {{ rejected_count }} quotes rejected
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</center>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user