Add admin mode

This commit is contained in:
Edward Betts 2023-09-24 22:19:09 +01:00
parent 0ccaebe418
commit cc32b0459d
3 changed files with 38 additions and 2 deletions

16
templates/login.html Normal file
View file

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block title %}Conference archive{% endblock %}
{% block content %}
<h1>Conference archive</h1>
<div>Admin login.</div>
<form method="POST">
<label for="password">Password:</label>
<input type="password" id="password" name="password"/>
<button>login</button>
</form>
{% endblock %}

View file

@ -45,7 +45,7 @@
{% endif %}
</p>
{% if config.ADMIN_MODE %}
{% if is_admin() %}
{% set search_for = item.name + ' ' + " haswbstatement:P31=Q5" %}
<p><a href="https://www.wikidata.org/w/index.php?search={{ search_for | urlencode }}&title=Special%3ASearch&ns0=1&ns120=1">Search for {{ item.name }} on Wikidata</a></p>