Browse Source
The templates added allow the viewer to view the 'pages' individually or as a list (index page of 'pages' basically).stable
Craig Oates
2 years ago
5 changed files with 70 additions and 2 deletions
@ -0,0 +1,32 @@ |
|||||||
|
{% extends "layouts/default.html" %} |
||||||
|
{% block title %}View page.{% endblock %} |
||||||
|
{% block content %} |
||||||
|
<div> |
||||||
|
{% if roles.logged-in %} |
||||||
|
<a href="/dashboard">Dashboard</a> |
||||||
|
<a href="/user/edit">Edit Account</a> |
||||||
|
<form action="/logout" method="post"> |
||||||
|
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
||||||
|
<input type="submit" value="logout"> |
||||||
|
</form> |
||||||
|
<form action="/user/delete" method="post"> |
||||||
|
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
||||||
|
<input type="submit" value="Delete Account"> |
||||||
|
</form> |
||||||
|
<a href="/create/page">Create Page</a> |
||||||
|
<a href="/user/pages">View Pages</a> |
||||||
|
|
||||||
|
{% if roles.administrator %} |
||||||
|
<a href="/site-settings">Site Settings</a> |
||||||
|
<a href="/users">Users</a> |
||||||
|
{% endif %} |
||||||
|
|
||||||
|
{% else %} |
||||||
|
<a href="/">Home</a> |
||||||
|
<a href="/login">Log-in</a> |
||||||
|
{% endif %} |
||||||
|
<main> |
||||||
|
{{data | safe}} |
||||||
|
</main> |
||||||
|
</div> |
||||||
|
{% endblock %} |
@ -0,0 +1,35 @@ |
|||||||
|
{% extends "layouts/default.html" %} |
||||||
|
{% block title %}A list of the site's pages.{% endblock %} |
||||||
|
{% block content %} |
||||||
|
<h1>Pages</h1> |
||||||
|
<div> |
||||||
|
{% if roles.logged-in %} |
||||||
|
<a href="/dashboard">Dashboard</a> |
||||||
|
<a href="/user/edit">Edit Account</a> |
||||||
|
<form action="/logout" method="post"> |
||||||
|
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
||||||
|
<input type="submit" value="logout"> |
||||||
|
</form> |
||||||
|
<form action="/user/delete" method="post"> |
||||||
|
<input required type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
||||||
|
<input type="submit" value="Delete Account"> |
||||||
|
</form> |
||||||
|
<a href="/create/page">Create Page</a> |
||||||
|
<a href="/pages">View Pages</a> |
||||||
|
{% if roles.administrator %} |
||||||
|
<a href="/site-settings">Site Settings</a> |
||||||
|
<a href="/users">Users</a> |
||||||
|
{% endif %} |
||||||
|
{% else %} |
||||||
|
<a href="/">Home</a> |
||||||
|
<a href="/login">Log-in</a> |
||||||
|
{% endif %} |
||||||
|
</div> |
||||||
|
|
||||||
|
{% for page in pages %} |
||||||
|
<div> |
||||||
|
<a href="/view/page/{{page}}">{{page}}</a> |
||||||
|
</div> |
||||||
|
{% endfor %} |
||||||
|
|
||||||
|
{% endblock %} |
Loading…
Reference in new issue