From ffa59d6f820b036efb550cb821e0930c9de61fc3 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 9 Oct 2023 01:49:50 +0300 Subject: [PATCH] add publisher link #11 --- src/Controller/TorrentController.php | 9 +++++++++ templates/default/torrent/info.html.twig | 10 ++++++++++ 2 files changed, 19 insertions(+) diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index 9ca9296..6a1746f 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -57,6 +57,15 @@ class TorrentController extends AbstractController [ 'id' => $torrent->getId(), 'added' => $torrent->getAdded(), + 'user' => + [ + 'id' => $torrent->getUserId(), + 'identicon' => $userService->identicon( + $userService->get( + $torrent->getUserId() + )->getAddress() + ), + ], 'scrape' => [ 'seeders' => (int) $torrent->getSeeders(), diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index 25b178d..f9b4161 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -177,6 +177,16 @@ {% endif %} + + + {{ 'Publisher'|trans }} + + + + {{'identicon'|trans }} + + +