Browse Source
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
2 changed files with 30 additions and 0 deletions
@ -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 %} |
@ -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…
Reference in new issue