Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep private links number … private. #2109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
12 changes: 6 additions & 6 deletions tpl/default/linklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
{include="page.header"}

<div class="linkcount pure-u-0 pure-u-lg-visible">
{if="!empty($linkcount)"}
{if="$is_logged_in"}
<span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
{if="$privateLinkcount>0"}
<br><span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
{/if}
{else}
<span class="strong">{$publicLinkcount}</span> {function="t('shaare', 'shaares', $publicLinkcount)"}
{/if}
</div>

Expand Down Expand Up @@ -56,11 +56,11 @@
<div class="pure-u-lg-2-24 pure-u-1-24"></div>
<div id="link-count-content" class="pure-u-lg-20-24 pure-u-22-24">
<div class="linkcount pure-u-lg-0 center">
{if="!empty($linkcount)"}
{if="$is_logged_in"}
<span class="strong">{$linkcount}</span> {function="t('shaare', 'shaares', $linkcount)"}
{if="$privateLinkcount>0"}
&middot; <span class="strong">{$privateLinkcount}</span> {function="t('private link', 'private links', $privateLinkcount)"}
{/if}
{else}
<span class="strong">{$publicLinkcount}</span> {function="t('shaare', 'shaares', $publicLinkcount)"}
{/if}
</div>

Expand Down
8 changes: 6 additions & 2 deletions tpl/vintage/page.header.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
<div id="logo" title="Share your links !" onclick="document.location='{$titleLink}';"></div>

<div id="linkcount" class="nomobile">
{if="!empty($linkcount)"}{$linkcount} links{/if}<br>
{if="!empty($privateLinkcount)"}{$privateLinkcount} private links{/if}
{if="$is_logged_in"}
{$linkcount} links<br>
{$privateLinkcount} private links
{else}
{$publicLinkcount} links
{/if}
</div>

<div id="menu">
Expand Down
Loading