rstcms/templates/home.html

34 lines
943 B
HTML

{% extends "layout.html" %}
{% block content %}
{% if user %}
<div class="row">
<ul>
{% for file in files %}
{% if file.type == 'file' %}
<form method='POST' action='/delete'>
<li><a href="/edit?path={{ file.path }}">{{ file.name }}</a><input type='submit' value="Delete - no questions asked!"></li>
<input type='hidden' id='sha' name='sha' value='{{ file.sha }}'>
<input type='hidden' id='path' name='path' value='{{ file.path }}'>
</form>
{% else %}
<li><a href="/?path={{ file.path }}">{{ file.name }}/</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
<div class='row'>
<div class="col-md">
<form action="/create" method="POST">
<input type="text" id='filename' name='filename'>
<input type="hidden" id='path' name='path' value="{{ path }}">
<input type="submit" value="Create new file">
</form>
</div>
</div>
{% else %}
not logged in!
{% endif %}
{% endblock %}