{% if (global.flags.isLogged) %}
	{% if pluginIsActive('nsm') %}
		<div class="stnt pull-left">
			<a href="{{ p.nsm.link }}" class="btn btn-primary">{{ lang.add_news }}</a>
		</div>
	{% endif %}
	{% if pluginIsActive('pm') %}
		<div class="env pull-left">
			<a href="{{ p.pm.link }}"><i class="fa fa-envelope"></i></a>
		</div>
	{% endif %}
	<div class="avatar pull-left dropdown">
		<a data-toggle="dropdown" href="#"><img src="{{ avatar_url }}" width="37" height="37" alt="" /></a> <b class="caret"></b>
		<ul class="dropdown-menu" role="menu">
			{% if (global.flags.isLogged and (global.user['status'] <= 3)) %}
				<li><a href="{{ admin_url }}" target="_blank">{{ lang.admin_panel }}</a></li>
			{% endif %}
			{% if pluginIsActive('uprofile') %}
				<li><a href="{{ profile_link }}">{{ lang.myprofile }}</a></li>
			{% endif %}
			{% if pluginIsActive('pm') %}
				<li><a href="{{ p.pm.link }}">{{ lang.private_messages }} ( {{ p.pm.pm_unread }} - {{ p.pm.pm_all }} )</a></li>
			{% endif %}
			{% if pluginIsActive('bookmarks') %}
				<li><a href="{{ p.bookmarks.link }}">{{ lang.theme.user_bookmarks }} ( {{ p.bookmarks.count }} )</a></li>
			{% endif %}
			<li><a href="{{ logout_link }}">{{ lang.log_out }}</a></li>
		</ul>
	</div>
	<div class="clearfix"></div>
{% else %}
	<div class="stnt pull-left">
		<a href="{{ reg_link }}" class="btn btn-primary">{{ lang.theme.user_registration }}</a>
		<a href="{{ lost_link }}" class="btn btn-primary">{{ lang.theme.user_lostpassword }}</a>
		<a href="/login/" class="btn btn-primary">{{ lang.login }}</a>
	</div>
{% endif %}