Browse Source

implement activity RSS feed

main
ghost 1 year ago
parent
commit
35b84546ff
  1. 5
      public/asset/default/css/framework.css
  2. 272
      src/Controller/ActivityController.php
  3. 10
      src/Controller/UserController.php
  4. 2
      templates/default/activity/event/torrent/add.html.twig
  5. 22
      templates/default/activity/event/torrent/add.rss.twig
  6. 9
      templates/default/activity/event/torrent/approve/add.html.twig
  7. 20
      templates/default/activity/event/torrent/approve/add.rss.twig
  8. 2
      templates/default/activity/event/torrent/approve/delete.html.twig
  9. 20
      templates/default/activity/event/torrent/approve/delete.rss.twig
  10. 2
      templates/default/activity/event/torrent/download/file/add.html.twig
  11. 22
      templates/default/activity/event/torrent/download/file/add.rss.twig
  12. 2
      templates/default/activity/event/torrent/download/magnet/add.html.twig
  13. 22
      templates/default/activity/event/torrent/download/magnet/add.rss.twig
  14. 2
      templates/default/activity/event/torrent/locales/add.html.twig
  15. 24
      templates/default/activity/event/torrent/locales/add.rss.twig
  16. 2
      templates/default/activity/event/torrent/locales/approve/add.html.twig
  17. 24
      templates/default/activity/event/torrent/locales/approve/add.rss.twig
  18. 2
      templates/default/activity/event/torrent/locales/approve/delete.html.twig
  19. 24
      templates/default/activity/event/torrent/locales/approve/delete.rss.twig
  20. 4
      templates/default/activity/event/torrent/locales/delete.html.twig
  21. 24
      templates/default/activity/event/torrent/locales/delete.rss.twig
  22. 2
      templates/default/activity/event/torrent/sensitive/add.html.twig
  23. 24
      templates/default/activity/event/torrent/sensitive/add.rss.twig
  24. 2
      templates/default/activity/event/torrent/sensitive/approve/add.html.twig
  25. 24
      templates/default/activity/event/torrent/sensitive/approve/add.rss.twig
  26. 2
      templates/default/activity/event/torrent/sensitive/approve/delete.html.twig
  27. 24
      templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig
  28. 2
      templates/default/activity/event/torrent/sensitive/delete.html.twig
  29. 24
      templates/default/activity/event/torrent/sensitive/delete.rss.twig
  30. 2
      templates/default/activity/event/torrent/star/add.html.twig
  31. 22
      templates/default/activity/event/torrent/star/add.rss.twig
  32. 2
      templates/default/activity/event/torrent/star/delete.html.twig
  33. 22
      templates/default/activity/event/torrent/star/delete.rss.twig
  34. 7
      templates/default/activity/event/undefined.rss.twig
  35. 2
      templates/default/activity/event/user/add.html.twig
  36. 7
      templates/default/activity/event/user/add.rss.twig
  37. 8
      templates/default/activity/event/user/approve/add.html.twig
  38. 12
      templates/default/activity/event/user/approve/add.rss.twig
  39. 8
      templates/default/activity/event/user/approve/delete.html.twig
  40. 12
      templates/default/activity/event/user/approve/delete.rss.twig
  41. 8
      templates/default/activity/event/user/moderator/add.html.twig
  42. 12
      templates/default/activity/event/user/moderator/add.rss.twig
  43. 12
      templates/default/activity/event/user/moderator/delete.html.twig
  44. 12
      templates/default/activity/event/user/moderator/delete.rss.twig
  45. 8
      templates/default/activity/event/user/star/add.html.twig
  46. 12
      templates/default/activity/event/user/star/add.rss.twig
  47. 8
      templates/default/activity/event/user/star/delete.html.twig
  48. 12
      templates/default/activity/event/user/star/delete.rss.twig
  49. 12
      templates/default/activity/event/user/status/add.html.twig
  50. 12
      templates/default/activity/event/user/status/add.rss.twig
  51. 12
      templates/default/activity/event/user/status/delete.html.twig
  52. 12
      templates/default/activity/event/user/status/delete.rss.twig
  53. 24
      templates/default/activity/list.html.twig
  54. 14
      templates/default/activity/list.rss.twig
  55. 2
      templates/default/torrent/edit/sensitive.html.twig
  56. 21
      templates/default/torrent/info.html.twig
  57. 18
      templates/default/user/info.html.twig
  58. 11
      templates/default/user/settings.html.twig

5
public/asset/default/css/framework.css

@ -362,6 +362,11 @@ a:visited.background-color-hover-night-light:hover {
margin: 8px; margin: 8px;
} }
.margin-x-8-px {
margin-left: 8px;
margin-right: 8px;
}
.margin-l-8-px { .margin-l-8-px {
margin-left: 8px; margin-left: 8px;
} }

272
src/Controller/ActivityController.php

@ -46,7 +46,7 @@ class ActivityController extends AbstractController
'session' => [ 'session' => [
'user' => $user 'user' => $user
], ],
'activities' => $activityService->findLastActivities( // @TODO locale/sensitive filters 'activities' => $activityService->findLastActivities(
$user->getEvents(), $user->getEvents(),
$this->getParameter('app.pagination'), $this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination') ($page - 1) * $this->getParameter('app.pagination')
@ -61,22 +61,202 @@ class ActivityController extends AbstractController
); );
} }
#[Route(
'/{_locale}/rss/activity',
name: 'rss_activity',
defaults: [
'_locale' => '%app.locale%'
],
requirements: [
'_locale' => '%app.locales%'
],
methods:
[
'GET'
]
)]
public function rssAll(
Request $request,
UserService $userService,
ActivityService $activityService
): Response
{
$user = $this->initUser(
$request,
$userService,
$activityService
);
$total = $activityService->findActivitiesTotal(
$user->getEvents()
);
$response = new Response();
$response->headers->set('Content-Type', 'text/xml');
return $this->render(
'default/activity/list.rss.twig',
[
'session' => [
'user' => $user
],
'activities' => $activityService->findLastActivities(
$user->getEvents()
)
],
$response
);
}
#[Route(
'/{_locale}/rss/activity/user/{userId}',
name: 'rss_activity_user',
defaults: [
'_locale' => '%app.locale%',
'userId' => 0
],
requirements: [
'_locale' => '%app.locales%',
'userId' => '\d+'
],
methods:
[
'GET'
]
)]
public function rssUser(
Request $request,
UserService $userService,
ActivityService $activityService
): Response
{
$user = $this->initUser(
$request,
$userService,
$activityService
);
// Init target user
if (!$userTarget = $userService->getUser(
$request->get('userId') ? $request->get('userId') : $user->getId()
))
{
throw $this->createNotFoundException();
}
$total = $activityService->findActivitiesTotalByUserId(
$userTarget->getId(),
$user->getEvents()
);
$response = new Response();
$response->headers->set('Content-Type', 'text/xml');
return $this->render(
'default/activity/list.rss.twig',
[
'session' => [
'user' => $user
],
'activities' => $activityService->findLastActivitiesByUserId(
$userTarget->getId(),
$userTarget->getEvents()
)
],
$response
);
}
#[Route(
'/{_locale}/rss/activity/torrent/{torrentId}',
name: 'rss_activity_torrent',
defaults: [
'_locale' => '%app.locale%',
],
requirements: [
'_locale' => '%app.locales%',
'torrentId' => '\d+'
],
methods:
[
'GET'
]
)]
public function rssTorrent(
Request $request,
UserService $userService,
TorrentService $torrentService,
ActivityService $activityService
): Response
{
$user = $this->initUser(
$request,
$userService,
$activityService
);
// Init torrent
if (!$torrent = $torrentService->getTorrent($request->get('torrentId')))
{
throw $this->createNotFoundException();
}
// Get total activities
$total = $activityService->findActivitiesTotalByTorrentId(
$torrent->getId(),
$user->getEvents()
);
$response = new Response();
$response->headers->set('Content-Type', 'text/xml');
return $this->render(
'default/activity/list.rss.twig',
[
'session' => [
'user' => $user
],
'activities' => $activityService->findLastActivitiesByTorrentId(
$torrent->getId(),
$user->getEvents()
)
],
$response
);
}
public function event( public function event(
\App\Entity\User $user, \App\Entity\User $user,
\App\Entity\Activity $activity, \App\Entity\Activity $activity,
ActivityService $activityService, ActivityService $activityService,
UserService $userService, UserService $userService,
TorrentService $torrentService, TorrentService $torrentService,
?string $format = null,
): Response ): Response
{ {
switch ($format)
{
case 'rss':
$extension = '.rss.twig';
break;
default:
$extension = '.html.twig';
}
switch ($activity->getEvent()) switch ($activity->getEvent())
{ {
// User // User
case $activity::EVENT_USER_ADD: case $activity::EVENT_USER_ADD:
return $this->render( return $this->render(
'default/activity/event/user/add.html.twig', 'default/activity/event/user/add' . $extension,
[ [
'id' => $activity->getId(),
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -95,8 +275,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_APPROVE_ADD: case $activity::EVENT_USER_APPROVE_ADD:
return $this->render( return $this->render(
'default/activity/event/user/approve/add.html.twig', 'default/activity/event/user/approve/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -107,7 +288,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -127,8 +308,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_APPROVE_DELETE: case $activity::EVENT_USER_APPROVE_DELETE:
return $this->render( return $this->render(
'default/activity/event/user/approve/delete.html.twig', 'default/activity/event/user/approve/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -139,7 +321,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -159,8 +341,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_MODERATOR_ADD: case $activity::EVENT_USER_MODERATOR_ADD:
return $this->render( return $this->render(
'default/activity/event/user/moderator/add.html.twig', 'default/activity/event/user/moderator/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -171,7 +354,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -191,8 +374,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_MODERATOR_DELETE: case $activity::EVENT_USER_MODERATOR_DELETE:
return $this->render( return $this->render(
'default/activity/event/user/moderator/delete.html.twig', 'default/activity/event/user/moderator/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -203,7 +387,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -223,8 +407,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_STATUS_ADD: case $activity::EVENT_USER_STATUS_ADD:
return $this->render( return $this->render(
'default/activity/event/user/status/add.html.twig', 'default/activity/event/user/status/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -235,7 +420,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -255,8 +440,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_STATUS_DELETE: case $activity::EVENT_USER_STATUS_DELETE:
return $this->render( return $this->render(
'default/activity/event/user/status/delete.html.twig', 'default/activity/event/user/status/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -267,7 +453,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -287,8 +473,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_STAR_ADD: case $activity::EVENT_USER_STAR_ADD:
return $this->render( return $this->render(
'default/activity/event/user/star/add.html.twig', 'default/activity/event/user/star/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -299,7 +486,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -319,8 +506,9 @@ class ActivityController extends AbstractController
case $activity::EVENT_USER_STAR_DELETE: case $activity::EVENT_USER_STAR_DELETE:
return $this->render( return $this->render(
'default/activity/event/user/star/delete.html.twig', 'default/activity/event/user/star/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -331,7 +519,7 @@ class ActivityController extends AbstractController
)->getAddress() )->getAddress()
) )
], ],
'by' => 'to' =>
[ [
'user' => 'user' =>
[ [
@ -358,8 +546,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/add.html.twig', 'default/activity/event/torrent/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -403,8 +592,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/approve/add.html.twig', 'default/activity/event/torrent/approve/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -448,8 +638,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/approve/delete.html.twig', 'default/activity/event/torrent/approve/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -494,8 +685,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/download/file/add.html.twig', 'default/activity/event/torrent/download/file/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -539,8 +731,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/download/magnet/add.html.twig', 'default/activity/event/torrent/download/magnet/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -585,8 +778,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/locales/add.html.twig', 'default/activity/event/torrent/locales/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -636,8 +830,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/locales/delete.html.twig', 'default/activity/event/torrent/locales/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -687,8 +882,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/locales/approve/add.html.twig', 'default/activity/event/torrent/locales/approve/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -738,8 +934,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/locales/approve/delete.html.twig', 'default/activity/event/torrent/locales/approve/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -790,8 +987,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/sensitive/add.html.twig', 'default/activity/event/torrent/sensitive/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -841,8 +1039,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/sensitive/delete.html.twig', 'default/activity/event/torrent/sensitive/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -892,8 +1091,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/sensitive/approve/add.html.twig', 'default/activity/event/torrent/sensitive/approve/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -943,8 +1143,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/sensitive/approve/delete.html.twig', 'default/activity/event/torrent/sensitive/approve/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -995,8 +1196,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/star/add.html.twig', 'default/activity/event/torrent/star/add' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -1040,8 +1242,9 @@ class ActivityController extends AbstractController
} }
return $this->render( return $this->render(
'default/activity/event/torrent/star/delete.html.twig', 'default/activity/event/torrent/star/delete' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [
@ -1079,8 +1282,9 @@ class ActivityController extends AbstractController
default: default:
return $this->render( return $this->render(
'default/activity/event/undefined.html.twig', 'default/activity/event/undefined' . $extension,
[ [
'id' => $activity->getId(),
'added' => $activity->getAdded(), 'added' => $activity->getAdded(),
'user' => 'user' =>
[ [

10
src/Controller/UserController.php

@ -242,16 +242,12 @@ class UserController extends AbstractController
], ],
'activities' => $activityService->findLastActivitiesByUserId( 'activities' => $activityService->findLastActivitiesByUserId(
$userTarget->getId(), $userTarget->getId(),
$userTarget->getEvents() $userTarget->getEvents(),
$this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination')
) )
], ],
'events' => $activityService->getEventsTree(), 'events' => $activityService->getEventsTree(),
'activities' => $activityService->findLastActivitiesByUserId(
$userTarget->getId(),
$user->getEvents(),
$this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination')
),
'pagination' => 'pagination' =>
[ [
'page' => $page, 'page' => $page,

2
templates/default/activity/event/torrent/add.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'added torrent' | trans }} {{ 'have added torrent' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

22
templates/default/activity/event/torrent/add.rss.twig

@ -0,0 +1,22 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have added torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

9
templates/default/activity/event/torrent/approve/add.html.twig

@ -4,19 +4,14 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'approved torrent' | trans }} {{ 'have approved torrent' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }} {{ torrent.name }}
</a> </a>
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

20
templates/default/activity/event/torrent/approve/add.rss.twig

@ -0,0 +1,20 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have approved torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/approve/delete.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'disapproved torrent' | trans }} {{ 'have disapproved torrent' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

20
templates/default/activity/event/torrent/approve/delete.rss.twig

@ -0,0 +1,20 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have disapproved torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/download/file/add.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-x-l-px"> <span class="margin-x-l-px">
{{ 'downloaded torrent file' | trans }} {{ 'have downloaded torrent file' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

22
templates/default/activity/event/torrent/download/file/add.rss.twig

@ -0,0 +1,22 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have downloaded torrent file' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/download/magnet/add.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'downloaded magnet link' | trans }} {{ 'have downloaded magnet link' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

22
templates/default/activity/event/torrent/download/magnet/add.rss.twig

@ -0,0 +1,22 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have downloaded magnet link' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/locales/add.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'added locales edition' | trans }} {{ 'have added locales edition' | trans }}
</span> </span>
{% if torrent.locales.exist %} {% if torrent.locales.exist %}
<a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}"> <a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}">

24
templates/default/activity/event/torrent/locales/add.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have added locales edition' | trans }}
#{{ torrent.locales.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/locales/approve/add.html.twig

@ -3,7 +3,7 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
{{ 'approved locales edition' | trans }} {{ 'have approved locales edition' | trans }}
{% if torrent.locales.exist %} {% if torrent.locales.exist %}
<a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}"> <a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}">
#{{ torrent.locales.id }} #{{ torrent.locales.id }}

24
templates/default/activity/event/torrent/locales/approve/add.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have approved locales edition' | trans }}
#{{ torrent.locales.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/locales/approve/delete.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'disapproved locales edition' | trans }} {{ 'have disapproved locales edition' | trans }}
</span> </span>
{% if torrent.locales.exist %} {% if torrent.locales.exist %}
<a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}"> <a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}">

24
templates/default/activity/event/torrent/locales/approve/delete.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have disapproved locales edition' | trans }}
#{{ torrent.locales.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity</link>
</item>

4
templates/default/activity/event/torrent/locales/delete.html.twig

@ -3,9 +3,9 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
{{ 'deleted locales edition' | trans }} {{ 'have deleted locales edition' | trans }}
{% if torrent.locales.exist %} {% if torrent.locales.exist %}
<a href="{{ path('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}"> <a href="{{ path('torrent_locales_edit', { torrentId : torrent.id }) }}">
#{{ torrent.locales.id }} #{{ torrent.locales.id }}
</a> </a>
{% else %} {% else %}

24
templates/default/activity/event/torrent/locales/delete.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have deleted locales edition' | trans }}
#{{ torrent.locales.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_locales_edit', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_locales_edit', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/sensitive/add.html.twig

@ -3,7 +3,7 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
{{ 'added sensitive edition' | trans }} {{ 'have added sensitive edition' | trans }}
{% if torrent.sensitive.exist %} {% if torrent.sensitive.exist %}
<a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}"> <a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}">
#{{ torrent.sensitive.id }} #{{ torrent.sensitive.id }}

24
templates/default/activity/event/torrent/sensitive/add.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have added sensitive edition' | trans }}
#{{ torrent.sensitive.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/sensitive/approve/add.html.twig

@ -3,7 +3,7 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
{{ 'approved sensitive edition' | trans }} {{ 'have approved sensitive edition' | trans }}
{% if torrent.sensitive.exist %} {% if torrent.sensitive.exist %}
<a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}"> <a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}">
#{{ torrent.sensitive.id }} #{{ torrent.sensitive.id }}

24
templates/default/activity/event/torrent/sensitive/approve/add.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have approved sensitive edition' | trans }}
#{{ torrent.sensitive.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/sensitive/approve/delete.html.twig

@ -3,7 +3,7 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
{{ 'disapproved sensitive edition' | trans }} {{ 'have disapproved sensitive edition' | trans }}
{% if torrent.sensitive.exist %} {% if torrent.sensitive.exist %}
<a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}"> <a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}">
#{{ torrent.sensitive.id }} #{{ torrent.sensitive.id }}

24
templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have disapproved sensitive edition' | trans }}
#{{ torrent.sensitive.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/sensitive/delete.html.twig

@ -3,7 +3,7 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
{{ 'deleted sensitive edition' | trans }} {{ 'have deleted sensitive edition' | trans }}
{% if torrent.sensitive.exist %} {% if torrent.sensitive.exist %}
<a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}"> <a href="{{ path('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}">
#{{ torrent.sensitive.id }} #{{ torrent.sensitive.id }}

24
templates/default/activity/event/torrent/sensitive/delete.rss.twig

@ -0,0 +1,24 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have deleted sensitive edition' | trans }}
#{{ torrent.sensitive.id }}
{{ 'for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_sensitive_edit', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_sensitive_edit', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/star/add.html.twig

@ -4,7 +4,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'added star for torrent' | trans }} {{ 'have added star for torrent' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

22
templates/default/activity/event/torrent/star/add.rss.twig

@ -0,0 +1,22 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have added star for torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

2
templates/default/activity/event/torrent/star/delete.html.twig

@ -5,7 +5,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'removed star from torrent' | trans }} {{ 'have removed star from torrent' | trans }}
</span> </span>
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

22
templates/default/activity/event/torrent/star/delete.rss.twig

@ -0,0 +1,22 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have removed star from torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
{{ torrent.name }}
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

7
templates/default/activity/event/undefined.rss.twig

@ -0,0 +1,7 @@
<item>
<title>{{ 'undefined event' | trans }} {{ 'by' | trans }} #{{ user.id }}</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ path('user_info', { userId : user.id }) }}#activity-{{ id }}</guid>
<link>{{ path('user_info', { userId : user.id }) }}#activity</link>
</item>

2
templates/default/activity/event/user/add.html.twig

@ -5,7 +5,7 @@
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-l-4-px">
{{ 'joined' | trans }} {{ name }} {{ 'have joined' | trans }} {{ name }}
</span> </span>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">

7
templates/default/activity/event/user/add.rss.twig

@ -0,0 +1,7 @@
<item>
<title>{{ 'User' | trans }} #{{ user.id }} {{ 'have joined' | trans }} {{ name }}</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : user.id }) }}#activity</link>
</item>

8
templates/default/activity/event/user/approve/add.html.twig

@ -3,11 +3,11 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-x-4-px">
{{ 'approved by' | trans }} {{ 'have approved' | trans }}
</span> </span>
<a href="{{ path('user_info', { userId : by.user.id }) }}"> <a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">

12
templates/default/activity/event/user/approve/add.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have approved user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

8
templates/default/activity/event/user/approve/delete.html.twig

@ -3,11 +3,11 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-x-4-px">
{{ 'disapproved by' | trans }} {{ 'have disapproved' | trans }}
</span> </span>
<a href="{{ path('user_info', { userId : by.user.id }) }}"> <a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">

12
templates/default/activity/event/user/approve/delete.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have disapproved user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

8
templates/default/activity/event/user/moderator/add.html.twig

@ -1,10 +1,10 @@
<div class="row"> <div class="row">
<div class="column width-80"> <div class="column width-80">
<a href="{{ path('user_info', { userId : by.user.id }) }}"> <a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-x-4-px">
{{ 'grant moderator permissions to' | trans }} {{ 'have granted moderator permissions to' | trans }}
</span> </span>
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />

12
templates/default/activity/event/user/moderator/add.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have granted moderator permissions to user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ to.user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

12
templates/default/activity/event/user/moderator/delete.html.twig

@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="column width-80"> <div class="column width-80">
<a href="{{ path('user_info', { userId : by.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
<span class="margin-l-4-px">
{{ 'remove moderator permissions from' | trans }}
</span>
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-x-4-px">
{{ 'have removed moderator permissions from' | trans }}
</span>
<a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">
{{ added | format_ago }} {{ added | format_ago }}

12
templates/default/activity/event/user/moderator/delete.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have removed moderator permissions from user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ to.user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

8
templates/default/activity/event/user/star/add.html.twig

@ -3,11 +3,11 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-x-4-px">
{{ 'added star for' | trans }} {{ 'have added star for' | trans }}
</span> </span>
<a href="{{ path('user_info', { userId : by.user.id }) }}"> <a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">

12
templates/default/activity/event/user/star/add.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have added star for user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ to.user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

8
templates/default/activity/event/user/star/delete.html.twig

@ -3,11 +3,11 @@
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-l-4-px"> <span class="margin-x-4-px">
{{ 'removed star from' | trans }} {{ 'have removed star from' | trans }}
</span> </span>
<a href="{{ path('user_info', { userId : by.user.id }) }}"> <a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">

12
templates/default/activity/event/user/star/delete.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have removed star from user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ to.user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

12
templates/default/activity/event/user/status/add.html.twig

@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="column width-80"> <div class="column width-80">
<a href="{{ path('user_info', { userId : by.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
<span class="margin-l-4-px">
{{ 'enable user' | trans }}
</span>
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-x-4-px">
{{ 'have enabled' | trans }}
</span>
<a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">
{{ added | format_ago }} {{ added | format_ago }}

12
templates/default/activity/event/user/status/add.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have enabled user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ to.user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

12
templates/default/activity/event/user/status/delete.html.twig

@ -1,15 +1,15 @@
<div class="row"> <div class="row">
<div class="column width-80"> <div class="column width-80">
<a href="{{ path('user_info', { userId : by.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ by.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
<span class="margin-l-4-px">
{{ 'diable user' | trans }}
</span>
<a href="{{ path('user_info', { userId : user.id }) }}"> <a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" /> <img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a> </a>
<span class="margin-x-4-px">
{{ 'have disabled' | trans }}
</span>
<a href="{{ path('user_info', { userId : to.user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ to.user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
</div> </div>
<div class="column width-20 text-right"> <div class="column width-20 text-right">
{{ added | format_ago }} {{ added | format_ago }}

12
templates/default/activity/event/user/status/delete.rss.twig

@ -0,0 +1,12 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have disabled user' | trans }}
#{{ to.user.id }}
</title>
<author>#{{ to.user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }}</guid>
<link>{{ url('user_info', { userId : to.user.id }) }}#activity</link>
</item>

24
templates/default/activity/list.html.twig

@ -1,6 +1,12 @@
{% extends 'default/layout.html.twig' %} {% extends 'default/layout.html.twig' %}
{% block title %}{{ 'Activity' | trans }}{% if pagination.page > 1 %} - {{ 'Page' | trans }} {{ pagination.page }}{% endif %} - {{ name }}{% endblock %} {% block title %}{{ 'Recent activity' | trans }}{% if pagination.page > 1 %} - {{ 'Page' | trans }} {{ pagination.page }}{% endif %} - {{ name }}{% endblock %}
{% block main_content %} {% block main_content %}
<h1>{{ 'Recent activity' | trans }}</h1>
<a class="text-color-night float-right" href="{{ path('rss_activity') }}" title="RSS">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
</svg>
</a>
{% for activity in activities %} {% for activity in activities %}
<div class="padding-16-px margin-y-8-px border-radius-3-px background-color-night"> <div class="padding-16-px margin-y-8-px border-radius-3-px background-color-night">
{{ render(controller( {{ render(controller(
@ -9,19 +15,7 @@
)) }} )) }}
</div> </div>
{% endfor %} {% endfor %}
{% if pagination.pages > 1 %} <div class="margin-t-16-px text-right">
<div class="row margin-t-16-px">
<div class="column width-50 padding-t-16-px">
&nbsp;
{# @TODO
<a class="text-color-night" href="#" title="RSS">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
</svg>
</a>
#}
</div>
<div class="column width-50 text-right">
{% if pagination.pages > 1 %} {% if pagination.pages > 1 %}
{{ 'Page' | trans | lower }} {{ pagination.page }} / {{ pagination.pages }} {{ 'Page' | trans | lower }} {{ pagination.page }} / {{ pagination.pages }}
{% if pagination.page > 1 %} {% if pagination.page > 1 %}
@ -42,6 +36,4 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
</div>
{% endif %}
{% endblock %} {% endblock %}

14
templates/default/activity/list.rss.twig

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<atom:link href="{{ url('torrent_recent') }}" rel="self" type="application/rss+xml"></atom:link>
<title>{{ name }}</title>
<link>{{ url('torrent_recent') }}</link>
{% for activity in activities %}
{{ render(controller(
'App\\Controller\\ActivityController::event',
{ user : session.user, activity : activity, format : 'rss' }
)) }}
{% endfor %}
</channel>
</rss>

2
templates/default/torrent/edit/sensitive.html.twig

@ -1,5 +1,5 @@
{% extends 'default/layout.html.twig' %} {% extends 'default/layout.html.twig' %}
{% block title %}{{'Edit sensitive'|trans }} - {{'Torrent'|trans }} #{{ torrentId }} - {{ name }}{% endblock %} {% block title %}{{ 'Edit sensitive status' | trans }} - {{ 'Torrent' | trans }} #{{ torrentId }} - {{ name }}{% endblock %}
{% block main_content %} {% block main_content %}
<div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night"> <div class="padding-24-px margin-y-8-px border-radius-3-px background-color-night">
<div class="margin-b-24-px padding-b-16-px border-bottom-default"> <div class="margin-b-24-px padding-b-16-px border-bottom-default">

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

@ -334,10 +334,20 @@
</div> </div>
</div> </div>
</div> </div>
{% if activities %}
<a name="activity"></a> <a name="activity"></a>
<div class="padding-x-24-px padding-t-16-px padding-b-8-px text-center">
<h2>{{ 'Recent activity' | trans }}</h2>
<sub>
<a class="text-color-night margin-x-4-px" href="{{ path('rss_activity_torrent', { torrentId : torrent.id }) }}" title="RSS">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
</svg>
</a>
</sub>
</div>
{% if activities %}
{% for activity in activities %} {% for activity in activities %}
<div class="padding-16-px margin-y-8-px border-radius-3-px background-color-night"> <div class="padding-x-24-px padding-y-16-px margin-y-8-px border-radius-3-px background-color-night">
{{ render(controller( {{ render(controller(
'App\\Controller\\ActivityController::event', 'App\\Controller\\ActivityController::event',
{ user : session.user, activity : activity } { user : session.user, activity : activity }
@ -348,13 +358,6 @@
<div class="row margin-t-16-px"> <div class="row margin-t-16-px">
<div class="column width-50 padding-t-16-px"> <div class="column width-50 padding-t-16-px">
&nbsp; &nbsp;
{# @TODO
<a class="text-color-night" href="#" title="RSS">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
</svg>
</a>
#}
</div> </div>
<div class="column width-50 text-right"> <div class="column width-50 text-right">
{% if pagination.pages > 1 %} {% if pagination.pages > 1 %}

18
templates/default/user/info.html.twig

@ -218,16 +218,18 @@
</tbody> </tbody>
</table> </table>
</div> </div>
{% if user.activities %}
<a name="activity"></a> <a name="activity"></a>
{# <div class="padding-x-24-px padding-t-16-px padding-b-8-px text-center">
<div class="padding-x-24-px padding-y-8-px margin-y-16-px"> <h2>{{ 'Recent activity' | trans }}</h2>
<h2>{{ 'Last activity' | trans }}</h2> <sub>
<sup> <a class="text-color-night margin-x-4-px" href="{{ path('rss_activity_user', { userId : user.id }) }}" title="RSS">
<a href="#">RSS</a> <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
</sup> <path d="M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm1.5 2.5c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1 0-2zm0 4a6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1 0-2zm.5 7a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"/>
</svg>
</a>
</sub>
</div> </div>
#} {% if user.activities %}
{% for activity in user.activities %} {% for activity in user.activities %}
<div class="padding-x-24-px padding-y-16-px margin-y-8-px border-radius-3-px background-color-night"> <div class="padding-x-24-px padding-y-16-px margin-y-8-px border-radius-3-px background-color-night">
{{ render(controller( {{ render(controller(

11
templates/default/user/settings.html.twig

@ -47,6 +47,15 @@
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</select> </select>
<div class="margin-x-8-px display-inline-block">
<a href="https://crowdin.com/project/yggtracker" target="_blank">
<small>{{ 'Join translation' | trans }}</small>
<svg xmlns="http://www.w3.org/2000/svg" width="11" height="11" fill="currentColor" viewBox="0 0 16 16">
<path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/>
<path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/>
</svg>
</a>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
@ -56,7 +65,7 @@
</tr> </tr>
<tr> <tr>
<td class="padding-t-16-px"> <td class="padding-t-16-px">
{{ 'Languages' | trans }} {{ 'Content' | trans }}
</td> </td>
<td class="padding-t-16-px"> <td class="padding-t-16-px">
{% for locale in locales %} {% for locale in locales %}

Loading…
Cancel
Save