From 7dabee58a187abe92358d962da506a836e29cda3 Mon Sep 17 00:00:00 2001
From: Yassine Doghri <yassine@doghri.fr>
Date: Thu, 8 Sep 2022 13:34:17 +0000
Subject: [PATCH] fix(ux): have podcast dashboard card link to podcast
 dashboard if only one podcast in instance

---
 themes/cp_admin/dashboard.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/themes/cp_admin/dashboard.php b/themes/cp_admin/dashboard.php
index bebdc2d0a0..e3f6222cbb 100644
--- a/themes/cp_admin/dashboard.php
+++ b/themes/cp_admin/dashboard.php
@@ -12,7 +12,7 @@
 <?= $this->section('content') ?>
 
 <div class="flex flex-wrap items-start gap-4">
-    <DashboardCard href="<?= route_to('podcast-list') ?>" glyph="mic" title="<?= lang('Dashboard.podcasts.title') ?>" subtitle="<?= $podcastsData['last_published_at'] ? esc(lang('Dashboard.podcasts.last_published', [
+    <DashboardCard href="<?= $onlyPodcastId === null ? route_to('podcast-list') : route_to('podcast-view', $onlyPodcastId) ?>" glyph="mic" title="<?= lang('Dashboard.podcasts.title') ?>" subtitle="<?= $podcastsData['last_published_at'] ? esc(lang('Dashboard.podcasts.last_published', [
         'lastPublicationDate' => local_date($podcastsData['last_published_at']),
     ], null, false)) : lang('Dashboard.podcasts.not_found') ?>"><?= $podcastsData['number_of_podcasts'] ?></DashboardCard>
     <DashboardCard href="<?= $onlyPodcastId === null ? '' : route_to('episode-list', $onlyPodcastId) ?>" glyph="play" title="<?= lang('Dashboard.episodes.title') ?>" subtitle="<?= $episodesData['last_published_at'] ? esc(lang('Dashboard.episodes.last_published', [
-- 
GitLab