A website for producing interactive charts without writing a single line of code. Built with Common Lisp and Python.
https://charts.craigoates.net
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.1 KiB
80 lines
2.1 KiB
{% extends "layouts/base.html" %} |
|
{% block title %}{{user.display-name}}: Dashboard{% endblock %} |
|
|
|
{% block content %} |
|
|
|
{% if roles.administrator == true %} |
|
<span class="console-output">{{python-output}}</span> |
|
{% endif %} |
|
|
|
|
|
<main class="dashboard"> |
|
<div class="dashboard-header"> |
|
<h1>Dashboard</h1> |
|
<h2>{{user.display-name}}</h2> |
|
</div> |
|
|
|
<section> |
|
<div> |
|
<h3><span>{{storage-files | length}}</span> Files</h3> |
|
<div> |
|
<a class="ui-link-add" href="/chart/add">New Chart</a> |
|
</div> |
|
</div> |
|
|
|
<table class="storage-dashboard-table"> |
|
<thead> |
|
<tr> |
|
<th>Type</th> |
|
<th>File Name</th> |
|
<th>Options</th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
{% for file in storage-files %} |
|
<tr> |
|
<td> |
|
<img src="{{file | chart-icon}}"> |
|
</td> |
|
<td> |
|
{{file}} |
|
</td> |
|
<td class="flex-end"> |
|
<a class="ui-link" href="/storage/download/{{user.username}}/{{file}}"> |
|
Download |
|
</a> |
|
<form action="/storage" method="post"> |
|
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
|
<input type="hidden" name="METHOD" value="delete-storage-file"> |
|
<input type="hidden" name="FILENAME" value="{{file}}"> |
|
<input class="ui-button-danger" type="submit" value="Delete"> |
|
</form> |
|
</td> |
|
</tr> |
|
{% endfor %} |
|
</tbody> |
|
</table> |
|
</section> |
|
|
|
<section> |
|
<h3>Account Options</h3> |
|
<p class="ui-message-danger"> |
|
Warning: Deleting your account is permanent and cannot be undone. |
|
</p> |
|
<div> |
|
{% if roles.administrator == true %} |
|
<a class="ui-link-add" href="/user/add">Add User</a> |
|
<a class="ui-link-admin" href="/users">Manage Users</a> |
|
{% endif %} |
|
<a class="ui-link-edit" href="/user/edit/{{user.username}}">Edit Account</a> |
|
<form action="/user" method="post"> |
|
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
|
<input type="hidden" name="METHOD" value="delete-user"> |
|
<input type="hidden" name="USERNAME" value="{{user.username}}"> |
|
<input class="ui-button-danger" type="submit" value="Delete Account"> |
|
</form> |
|
</div> |
|
</section> |
|
|
|
</main> |
|
{% endblock %}
|
|
|