diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php index d3f28f2f7..ac53f5b4d 100644 --- a/application/front/controller/visitor/ShaarliVisitorController.php +++ b/application/front/controller/visitor/ShaarliVisitorController.php @@ -61,6 +61,7 @@ protected function render(string $template): string $this->assignView('template', $template); $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL)); + $this->assignView('publicLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PUBLIC)); $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); $this->executeDefaultHooks($template); diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html index 7208a3b60..e2916fd94 100644 --- a/tpl/default/linklist.html +++ b/tpl/default/linklist.html @@ -7,11 +7,11 @@ {include="page.header"}
- {if="!empty($linkcount)"} + {if="$is_logged_in"} {$linkcount} {function="t('shaare', 'shaares', $linkcount)"} - {if="$privateLinkcount>0"}
{$privateLinkcount} {function="t('private link', 'private links', $privateLinkcount)"} - {/if} + {else} + {$publicLinkcount} {function="t('shaare', 'shaares', $publicLinkcount)"} {/if}
@@ -56,11 +56,11 @@