diff --git a/app/bundles/LeadBundle/EventListener/DashboardSubscriber.php b/app/bundles/LeadBundle/EventListener/DashboardSubscriber.php index ba6ba12fa50..ac9085df110 100644 --- a/app/bundles/LeadBundle/EventListener/DashboardSubscriber.php +++ b/app/bundles/LeadBundle/EventListener/DashboardSubscriber.php @@ -167,8 +167,9 @@ public function onWidgetDetailGenerate(WidgetDetailEvent $event) // Build table rows with links if ($lists) { foreach ($lists as &$list) { - $listUrl = $this->router->generate('mautic_segment_action', ['objectAction' => 'edit', 'objectId' => $list['id']]); - $row = [ + $listUrl = $this->router->generate('mautic_segment_action', ['objectAction' => 'edit', 'objectId' => $list['id']]); + $contactUrl = $this->router->generate('mautic_contact_index', ['search' => 'segment:'.$list['alias']]); + $row = [ [ 'value' => $list['name'], 'type' => 'link', @@ -176,6 +177,8 @@ public function onWidgetDetailGenerate(WidgetDetailEvent $event) ], [ 'value' => $list['leads'], + 'type' => 'link', + 'link' => $contactUrl, ], ]; $items[] = $row; diff --git a/app/bundles/LeadBundle/Model/ListModel.php b/app/bundles/LeadBundle/Model/ListModel.php index 81bf7e1e71e..9b5122f01e5 100644 --- a/app/bundles/LeadBundle/Model/ListModel.php +++ b/app/bundles/LeadBundle/Model/ListModel.php @@ -1022,7 +1022,7 @@ protected function batchSleep() public function getTopLists($limit = 10, $dateFrom = null, $dateTo = null, $filters = []) { $q = $this->em->getConnection()->createQueryBuilder(); - $q->select('COUNT(t.date_added) AS leads, ll.id, ll.name') + $q->select('COUNT(t.date_added) AS leads, ll.id, ll.name, ll.alias') ->from(MAUTIC_TABLE_PREFIX.'lead_lists_leads', 't') ->join('t', MAUTIC_TABLE_PREFIX.'lead_lists', 'll', 'll.id = t.leadlist_id') ->orderBy('leads', 'DESC')