{% set logo = asset('images/' ~ app.session.get('server').logoUrl) %}
{% set css = asset('css/' ~ app.session.get('server').cssUrl) %}
{% set flagImage = asset('images/flag_square_' ~ app.session.get('lang').langKey ~ '.png') %}
<link rel="stylesheet" href="{{ css }}" />
<div class="topBarContainer">
<td class="topBar">
{% if app.session.get('user') %}
<div class="logo3DAdmin">
<x3d width='60px' height='40px' profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
<scene>
<Transform DEF = 'CubeGallery'
translation = '0 0 0'
scale = '10 10 10'>
<Inline nameSpaceName="LogoCubex" mapDEFToID="true" url="/Logo_Cubes_Admin.x3d" ></Inline>
</Transform>
</scene>
</x3d>
</div>
<!-- quick menu panel -->
<div class="quickMenuPanel">
<form method="GET" action="./newlang">
<select name="route" id="route" onchange="document.location=getElementById('route').value;" class="routeSelector">
<!-- quick menu routes list -->
<option value="">{{ 'service.quick_menu_title'|trans }}</option>
<option value="{{ path('root') }}homeuser">{{ 'user.admin'|trans }} - home</option>
<?php
//we display e-shop options
if(!empty($headerData['services']) && array_key_exists('1', $headerData['services'])) {
?>
<option value="{{ path('root') }}eshopAdmin" class="routeOption">{{ 'service.eshop'|trans }}</option>
<option value="{{ path('root') }}productedit" class="subOption">{{ 'eshop.products'|trans }}</option>
<option value="{{ path('root') }}categories" class="subOption">{{ 'eshop.categories'|trans }}</option>
<option value="{{ path('root') }}productnew" class="subOption">{{ 'eshop.new_product'|trans }}</option>
<?php
}
if(!empty($headerData['services']) && array_key_exists('10', $headerData['modules'])) {
?>
<option value="{{ path('root') }}productParameter" class="subOption">{{ 'module.productParameter'|trans }}</option>
<?php
}
?>
<?php
//we display knowledgebase options
if(!empty($headerData['services']) && array_key_exists('2', $headerData['services'])) {
?>
<option value="{{ path('root') }}knowledgebaseAdmin" class="routeOption">{{ 'service.knowledgebase'|trans }}</option>
<?php
if(array_key_exists('16', $headerData['modules'])) {
?>
<option value="{{ path('root') }}contacts" class="subOption">{{ 'knowledgebase.contacts'|trans }}</option>
<?php
}
if(array_key_exists('17', $headerData['modules'])) {
?>
<option value="{{ path('root') }}lists" class="subOption">{{ 'knowledgebase.lists'|trans }}</option>
<?php
}
if(array_key_exists('24', $headerData['modules'])) {
?>
<option value="{{ path('root') }}tasks" class="subOption">{{ 'knowledgebase.tasks'|trans }}</option>
<?php
}
?>
<?php
}
?>
<?php
//we display webpages options
if(!empty($headerData['services']) && array_key_exists('3', $headerData['services'])) {
?>
<option value="{{ path('root') }}webpagesAdmin" class="routeOption">{{ 'service.webpages'|trans }}</option>
<option value="{{ path('root') }}webMenu" class="subOption">{{ 'webpages.web_menus'|trans }}</option>
<?php
if(array_key_exists('2', $headerData['modules'])) {
?>
<option value="{{ path('root') }}fileManager" class="subOption">{{ 'module.fileManager'|trans }}</option>
<?php
}
if(array_key_exists('3', $headerData['modules'])) {
?>
<option value="{{ path('root') }}gallery" class="subOption">{{ 'module.gallery'|trans }}</option>
<?php
}
if(array_key_exists('1', $headerData['modules'])) {
?>
<option value="{{ path('root') }}cssDesigner" class="subOption">{{ 'module.cssDesigner'|trans }}</option>
<?php
}
if(array_key_exists('8', $headerData['modules'])) {
?>
<option value="{{ path('root') }}redaction" class="subOption">{{ 'module.redaction'|trans }}</option>
<?php
}
if(array_key_exists('12', $headerData['modules'])) {
?>
<option value="{{ path('root') }}formBuilder" class="subOption">{{ 'module.formBuilder'|trans }}</option>
<?php
}
?>
<?php
}
?>
<?php
//we display marketplace options
if(!empty($headerData['services']) && array_key_exists('4', $headerData['services'])) {
?>
<option value="{{ path('root') }}marketplaceAdmin" class="routeOption">{{ 'service.marketplace'|trans }}</option>
<?php
}
?>
<?php
//we display 3D services options
if(!empty($headerData['services']) && array_key_exists('5', $headerData['services'])) {
?>
<option value="{{ path('root') }}services3dAdmin" class="routeOption">{{ 'service.services3d'|trans }}</option>
<?php
}
?>
<?php
//we display Connector service options
if(!empty($headerData['services']) && array_key_exists('7', $headerData['services'])) {
?>
<option value="{{ path('root') }}connectorAdmin" class="routeOption">{{ 'service.connector'|trans }}</option>
<?php
}
?>
{# <?php#}
{# //we display Game zone service options#}
{# if(!empty($headerData['services']) && array_key_exists('8', $headerData['services'])) {#}
{# ?>#}
{# <option value="{{ path('root') }}gameZoneAdmin" class="routeOption">{{ 'service.gameZone'|trans }}</option>#}
{# <?php#}
{# }#}
{# ?>#}
</select>
</form>
</div>
{% endif %}
<!-- users panel -->
{% if app.session.get('user') %}
<div class="userPanel">
<span class="userLabel">{{ 'webpages.user'|trans }}: <strong>{{ app.session.get('user').userName }}</strong></span>
<span class="userLabel"><a href="{{ path('root') }}homeuser" class="boldPlainLink">Admin</a></span>
{% if app.session.get('user').username == 'Kantona' %}
<span class="userLabel"><a href="{{ path('root') }}admin" class="boldPlainLink">SuperAdmin</a></span>
{% endif %}
<span class="userLabel"><a href="{{ path('root') }}logout" class="boldPlainLink">Logout</a></span>
</div>
<?php
{% else %}
<!-- login and register panel -->
<table border='0' class='headerTable'>
<tr>
<td valign='top' class='logo3dHeader'>
<x3d width='60px' height='40px' profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'>
<scene>
<Transform DEF = 'CubeGallery'
translation = '0 0 0'
scale = '10 10 10'>
<Inline nameSpaceName="LogoCubex" mapDEFToID="true" url="/Logo_Cubes.x3d" ></Inline>
</Transform>
</scene>
</x3d>
</td>
<td valign='top' class='logoHeader'>
<div class="logoPanel">
<a href="{{ path('root') }}" class="logoLink">
{% if logo != null and logo != '' and logo != '/images/' %}
<img src="{{ logo }}" alt="{{ app.session.get('label') }}" title="{{ app.session.get('label') }}" border="0" class="logoImg">
{% else %}
<span class="logoLabel">{{ app.session.get('label') }}</span>
{% endif %}
</a>
</div>
</td>
<td valign='top'>
<div class="userPanel">
<a href="{{ path('root') }}login" class="boldPlainLink">Login</a>
|
{# : :#}
{# <a href="{{ path('root') }}newaccount" class="boldPlainLink">{{ 'user.new_account'|trans }}</a>#}
</div>
</td>
{% for service in app.session.get('server').services %}
{% set serviceId = service.serviceId %}
{% set link = path('root') ~ service.landingUrl %}
{% set localisedServiceName = ('service.' ~ service.action)|trans %}
<td valign='top' class='serviceTopMenuCell'>
<a href="{{ link }}" class="boldPlainLink">{{ localisedServiceName }}</a>
</td>
{% endfor %}
</tr>
</table>
{% endif %}
<div class="optionsPanel">
<!-- select language -->
<div class="languagesPanel">
<div class="languageSelectorPanel">
<form method="GET" action="{{ path('root') }}newlang">
<input type="hidden" name="routePath" value="{{ app.request.uri }}">
<input type="hidden" name="routeName" value="{{ app.request.attributes.get('_route') }}">
<label for="newlang" class="hiddenText">Select language</label>
<select name="newlang" onchange="this.form.submit()" class="languageSelector" id="newlang" >
<!-- languages list -->
{% for lang in app.session.get('langList') %}
{% if app.session.get('lang') and lang.langKey == app.session.get('lang').langKey %}
{% set selected = "selected" %}
{% else %}
{% set selected = "" %}
{% endif %}
<option value="{{ lang.langKey }}" {{ selected }}>{{ lang.langName }}</option>
{% endfor %}
</select>
</form>
</div>
<!--
<div class="flagPanel">
<img src="{{ flagImage }}" alt="{{ app.session.get('lang').langKey }}" title="{{ app.session.get('lang').langKey }}" class="flagImage">
</div>
-->
</div>
<!-- select currency -->
<div class="currencyPanel">
<div class="currencySelectorPanel">
<form method="GET" action="{{ path('root') }}">
<input type="hidden" name="routePath" value="<?= $app->getRequest()->getPathInfo() ?>">
<label for="newcurrency" class="hiddenText">Select currency</label>
<select name="newcurrency" onchange="this.form.submit()" class="currencySelector" id="newcurrency">
<!-- currency list -->
{% for currency in app.session.get('currencyList') %}
{% if currency.currencyKey == app.session.get('currency').currencyKey %}
{% set selected = "selected" %}
{% else %}
{% set selected = "" %}
{% endif %}
<option value="{{ currency.currencyKey }}" {{ selected }}>{{ currency.currencyKey }}</option>
{% endfor %}
</select>
</form>
</div>
<!--
<div class="currencySymbolPanel">
{{ app.session.get('currency').getCurrencyKey }}
</div>
-->
</div>
</div>
</div>
</div>
<!-- logoff header panel -->