47 lines
1.5 KiB
HTML
47 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Admin Dashboard</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
|
|
<main class="page admin-page">
|
|
<div class="admin-header">
|
|
<h1>Questions</h1>
|
|
<nav>
|
|
<a href="{{ url_for('public.home') }}">Public Site</a>
|
|
<a href="{{ url_for('admin.new_question') }}">Create Question</a>
|
|
<a href="{{ url_for('admin.account') }}">Change Credentials</a>
|
|
<a href="{{ url_for('admin.logout') }}">Log Out</a>
|
|
</nav>
|
|
</div>
|
|
|
|
{% for message in get_flashed_messages() %}
|
|
<p class="notice">{{ message }}</p>
|
|
{% endfor %}
|
|
|
|
{% if questions %}
|
|
<div class="question-list">
|
|
{% for question in questions %}
|
|
<article class="question-row">
|
|
<div>
|
|
<p class="question-date">{{ question.date }}</p>
|
|
<h2>{{ question.question }}</h2>
|
|
<p>{{ question.option_a }} or {{ question.option_b }}</p>
|
|
</div>
|
|
<div class="row-actions">
|
|
<a href="{{ url_for('admin.edit_question', question_id=question.id) }}">Edit</a>
|
|
<a href="{{ url_for('admin.delete_question', question_id=question.id) }}">Delete</a>
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p>No questions yet.</p>
|
|
{% endif %}
|
|
</main>
|
|
|
|
</body>
|
|
</html>
|