add beginnings of admin panel
This commit is contained in:
parent
61653794e1
commit
920b28f5f5
7 changed files with 292 additions and 5 deletions
21
templates/admin/signed_in.html
Normal file
21
templates/admin/signed_in.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div id="admin" class="section">
|
||||
<h3 class="section_heading">Admin</h3>
|
||||
<table id="stored_files"><tbody>
|
||||
<tr>
|
||||
<th class="file_name">Name</td>
|
||||
<th class="file_size">Size</td>
|
||||
<th class="file_expiry">Expiry</td>
|
||||
</tr>
|
||||
{% for (code, entry) in stored_files.0.iter() %}
|
||||
<tr>
|
||||
<td class="file_name"><a href="download?code={{ code }}">{{ entry.file.name }}</a></td>
|
||||
<td class="file_size">{{ entry.file.formatted_size() }}</td>
|
||||
<td class="file_expiry">{{ entry.file.expiry.format(DATE_DISPLAY_FORMAT).unwrap() }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody></table>
|
||||
</div>
|
||||
{% endblock %}
|
18
templates/admin/signed_out.html
Normal file
18
templates/admin/signed_out.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block body %}
|
||||
<div id="admin_signin" class="section">
|
||||
<h3 class="section_heading">Sign In</h3>
|
||||
{% if incorrect_password %}
|
||||
<h4>Incorrect Password</h4>
|
||||
{% endif %}
|
||||
<form id="admin_signin_form" action="admin" method="post">
|
||||
<div>
|
||||
<label>
|
||||
<input type="password" id="admin_password" name="password" placeholder="Admin password"/>
|
||||
</label>
|
||||
</div>
|
||||
<input id="admin_signin_button" type="submit" value="Sign In"/>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue