diff --git a/Web/Presenters/templates/@layout.xml b/Web/Presenters/templates/@layout.xml index 15359e41..56a4f4b5 100644 --- a/Web/Presenters/templates/@layout.xml +++ b/Web/Presenters/templates/@layout.xml @@ -162,11 +162,14 @@ {/if} {_"my_settings"} -
- {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} + + {if $canAccessAdminPanel} Админ-панель {/if} - {if $thisUser->getChandlerUser()->can("write")->model('openvk\Web\Models\Entities\TicketReply')->whichBelongsTo(0)} + {if $canAccessHelpdesk} Helpdesk {/if}