{% set isPortal = ((isPortal is defined) and isPortal) %}
<div class="tools">
{% if FirstName is defined and FirstName is not empty %}
<div class="account-info">
<div class="img-holder">
<a href="#"><img src="{{ asset('website/static/images/profile-icon.png') }}" alt="" width="37" height="37"></a>
</div>
<div class="text">
<span class="greeting">{{ 'topnav.welcome'|trans }},</span>
<strong class="name"><a href="#">{{ FirstName }}</a></strong>
</div>
<div class="drop">
<div class="box">
<h2>{{ FirstName ~ ' ' ~ LastName }}</h2>
<h2><a href="/{{ language|lower }}/account/history">{{ 'topnav.downloadhistory'|trans}}</a></h2>
<h2><a href="/{{ language|lower }}/account/sign-out">{{ 'topnav.signout'|trans}}</a></h2>
</div>
</div>
</div>
{% endif %}
{% set checkouturl = null %}
{% if editmode %}
{% set checkouturl = pimcore_url({'action': 'list', 'prefix': language|lower, 'cart': null}) %}
{% endif %}
<div class="download-info hover-js">
{% if cart and cart.getItems()|length > 0 %}
<a href="{{ checkouturl }}"><div class="data-holder"><span>{{cart.getItems()|length}}</span></div></a>
{% endif %}
<div class="text">
<span class="title"><a href="{{ checkouturl }}">{{ 'topnav.files to'|trans}}</a></span>
<strong class="link"><a href="{{ checkouturl }}" class="download">{{ 'topnav.download'|trans}}</a></strong>
</div>
<div class="drop">
<div class="box">
{% if cart and cart.getItems()|length > 0 %}
<h2>{{ 'cart.downloadlist'|trans}}:</h2>
<ul>
{% for item in cart.getItems() %}
<li><a href="{{ item.product.detailUrl }}">{{ item.product.OSName }}</a></li>
{% endfor %}
</ul>
<a href="{{ checkouturl }}" class="btn btn-default">{{ 'topnav.proceed to download'|trans}}</a>
<?php else: ?>
<h2>{{ 'topnav.add to the download list'|trans}}</h2>
{% endif %}
</div>
</div>
</div>
</div>