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.
40 lines
1.1 KiB
40 lines
1.1 KiB
{% extends "layouts/app.html" %} |
|
{% block title %}{% lisp (title! "List of articles") %}{% endblock %} |
|
|
|
{% block content %} |
|
<h1>{% lisp (title!) %}</h1> |
|
|
|
<div class="toolbar"><a href="/articles/new">Write new article</a></div> |
|
|
|
{% if articles %} |
|
<table class="list"> |
|
<thead> |
|
<tr> |
|
<th>title</th> |
|
<th>date</th> |
|
<th>operation</th> |
|
</tr> |
|
</thead> |
|
<tbody> |
|
{% for article in articles %} |
|
<tr> |
|
<td><a href="/articles/{{article.id}}">{{article.title}}</a></td> |
|
<td>{{ article.date-released |
|
| date: ((:year 4)"/"(:month 2)"/"(:day 2)" "(:hour 2)":"(:min 2)) |
|
}}</td> |
|
<td> |
|
<a href="/articles/{{article.id}}/edit">Edit</a>| |
|
<form action="/articles/{{article.id}}/delete" method="post"> |
|
<input type="hidden" name="AUTHENTICITY-TOKEN" value="{{token}}"> |
|
<input type="hidden" name="METHOD" value="delete"> |
|
<input type="submit" value="Delete"> |
|
</form> |
|
</td> |
|
</tr> |
|
{% endfor %} |
|
</tbody> |
|
</table> |
|
{% else %} |
|
<p>No articles</p> |
|
{% endif %} |
|
{% endblock %}
|
|
|