Add list of feeds
This commit is contained in:
parent
2e07b29941
commit
5c8892e12f
@ -23,7 +23,7 @@ class FeedController
|
|||||||
{
|
{
|
||||||
$this->logger->info("FeedController::get() called");
|
$this->logger->info("FeedController::get() called");
|
||||||
$feeds = $this->feedRepository->findBy([], ['title' => 'ASC']);
|
$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)
|
public function get_feed(ServerRequestInterface $request, ResponseInterface $response)
|
||||||
|
16
views/feed/index.twig.html
Normal file
16
views/feed/index.twig.html
Normal 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>
|
Loading…
Reference in New Issue
Block a user