Global: Do not show the separator in the left menu if there are no links below it

This commit is contained in:
Maxim Leshchenko 2021-12-03 20:45:59 +02:00
parent 24624bb147
commit 5918a9c34c
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -162,11 +162,14 @@
{/if}
</a>
<a href="/settings" class="link">{_"my_settings"}</a>
<div style="height: 1px;background: #CCC;margin: 4px 0 2px;"></div>
{if $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
{var canAccessAdminPanel = $thisUser->getChandlerUser()->can("access")->model("admin")->whichBelongsTo(NULL)}
{var canAccessHelpdesk = $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)}
{var menuLinksAvaiable = sizeof(OPENVK_ROOT_CONF['openvk']['preferences']['menu']['links']) > 0}
<div n:if="$canAccessAdminPanel || $canAccessHelpdesk || $menuLinksAvaiable" style="height: 1px;background: #CCC;margin: 4px 0 2px;"></div>
{if $canAccessAdminPanel}
<a href="/admin" class="link">Админ-панель</a>
{/if}
{if $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)}
{if $canAccessHelpdesk}
<a href="/support/tickets" class="link">Helpdesk</a>
{/if}
<a