Added:
- toolbar and fixes
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Manager\ToolbarManager;
|
||||
use App\Message\DownloadChapter;
|
||||
use App\Repository\ChapterRepository;
|
||||
use Doctrine\DBAL\Connection;
|
||||
@@ -13,7 +14,11 @@ use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class ActivityController extends AbstractController
|
||||
{
|
||||
public function __construct(private Connection $connection, private readonly ChapterRepository $chapterRepository)
|
||||
public function __construct(
|
||||
private readonly Connection $connection,
|
||||
private readonly ChapterRepository $chapterRepository,
|
||||
private readonly ToolbarManager $toolbarManager
|
||||
)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -33,6 +38,7 @@ class ActivityController extends AbstractController
|
||||
return $this->render('activity/index.html.twig', [
|
||||
'controller_name' => 'ActivityController',
|
||||
'status' => $status,
|
||||
'toolbarItems' => $this->toolbarManager->getToolbarItems(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Controller;
|
||||
|
||||
use App\Entity\Chapter;
|
||||
use App\Entity\Manga;
|
||||
use App\Manager\ToolbarManager;
|
||||
use App\Message\DownloadChapter;
|
||||
use App\Repository\ChapterRepository;
|
||||
use App\Repository\MangaRepository;
|
||||
@@ -34,19 +35,23 @@ class MangaController extends AbstractController
|
||||
private readonly ChapterRepository $chapterRepository,
|
||||
private readonly MangaUpdatesMetadataProvider $mangaUpdatesDbProvider,
|
||||
private readonly MessageBusInterface $bus,
|
||||
private readonly CbzService $cbzService
|
||||
private readonly CbzService $cbzService,
|
||||
private readonly ToolbarManager $toolbarManager
|
||||
)
|
||||
{
|
||||
}
|
||||
|
||||
#[Route('/manga', name: 'app_manga')]
|
||||
public function index(): Response
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
// phpinfo();
|
||||
$mangas = $this->mangaRepository->findAll();
|
||||
$sort = $request->query->get('sort', 'title');
|
||||
$order = $request->query->get('order', 'asc');
|
||||
|
||||
$mangas = $this->mangaRepository->findAllSorted($sort, $order);
|
||||
|
||||
return $this->render('manga/index.html.twig', [
|
||||
'controller_name' => 'MangaController',
|
||||
'mangas' => $mangas,
|
||||
'toolbarItems' => $this->toolbarManager->getToolbarItems(),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -89,6 +94,7 @@ class MangaController extends AbstractController
|
||||
return $this->render('manga/show_chapters.html.twig', [
|
||||
'chapters_by_volume' => $chaptersByVolume,
|
||||
'manga' => $manga,
|
||||
'toolbarItems' => $this->toolbarManager->getToolbarItems(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user