<div class="main_widget_account_wrapper">
	<div class="widget_menu_trennlinie1"></div>
	<div class="widget_icon"></div>
	<div class="widget_title">
		<span class="button_name">{$template_text.default.my_account}</span>
		<span class="button_text">
		{if isset($customer) && ($customer->id != $system_configuration.guest_order_customer_id)}
			{if isset($customer->company) && $customer->company != ''}
				{$customer->company}
			{else}
				{$customer->firstname} {$customer->surname}
			{/if}
		{else}
			{$template_text.main_widget_login.please_login}
		{/if}
	</span>
	</div>
	<div class="widget_menu_arrow"></div>
	<div class="widget_menu_trennlinie"></div>


</div>

<div id="account_kontext" class="{if isset($customer)}account_kontext_active{else}inactive{/if}">
	{if isset($customer) && ($customer->id != $system_configuration.guest_order_customer_id)}
	<!-- Loggedin -->
	<div class="account_kontext_menu_wrapper account_kontext_databox" style="height:170px;">
		<div class="title">{$template_text.main_widget_login.logedin}</div>
		<a href="/Kundencenter/" class="menu_item" title="Kundencenter">
			<span></span>
			{if isset($customer->company) && $customer->company != ''}
				{$customer->company}
			{else}
				{$customer->firstname} {$customer->surname}
			{/if}
		</a>
		{if $customer->default_address_street}
		<div class="default_address">
			{$customer->default_address_street} {$customer->default_address_house_number}<br />
			{$customer->default_address_zip_code} {$customer->default_address_city}<br />
		</div>
		{/if}
	</div>
	<br />
	<div class="account_kontext_menu_wrapper account_kontext_menubox">
		<div class="title">{$template_text.main_widget_login.title_customer_center}</div>
		<a href="/Kundencenter/" class="menu_item" title="Bestellungen"><span></span>{$template_text.main_widget_login.link_my_orders}</a>
		<a href="/Kundencenter/" class="menu_item" title="Adresse"><span></span>{$template_text.main_widget_login.link_edit_address}</a>
		<a href="/Kundencenter/" class="menu_item" title="Konto"><span></span>{$template_text.main_widget_login.link_change_account}</a>
		<a href="/Merkliste/" class="menu_item" title="Merkliste"><span></span>{$template_text.main_widget_login.link_memory_items}</a>
	</div>
	<div class="account_button_wrapper" style="position:absolute;bottom:0px;">
		{if isset($customer) && $customer->admin_role_id}<a href="{$SUB_DIR}index.php?admin_modul=admin_dashboard" target="_blank" id="account_button_admin" title="Verwaltung">{$template_text.main_widget_login.button_admin}</a>{/if}
		<a href="/LogOff/" id="account_button_logout" title="Logout">{$template_text.default.logout}</a>
	</div>
	{else}
		<div class="account_kontext_menu_wrapper account_kontext_loginbox">
			<div class="title">{$template_text.main_widget_login.login_widget_already_login}</div>
			<div class="subtitle">{$template_text.main_widget_login.login_widget_already_login_info}</div>
			<div class="login_form">
			<form method="post" action="./">
				<input class="login_field login_name" type="text" name="shopLogin[user]" data-defaultv="{$template_text.default.email_address}" value="{$template_text.default.email_address}" />
				<input class="login_field login_password" type="password" name="shopLogin[pass]" data-defaultv="{$template_text.default.password}" value="{$template_text.default.password}" />
				<input type="hidden" name="shopAction" value="try_login" />
				<input type="hidden" name="login_save_session" id="field_login_save_session" value="0" />
				<button class="login_button" type="submit">
				{$template_text.default.login}
				</button>
			</form>
			</div>
			<a href="/Passwort-Vergessen/" class="menu_item_password_forgotten" title="Passwort vergessen">{$template_text.main_widget_login.link_password_forgotten}</a>
			<a href="#save_session" id="login_save_session" class="login_save_session_inactive" title="save login">{$template_text.main_widget_login.save_login}</a>
		</div>
		<br />
		<div class="account_kontext_menu_wrapper account_kontext_registrationbox">
			<div class="title">{$template_text.main_widget_login.title_new_customer}</div>
			<div class="reg_text">{$template_text.main_widget_login.customer_registration_text}</div>
			<a href="/Kundenregistrierung/" class="menu_item" title="Kundenregistrierung">{$template_text.main_widget_login.link_customer_registration}</a>
		</div>
	{/if}
</div>
