Browse Source

create /user/archive.html and /arctice.html templates.

Both templates aim to list out all the archives stored in the
system. The /user/archive.html template, also, includes admin/back-end
features like edit and delete links/controls.
stable
Craig Oates 2 years ago
parent
commit
5cc14f74bf
  1. 12
      templates/archive.html
  2. 18
      templates/user/archive.html

12
templates/archive.html

@ -0,0 +1,12 @@
{% extends "layouts/default.html" %}
{% block title %}A list of the site's archive entries.{% endblock %}
{% block content %}
<h1>Archive</h1>
{% for entry in archive-entries %}
<div>
<a href="/view/archive/{{entry.slug}}">{{entry.title}}</a>
</div>
{% endfor %}
{% endblock %}

18
templates/user/archive.html

@ -0,0 +1,18 @@
{% extends "layouts/default.html" %}
{% block title %}Manage the site's archive.{% endblock %}
{% block content %}
<h1>Archive</h1>
{% for entry in archive-entries %}
<div>
<a href="/view/archive/{{entry.slug}}">{{entry.title}}</a>
<a href="/edit/archive/{{entry.slug}}">Edit</a>
{% if roles.administrator %}
<form action="/entry/delete" method="post">
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}">
<input required type="hidden" name="slug" value="{{entry}}">
<input type="submit" value="Delete">
</form>
{% endif %}
</div>
{% endfor %}
{% endblock %}
Loading…
Cancel
Save