Add list of feeds

This commit is contained in:
Lewis Dale 2024-12-31 16:21:19 +00:00
parent 2e07b29941
commit 5c8892e12f
2 changed files with 17 additions and 1 deletions

View File

@ -23,7 +23,7 @@ class FeedController
{
$this->logger->info("FeedController::get() called");
$feeds = $this->feedRepository->findBy([], ['title' => 'ASC']);
return $this->view->render($response, 'index.twig.html', ['feeds' => $feeds]);
return $this->view->render($response, 'feed/index.twig.html', ['feeds' => $feeds]);
}
public function get_feed(ServerRequestInterface $request, ResponseInterface $response)

View File

@ -0,0 +1,16 @@
<h1>Your feeds</h1>
<table>
<thead>
<th>Title</th>
<th>Actions</th>
</thead>
<tbody>
{% for feed in feeds %}
<tr>
<td>{{ feed.title }}</td>
<td><a href="/feed/{{ feed.id }}">Link to feed</a></td>
</tr>
{% endfor %}
</tbody>
</table>