Browse Source

add publisher link #11

main
ghost 1 year ago
parent
commit
ffa59d6f82
  1. 9
      src/Controller/TorrentController.php
  2. 10
      templates/default/torrent/info.html.twig

9
src/Controller/TorrentController.php

@ -57,6 +57,15 @@ class TorrentController extends AbstractController
[ [
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'added' => $torrent->getAdded(), 'added' => $torrent->getAdded(),
'user' =>
[
'id' => $torrent->getUserId(),
'identicon' => $userService->identicon(
$userService->get(
$torrent->getUserId()
)->getAddress()
),
],
'scrape' => 'scrape' =>
[ [
'seeders' => (int) $torrent->getSeeders(), 'seeders' => (int) $torrent->getSeeders(),

10
templates/default/torrent/info.html.twig

@ -177,6 +177,16 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
<tr>
<td>
{{ 'Publisher'|trans }}
</td>
<td>
<a href="{{ path('user_info', { id : torrent.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ torrent.user.identicon }}" alt="{{'identicon'|trans }}" />
</a>
</td>
</tr>
<tr> <tr>
<td colspan="2"> <td colspan="2">
<div class="padding-y-8-px border-bottom-default text-right"> <div class="padding-y-8-px border-bottom-default text-right">

Loading…
Cancel
Save