From 35b84546ffeb1c9e9c16856d9c2e22f7c4b0514e Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 13 Oct 2023 23:06:20 +0300 Subject: [PATCH] implement activity RSS feed --- public/asset/default/css/framework.css | 5 + src/Controller/ActivityController.php | 272 +++++++++++++++--- src/Controller/UserController.php | 10 +- .../activity/event/torrent/add.html.twig | 2 +- .../activity/event/torrent/add.rss.twig | 22 ++ .../event/torrent/approve/add.html.twig | 9 +- .../event/torrent/approve/add.rss.twig | 20 ++ .../event/torrent/approve/delete.html.twig | 2 +- .../event/torrent/approve/delete.rss.twig | 20 ++ .../event/torrent/download/file/add.html.twig | 2 +- .../event/torrent/download/file/add.rss.twig | 22 ++ .../torrent/download/magnet/add.html.twig | 2 +- .../torrent/download/magnet/add.rss.twig | 22 ++ .../event/torrent/locales/add.html.twig | 2 +- .../event/torrent/locales/add.rss.twig | 24 ++ .../torrent/locales/approve/add.html.twig | 2 +- .../torrent/locales/approve/add.rss.twig | 24 ++ .../torrent/locales/approve/delete.html.twig | 2 +- .../torrent/locales/approve/delete.rss.twig | 24 ++ .../event/torrent/locales/delete.html.twig | 4 +- .../event/torrent/locales/delete.rss.twig | 24 ++ .../event/torrent/sensitive/add.html.twig | 2 +- .../event/torrent/sensitive/add.rss.twig | 24 ++ .../torrent/sensitive/approve/add.html.twig | 2 +- .../torrent/sensitive/approve/add.rss.twig | 24 ++ .../sensitive/approve/delete.html.twig | 2 +- .../torrent/sensitive/approve/delete.rss.twig | 24 ++ .../event/torrent/sensitive/delete.html.twig | 2 +- .../event/torrent/sensitive/delete.rss.twig | 24 ++ .../activity/event/torrent/star/add.html.twig | 2 +- .../activity/event/torrent/star/add.rss.twig | 22 ++ .../event/torrent/star/delete.html.twig | 2 +- .../event/torrent/star/delete.rss.twig | 22 ++ .../default/activity/event/undefined.rss.twig | 7 + .../default/activity/event/user/add.html.twig | 2 +- .../default/activity/event/user/add.rss.twig | 7 + .../activity/event/user/approve/add.html.twig | 8 +- .../activity/event/user/approve/add.rss.twig | 12 + .../event/user/approve/delete.html.twig | 8 +- .../event/user/approve/delete.rss.twig | 12 + .../event/user/moderator/add.html.twig | 8 +- .../event/user/moderator/add.rss.twig | 12 + .../event/user/moderator/delete.html.twig | 12 +- .../event/user/moderator/delete.rss.twig | 12 + .../activity/event/user/star/add.html.twig | 8 +- .../activity/event/user/star/add.rss.twig | 12 + .../activity/event/user/star/delete.html.twig | 8 +- .../activity/event/user/star/delete.rss.twig | 12 + .../activity/event/user/status/add.html.twig | 12 +- .../activity/event/user/status/add.rss.twig | 12 + .../event/user/status/delete.html.twig | 12 +- .../event/user/status/delete.rss.twig | 12 + templates/default/activity/list.html.twig | 60 ++-- templates/default/activity/list.rss.twig | 14 + .../default/torrent/edit/sensitive.html.twig | 10 +- templates/default/torrent/info.html.twig | 21 +- templates/default/user/info.html.twig | 20 +- templates/default/user/settings.html.twig | 15 +- 58 files changed, 834 insertions(+), 162 deletions(-) create mode 100644 templates/default/activity/event/torrent/add.rss.twig create mode 100644 templates/default/activity/event/torrent/approve/add.rss.twig create mode 100644 templates/default/activity/event/torrent/approve/delete.rss.twig create mode 100644 templates/default/activity/event/torrent/download/file/add.rss.twig create mode 100644 templates/default/activity/event/torrent/download/magnet/add.rss.twig create mode 100644 templates/default/activity/event/torrent/locales/add.rss.twig create mode 100644 templates/default/activity/event/torrent/locales/approve/add.rss.twig create mode 100644 templates/default/activity/event/torrent/locales/approve/delete.rss.twig create mode 100644 templates/default/activity/event/torrent/locales/delete.rss.twig create mode 100644 templates/default/activity/event/torrent/sensitive/add.rss.twig create mode 100644 templates/default/activity/event/torrent/sensitive/approve/add.rss.twig create mode 100644 templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig create mode 100644 templates/default/activity/event/torrent/sensitive/delete.rss.twig create mode 100644 templates/default/activity/event/torrent/star/add.rss.twig create mode 100644 templates/default/activity/event/torrent/star/delete.rss.twig create mode 100644 templates/default/activity/event/undefined.rss.twig create mode 100644 templates/default/activity/event/user/add.rss.twig create mode 100644 templates/default/activity/event/user/approve/add.rss.twig create mode 100644 templates/default/activity/event/user/approve/delete.rss.twig create mode 100644 templates/default/activity/event/user/moderator/add.rss.twig create mode 100644 templates/default/activity/event/user/moderator/delete.rss.twig create mode 100644 templates/default/activity/event/user/star/add.rss.twig create mode 100644 templates/default/activity/event/user/star/delete.rss.twig create mode 100644 templates/default/activity/event/user/status/add.rss.twig create mode 100644 templates/default/activity/event/user/status/delete.rss.twig create mode 100644 templates/default/activity/list.rss.twig diff --git a/public/asset/default/css/framework.css b/public/asset/default/css/framework.css index 46b4389..0a90826 100644 --- a/public/asset/default/css/framework.css +++ b/public/asset/default/css/framework.css @@ -362,6 +362,11 @@ a:visited.background-color-hover-night-light:hover { margin: 8px; } +.margin-x-8-px { + margin-left: 8px; + margin-right: 8px; +} + .margin-l-8-px { margin-left: 8px; } diff --git a/src/Controller/ActivityController.php b/src/Controller/ActivityController.php index 038e1b8..643371e 100644 --- a/src/Controller/ActivityController.php +++ b/src/Controller/ActivityController.php @@ -46,7 +46,7 @@ class ActivityController extends AbstractController 'session' => [ 'user' => $user ], - 'activities' => $activityService->findLastActivities( // @TODO locale/sensitive filters + 'activities' => $activityService->findLastActivities( $user->getEvents(), $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( \App\Entity\User $user, \App\Entity\Activity $activity, ActivityService $activityService, UserService $userService, TorrentService $torrentService, + ?string $format = null, ): Response { + switch ($format) + { + case 'rss': + + $extension = '.rss.twig'; + + break; + + default: + + $extension = '.html.twig'; + } + switch ($activity->getEvent()) { // User case $activity::EVENT_USER_ADD: 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(), 'user' => [ @@ -95,8 +275,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_APPROVE_ADD: return $this->render( - 'default/activity/event/user/approve/add.html.twig', + 'default/activity/event/user/approve/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -107,7 +288,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -127,8 +308,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_APPROVE_DELETE: return $this->render( - 'default/activity/event/user/approve/delete.html.twig', + 'default/activity/event/user/approve/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -139,7 +321,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -159,8 +341,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_MODERATOR_ADD: return $this->render( - 'default/activity/event/user/moderator/add.html.twig', + 'default/activity/event/user/moderator/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -171,7 +354,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -191,8 +374,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_MODERATOR_DELETE: return $this->render( - 'default/activity/event/user/moderator/delete.html.twig', + 'default/activity/event/user/moderator/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -203,7 +387,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -223,8 +407,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_STATUS_ADD: return $this->render( - 'default/activity/event/user/status/add.html.twig', + 'default/activity/event/user/status/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -235,7 +420,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -255,8 +440,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_STATUS_DELETE: return $this->render( - 'default/activity/event/user/status/delete.html.twig', + 'default/activity/event/user/status/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -267,7 +453,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -287,8 +473,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_STAR_ADD: return $this->render( - 'default/activity/event/user/star/add.html.twig', + 'default/activity/event/user/star/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -299,7 +486,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -319,8 +506,9 @@ class ActivityController extends AbstractController case $activity::EVENT_USER_STAR_DELETE: return $this->render( - 'default/activity/event/user/star/delete.html.twig', + 'default/activity/event/user/star/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -331,7 +519,7 @@ class ActivityController extends AbstractController )->getAddress() ) ], - 'by' => + 'to' => [ 'user' => [ @@ -358,8 +546,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/add.html.twig', + 'default/activity/event/torrent/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -403,8 +592,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/approve/add.html.twig', + 'default/activity/event/torrent/approve/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -448,8 +638,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/approve/delete.html.twig', + 'default/activity/event/torrent/approve/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -494,8 +685,9 @@ class ActivityController extends AbstractController } 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(), 'user' => [ @@ -539,8 +731,9 @@ class ActivityController extends AbstractController } 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(), 'user' => [ @@ -585,8 +778,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/locales/add.html.twig', + 'default/activity/event/torrent/locales/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -636,8 +830,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/locales/delete.html.twig', + 'default/activity/event/torrent/locales/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -687,8 +882,9 @@ class ActivityController extends AbstractController } 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(), 'user' => [ @@ -738,8 +934,9 @@ class ActivityController extends AbstractController } 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(), 'user' => [ @@ -790,8 +987,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/sensitive/add.html.twig', + 'default/activity/event/torrent/sensitive/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -841,8 +1039,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/sensitive/delete.html.twig', + 'default/activity/event/torrent/sensitive/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -892,8 +1091,9 @@ class ActivityController extends AbstractController } 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(), 'user' => [ @@ -943,8 +1143,9 @@ class ActivityController extends AbstractController } 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(), 'user' => [ @@ -995,8 +1196,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/star/add.html.twig', + 'default/activity/event/torrent/star/add' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -1040,8 +1242,9 @@ class ActivityController extends AbstractController } return $this->render( - 'default/activity/event/torrent/star/delete.html.twig', + 'default/activity/event/torrent/star/delete' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ @@ -1079,8 +1282,9 @@ class ActivityController extends AbstractController default: return $this->render( - 'default/activity/event/undefined.html.twig', + 'default/activity/event/undefined' . $extension, [ + 'id' => $activity->getId(), 'added' => $activity->getAdded(), 'user' => [ diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 449e535..a11291a 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -242,16 +242,12 @@ class UserController extends AbstractController ], 'activities' => $activityService->findLastActivitiesByUserId( $userTarget->getId(), - $userTarget->getEvents() + $userTarget->getEvents(), + $this->getParameter('app.pagination'), + ($page - 1) * $this->getParameter('app.pagination') ) ], 'events' => $activityService->getEventsTree(), - 'activities' => $activityService->findLastActivitiesByUserId( - $userTarget->getId(), - $user->getEvents(), - $this->getParameter('app.pagination'), - ($page - 1) * $this->getParameter('app.pagination') - ), 'pagination' => [ 'page' => $page, diff --git a/templates/default/activity/event/torrent/add.html.twig b/templates/default/activity/event/torrent/add.html.twig index 9640c35..3a113e7 100644 --- a/templates/default/activity/event/torrent/add.html.twig +++ b/templates/default/activity/event/torrent/add.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'added torrent' | trans }} + {{ 'have added torrent' | trans }} {% if session.user.moderator or session.user.owner %} diff --git a/templates/default/activity/event/torrent/add.rss.twig b/templates/default/activity/event/torrent/add.rss.twig new file mode 100644 index 0000000..174c82c --- /dev/null +++ b/templates/default/activity/event/torrent/add.rss.twig @@ -0,0 +1,22 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/approve/add.html.twig b/templates/default/activity/event/torrent/approve/add.html.twig index 9c6e114..ab2350c 100644 --- a/templates/default/activity/event/torrent/approve/add.html.twig +++ b/templates/default/activity/event/torrent/approve/add.html.twig @@ -4,19 +4,14 @@ {{ 'identicon' | trans }} - {{ 'approved torrent' | trans }} + {{ 'have approved torrent' | trans }} {% if session.user.moderator or session.user.owner %} {{ torrent.name }} - {% if torrent.approved == false %} - #{{ torrent.id }} ({{ 'waiting for approve' | trans }}) - {% endif %} {% else %} - {% if torrent.approved == false %} - #{{ torrent.id }} ({{ 'waiting for approve' | trans }}) - {% elseif torrent.sensitive == true %} + {% if torrent.sensitive == true %} #{{ torrent.id }} ({{ 'sensitive' | trans }}) {% else %} diff --git a/templates/default/activity/event/torrent/approve/add.rss.twig b/templates/default/activity/event/torrent/approve/add.rss.twig new file mode 100644 index 0000000..7287540 --- /dev/null +++ b/templates/default/activity/event/torrent/approve/add.rss.twig @@ -0,0 +1,20 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/approve/delete.html.twig b/templates/default/activity/event/torrent/approve/delete.html.twig index 07f0439..6051686 100644 --- a/templates/default/activity/event/torrent/approve/delete.html.twig +++ b/templates/default/activity/event/torrent/approve/delete.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'disapproved torrent' | trans }} + {{ 'have disapproved torrent' | trans }} {% if session.user.moderator or session.user.owner %} diff --git a/templates/default/activity/event/torrent/approve/delete.rss.twig b/templates/default/activity/event/torrent/approve/delete.rss.twig new file mode 100644 index 0000000..d358829 --- /dev/null +++ b/templates/default/activity/event/torrent/approve/delete.rss.twig @@ -0,0 +1,20 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/download/file/add.html.twig b/templates/default/activity/event/torrent/download/file/add.html.twig index ab46476..33f83ad 100644 --- a/templates/default/activity/event/torrent/download/file/add.html.twig +++ b/templates/default/activity/event/torrent/download/file/add.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'downloaded torrent file' | trans }} + {{ 'have downloaded torrent file' | trans }} {% if session.user.moderator or session.user.owner %} diff --git a/templates/default/activity/event/torrent/download/file/add.rss.twig b/templates/default/activity/event/torrent/download/file/add.rss.twig new file mode 100644 index 0000000..ebeaf7c --- /dev/null +++ b/templates/default/activity/event/torrent/download/file/add.rss.twig @@ -0,0 +1,22 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/download/magnet/add.html.twig b/templates/default/activity/event/torrent/download/magnet/add.html.twig index a746575..a3aa52a 100644 --- a/templates/default/activity/event/torrent/download/magnet/add.html.twig +++ b/templates/default/activity/event/torrent/download/magnet/add.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'downloaded magnet link' | trans }} + {{ 'have downloaded magnet link' | trans }} {% if session.user.moderator or session.user.owner %} diff --git a/templates/default/activity/event/torrent/download/magnet/add.rss.twig b/templates/default/activity/event/torrent/download/magnet/add.rss.twig new file mode 100644 index 0000000..6afad66 --- /dev/null +++ b/templates/default/activity/event/torrent/download/magnet/add.rss.twig @@ -0,0 +1,22 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/locales/add.html.twig b/templates/default/activity/event/torrent/locales/add.html.twig index d208179..1d2541f 100644 --- a/templates/default/activity/event/torrent/locales/add.html.twig +++ b/templates/default/activity/event/torrent/locales/add.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'added locales edition' | trans }} + {{ 'have added locales edition' | trans }} {% if torrent.locales.exist %} diff --git a/templates/default/activity/event/torrent/locales/add.rss.twig b/templates/default/activity/event/torrent/locales/add.rss.twig new file mode 100644 index 0000000..20a65f5 --- /dev/null +++ b/templates/default/activity/event/torrent/locales/add.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity-{{ id }} + {{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/locales/approve/add.html.twig b/templates/default/activity/event/torrent/locales/approve/add.html.twig index 16a54cc..c32780b 100644 --- a/templates/default/activity/event/torrent/locales/approve/add.html.twig +++ b/templates/default/activity/event/torrent/locales/approve/add.html.twig @@ -3,7 +3,7 @@ {{ 'identicon' | trans }} - {{ 'approved locales edition' | trans }} + {{ 'have approved locales edition' | trans }} {% if torrent.locales.exist %} #{{ torrent.locales.id }} diff --git a/templates/default/activity/event/torrent/locales/approve/add.rss.twig b/templates/default/activity/event/torrent/locales/approve/add.rss.twig new file mode 100644 index 0000000..fc86232 --- /dev/null +++ b/templates/default/activity/event/torrent/locales/approve/add.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity-{{ id }} + {{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/locales/approve/delete.html.twig b/templates/default/activity/event/torrent/locales/approve/delete.html.twig index 5631b90..c9653e9 100644 --- a/templates/default/activity/event/torrent/locales/approve/delete.html.twig +++ b/templates/default/activity/event/torrent/locales/approve/delete.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'disapproved locales edition' | trans }} + {{ 'have disapproved locales edition' | trans }} {% if torrent.locales.exist %} diff --git a/templates/default/activity/event/torrent/locales/approve/delete.rss.twig b/templates/default/activity/event/torrent/locales/approve/delete.rss.twig new file mode 100644 index 0000000..de936f1 --- /dev/null +++ b/templates/default/activity/event/torrent/locales/approve/delete.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity-{{ id }} + {{ url('torrent_locales_edit', { torrentId : torrent.id, torrentLocalesId : torrent.locales.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/locales/delete.html.twig b/templates/default/activity/event/torrent/locales/delete.html.twig index 41cc76e..a86610b 100644 --- a/templates/default/activity/event/torrent/locales/delete.html.twig +++ b/templates/default/activity/event/torrent/locales/delete.html.twig @@ -3,9 +3,9 @@ {{ 'identicon' | trans }} - {{ 'deleted locales edition' | trans }} + {{ 'have deleted locales edition' | trans }} {% if torrent.locales.exist %} - + #{{ torrent.locales.id }} {% else %} diff --git a/templates/default/activity/event/torrent/locales/delete.rss.twig b/templates/default/activity/event/torrent/locales/delete.rss.twig new file mode 100644 index 0000000..2c26702 --- /dev/null +++ b/templates/default/activity/event/torrent/locales/delete.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_locales_edit', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_locales_edit', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/sensitive/add.html.twig b/templates/default/activity/event/torrent/sensitive/add.html.twig index c241edf..843fa2d 100644 --- a/templates/default/activity/event/torrent/sensitive/add.html.twig +++ b/templates/default/activity/event/torrent/sensitive/add.html.twig @@ -3,7 +3,7 @@ {{ 'identicon' | trans }} - {{ 'added sensitive edition' | trans }} + {{ 'have added sensitive edition' | trans }} {% if torrent.sensitive.exist %} #{{ torrent.sensitive.id }} diff --git a/templates/default/activity/event/torrent/sensitive/add.rss.twig b/templates/default/activity/event/torrent/sensitive/add.rss.twig new file mode 100644 index 0000000..4280165 --- /dev/null +++ b/templates/default/activity/event/torrent/sensitive/add.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity-{{ id }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/sensitive/approve/add.html.twig b/templates/default/activity/event/torrent/sensitive/approve/add.html.twig index 3c0af31..627d38c 100644 --- a/templates/default/activity/event/torrent/sensitive/approve/add.html.twig +++ b/templates/default/activity/event/torrent/sensitive/approve/add.html.twig @@ -3,7 +3,7 @@ {{ 'identicon' | trans }} - {{ 'approved sensitive edition' | trans }} + {{ 'have approved sensitive edition' | trans }} {% if torrent.sensitive.exist %} #{{ torrent.sensitive.id }} diff --git a/templates/default/activity/event/torrent/sensitive/approve/add.rss.twig b/templates/default/activity/event/torrent/sensitive/approve/add.rss.twig new file mode 100644 index 0000000..f8d029e --- /dev/null +++ b/templates/default/activity/event/torrent/sensitive/approve/add.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity-{{ id }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/sensitive/approve/delete.html.twig b/templates/default/activity/event/torrent/sensitive/approve/delete.html.twig index 95729a4..7c8de47 100644 --- a/templates/default/activity/event/torrent/sensitive/approve/delete.html.twig +++ b/templates/default/activity/event/torrent/sensitive/approve/delete.html.twig @@ -3,7 +3,7 @@ {{ 'identicon' | trans }} - {{ 'disapproved sensitive edition' | trans }} + {{ 'have disapproved sensitive edition' | trans }} {% if torrent.sensitive.exist %} #{{ torrent.sensitive.id }} diff --git a/templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig b/templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig new file mode 100644 index 0000000..da8ea11 --- /dev/null +++ b/templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity-{{ id }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id, torrentSensitiveId : torrent.sensitive.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/sensitive/delete.html.twig b/templates/default/activity/event/torrent/sensitive/delete.html.twig index c6f449c..f212a44 100644 --- a/templates/default/activity/event/torrent/sensitive/delete.html.twig +++ b/templates/default/activity/event/torrent/sensitive/delete.html.twig @@ -3,7 +3,7 @@ {{ 'identicon' | trans }} - {{ 'deleted sensitive edition' | trans }} + {{ 'have deleted sensitive edition' | trans }} {% if torrent.sensitive.exist %} #{{ torrent.sensitive.id }} diff --git a/templates/default/activity/event/torrent/sensitive/delete.rss.twig b/templates/default/activity/event/torrent/sensitive/delete.rss.twig new file mode 100644 index 0000000..d2254e8 --- /dev/null +++ b/templates/default/activity/event/torrent/sensitive/delete.rss.twig @@ -0,0 +1,24 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_sensitive_edit', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/star/add.html.twig b/templates/default/activity/event/torrent/star/add.html.twig index 102a43d..8b911cc 100644 --- a/templates/default/activity/event/torrent/star/add.html.twig +++ b/templates/default/activity/event/torrent/star/add.html.twig @@ -4,7 +4,7 @@ {{ 'identicon' | trans }} - {{ 'added star for torrent' | trans }} + {{ 'have added star for torrent' | trans }} {% if session.user.moderator or session.user.owner %} diff --git a/templates/default/activity/event/torrent/star/add.rss.twig b/templates/default/activity/event/torrent/star/add.rss.twig new file mode 100644 index 0000000..d56a7b5 --- /dev/null +++ b/templates/default/activity/event/torrent/star/add.rss.twig @@ -0,0 +1,22 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/torrent/star/delete.html.twig b/templates/default/activity/event/torrent/star/delete.html.twig index 496bf5c..0582790 100644 --- a/templates/default/activity/event/torrent/star/delete.html.twig +++ b/templates/default/activity/event/torrent/star/delete.html.twig @@ -5,7 +5,7 @@ {{ 'identicon' | trans }} - {{ 'removed star from torrent' | trans }} + {{ 'have removed star from torrent' | trans }} {% if session.user.moderator or session.user.owner %} diff --git a/templates/default/activity/event/torrent/star/delete.rss.twig b/templates/default/activity/event/torrent/star/delete.rss.twig new file mode 100644 index 0000000..e24ff3a --- /dev/null +++ b/templates/default/activity/event/torrent/star/delete.rss.twig @@ -0,0 +1,22 @@ + + + {{ '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 %} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }} + {{ url('torrent_info', { torrentId : torrent.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/undefined.rss.twig b/templates/default/activity/event/undefined.rss.twig new file mode 100644 index 0000000..09bcc56 --- /dev/null +++ b/templates/default/activity/event/undefined.rss.twig @@ -0,0 +1,7 @@ + + {{ 'undefined event' | trans }} {{ 'by' | trans }} #{{ user.id }} + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ path('user_info', { userId : user.id }) }}#activity-{{ id }} + {{ path('user_info', { userId : user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/add.html.twig b/templates/default/activity/event/user/add.html.twig index 63b997f..ad3a920 100644 --- a/templates/default/activity/event/user/add.html.twig +++ b/templates/default/activity/event/user/add.html.twig @@ -5,7 +5,7 @@ {{ 'identicon' | trans }} - {{ 'joined' | trans }} {{ name }} + {{ 'have joined' | trans }} {{ name }}
diff --git a/templates/default/activity/event/user/add.rss.twig b/templates/default/activity/event/user/add.rss.twig new file mode 100644 index 0000000..9c0a9ea --- /dev/null +++ b/templates/default/activity/event/user/add.rss.twig @@ -0,0 +1,7 @@ + + {{ 'User' | trans }} #{{ user.id }} {{ 'have joined' | trans }} {{ name }} + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/approve/add.html.twig b/templates/default/activity/event/user/approve/add.html.twig index 87b174c..2866bdf 100644 --- a/templates/default/activity/event/user/approve/add.html.twig +++ b/templates/default/activity/event/user/approve/add.html.twig @@ -3,11 +3,11 @@ {{ 'identicon' | trans }} - - {{ 'approved by' | trans }} + + {{ 'have approved' | trans }} - - {{ 'identicon' | trans }} + + {{ 'identicon' | trans }}
diff --git a/templates/default/activity/event/user/approve/add.rss.twig b/templates/default/activity/event/user/approve/add.rss.twig new file mode 100644 index 0000000..ad0c2e8 --- /dev/null +++ b/templates/default/activity/event/user/approve/add.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have approved user' | trans }} + #{{ to.user.id }} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/approve/delete.html.twig b/templates/default/activity/event/user/approve/delete.html.twig index 5f58ee6..1283a04 100644 --- a/templates/default/activity/event/user/approve/delete.html.twig +++ b/templates/default/activity/event/user/approve/delete.html.twig @@ -3,11 +3,11 @@ {{ 'identicon' | trans }} - - {{ 'disapproved by' | trans }} + + {{ 'have disapproved' | trans }} - - {{ 'identicon' | trans }} + + {{ 'identicon' | trans }}
diff --git a/templates/default/activity/event/user/approve/delete.rss.twig b/templates/default/activity/event/user/approve/delete.rss.twig new file mode 100644 index 0000000..0008063 --- /dev/null +++ b/templates/default/activity/event/user/approve/delete.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have disapproved user' | trans }} + #{{ to.user.id }} + + #{{ user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/moderator/add.html.twig b/templates/default/activity/event/user/moderator/add.html.twig index 525cce8..68cfd16 100644 --- a/templates/default/activity/event/user/moderator/add.html.twig +++ b/templates/default/activity/event/user/moderator/add.html.twig @@ -1,10 +1,10 @@
- - {{ 'identicon' | trans }} + + {{ 'identicon' | trans }} - - {{ 'grant moderator permissions to' | trans }} + + {{ 'have granted moderator permissions to' | trans }} {{ 'identicon' | trans }} diff --git a/templates/default/activity/event/user/moderator/add.rss.twig b/templates/default/activity/event/user/moderator/add.rss.twig new file mode 100644 index 0000000..ed7513f --- /dev/null +++ b/templates/default/activity/event/user/moderator/add.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have granted moderator permissions to user' | trans }} + #{{ to.user.id }} + + #{{ to.user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/moderator/delete.html.twig b/templates/default/activity/event/user/moderator/delete.html.twig index aa0427c..f3e577c 100644 --- a/templates/default/activity/event/user/moderator/delete.html.twig +++ b/templates/default/activity/event/user/moderator/delete.html.twig @@ -1,14 +1,14 @@
- - {{ 'identicon' | trans }} - - - {{ 'remove moderator permissions from' | trans }} - {{ 'identicon' | trans }} + + {{ 'have removed moderator permissions from' | trans }} + + + {{ 'identicon' | trans }} +
{{ added | format_ago }} diff --git a/templates/default/activity/event/user/moderator/delete.rss.twig b/templates/default/activity/event/user/moderator/delete.rss.twig new file mode 100644 index 0000000..9ef9978 --- /dev/null +++ b/templates/default/activity/event/user/moderator/delete.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have removed moderator permissions from user' | trans }} + #{{ to.user.id }} + + #{{ to.user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/star/add.html.twig b/templates/default/activity/event/user/star/add.html.twig index 6cdb6ea..138be52 100644 --- a/templates/default/activity/event/user/star/add.html.twig +++ b/templates/default/activity/event/user/star/add.html.twig @@ -3,11 +3,11 @@ {{ 'identicon' | trans }} - - {{ 'added star for' | trans }} + + {{ 'have added star for' | trans }} - - {{ 'identicon' | trans }} + + {{ 'identicon' | trans }}
diff --git a/templates/default/activity/event/user/star/add.rss.twig b/templates/default/activity/event/user/star/add.rss.twig new file mode 100644 index 0000000..a7b1470 --- /dev/null +++ b/templates/default/activity/event/user/star/add.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have added star for user' | trans }} + #{{ to.user.id }} + + #{{ to.user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/star/delete.html.twig b/templates/default/activity/event/user/star/delete.html.twig index 865887a..f42b206 100644 --- a/templates/default/activity/event/user/star/delete.html.twig +++ b/templates/default/activity/event/user/star/delete.html.twig @@ -3,11 +3,11 @@ {{ 'identicon' | trans }} - - {{ 'removed star from' | trans }} + + {{ 'have removed star from' | trans }} - - {{ 'identicon' | trans }} + + {{ 'identicon' | trans }}
diff --git a/templates/default/activity/event/user/star/delete.rss.twig b/templates/default/activity/event/user/star/delete.rss.twig new file mode 100644 index 0000000..f46562e --- /dev/null +++ b/templates/default/activity/event/user/star/delete.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have removed star from user' | trans }} + #{{ to.user.id }} + + #{{ to.user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/status/add.html.twig b/templates/default/activity/event/user/status/add.html.twig index 70f3e08..a68fd52 100644 --- a/templates/default/activity/event/user/status/add.html.twig +++ b/templates/default/activity/event/user/status/add.html.twig @@ -1,14 +1,14 @@
- - {{ 'identicon' | trans }} - - - {{ 'enable user' | trans }} - {{ 'identicon' | trans }} + + {{ 'have enabled' | trans }} + + + {{ 'identicon' | trans }} +
{{ added | format_ago }} diff --git a/templates/default/activity/event/user/status/add.rss.twig b/templates/default/activity/event/user/status/add.rss.twig new file mode 100644 index 0000000..d07d6c5 --- /dev/null +++ b/templates/default/activity/event/user/status/add.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have enabled user' | trans }} + #{{ to.user.id }} + + #{{ to.user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/event/user/status/delete.html.twig b/templates/default/activity/event/user/status/delete.html.twig index b9ff688..be723d9 100644 --- a/templates/default/activity/event/user/status/delete.html.twig +++ b/templates/default/activity/event/user/status/delete.html.twig @@ -1,15 +1,15 @@
- - {{ 'identicon' | trans }} - - - {{ 'diable user' | trans }} - {{ 'identicon' | trans }} + + {{ 'have disabled' | trans }} + + + {{ 'identicon' | trans }} +
{{ added | format_ago }} diff --git a/templates/default/activity/event/user/status/delete.rss.twig b/templates/default/activity/event/user/status/delete.rss.twig new file mode 100644 index 0000000..6542d28 --- /dev/null +++ b/templates/default/activity/event/user/status/delete.rss.twig @@ -0,0 +1,12 @@ + + + {{ 'User' | trans }} + #{{ user.id }} + {{ 'have disabled user' | trans }} + #{{ to.user.id }} + + #{{ to.user.id }} + {{ added | date('D, d M Y h:i:s O') }} + {{ url('user_info', { userId : to.user.id }) }}#activity-{{ id }} + {{ url('user_info', { userId : to.user.id }) }}#activity + \ No newline at end of file diff --git a/templates/default/activity/list.html.twig b/templates/default/activity/list.html.twig index da37c9e..2e9e004 100644 --- a/templates/default/activity/list.html.twig +++ b/templates/default/activity/list.html.twig @@ -1,6 +1,12 @@ {% 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 %} +

{{ 'Recent activity' | trans }}

+ + + + + {% for activity in activities %}
{{ render(controller( @@ -9,39 +15,25 @@ )) }}
{% endfor %} - {% if pagination.pages > 1 %} -
-
-   - {# @TODO - - - - - - #} -
-
- {% if pagination.pages > 1 %} - {{ 'Page' | trans | lower }} {{ pagination.page }} / {{ pagination.pages }} - {% if pagination.page > 1 %} - {% if pagination.page == 2 %} - - {{ 'Back' | trans | lower }} - - {% else %} - - {{ 'Back' | trans | lower }} - - {% endif %} - {% endif %} - {% if pagination.page < pagination.pages %} - - {{ 'Next' | trans | lower }} + -
- {% endif %} + {% endif %} + {% if pagination.page < pagination.pages %} + + {{ 'Next' | trans | lower }} + + {% endif %} + {% endif %} +
{% endblock %} \ No newline at end of file diff --git a/templates/default/activity/list.rss.twig b/templates/default/activity/list.rss.twig new file mode 100644 index 0000000..c7462db --- /dev/null +++ b/templates/default/activity/list.rss.twig @@ -0,0 +1,14 @@ + + + + + {{ name }} + {{ url('torrent_recent') }} + {% for activity in activities %} + {{ render(controller( + 'App\\Controller\\ActivityController::event', + { user : session.user, activity : activity, format : 'rss' } + )) }} + {% endfor %} + + diff --git a/templates/default/torrent/edit/sensitive.html.twig b/templates/default/torrent/edit/sensitive.html.twig index 1721ac7..cadd2a2 100644 --- a/templates/default/torrent/edit/sensitive.html.twig +++ b/templates/default/torrent/edit/sensitive.html.twig @@ -1,10 +1,10 @@ {% 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 %}

- {{'Edit sensitive status for torrent'|trans }} + {{'Edit sensitive status for torrent' | trans }} #{{ torrentId }}

@@ -12,7 +12,7 @@
@@ -23,7 +23,7 @@
@@ -38,7 +38,7 @@ {{ edition.added | format_ago }} {% endif %} - {{ 'by'|trans }} + {{ 'by' | trans }} {{'identicon'|trans }} diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index 0921085..b811d6a 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -334,10 +334,20 @@
+ +
+

{{ 'Recent activity' | trans }}

+ + + + + + + +
{% if activities %} - {% for activity in activities %} -
+
{{ render(controller( 'App\\Controller\\ActivityController::event', { user : session.user, activity : activity } @@ -348,13 +358,6 @@
  - {# @TODO - - - - - - #}
{% if pagination.pages > 1 %} diff --git a/templates/default/user/info.html.twig b/templates/default/user/info.html.twig index 6bb8837..d0df10d 100644 --- a/templates/default/user/info.html.twig +++ b/templates/default/user/info.html.twig @@ -218,16 +218,18 @@
+ +
+

{{ 'Recent activity' | trans }}

+ + + + + + + +
{% if user.activities %} - - {# -
-

{{ 'Last activity' | trans }}

- - RSS - -
- #} {% for activity in user.activities %}
{{ render(controller( diff --git a/templates/default/user/settings.html.twig b/templates/default/user/settings.html.twig index 81f4449..606b3fb 100644 --- a/templates/default/user/settings.html.twig +++ b/templates/default/user/settings.html.twig @@ -38,15 +38,24 @@ {% for locale in locales %} {% if locale == user.locale %} {% else %} {% endif %} {% endfor %} + @@ -56,7 +65,7 @@ - {{ 'Languages' | trans }} + {{ 'Content' | trans }} {% for locale in locales %}