{if !$auth_path}
<div class="alert alert-error">{t}Не найден модуль авторизации!{/t}</div>
{elseif !$_user->isGuest()}
	<div class="list-group-item">
		<a href="{url href=$auth_path action="profile"}" title="{t}Профиль пользователя{/t}">
		<div class="media">
			{if $_user->avatar}
				<div class="media-left">
					<img class="media-object img-thumbnail pull-left" src="{avatar user_id=$_user->id type=$_user->avatar}" alt=""/>
				</div>
			{/if}
			<div class="media-body">
				<h4 class="media-heading">{t s1=$_user->login|escape}%s{/t}</h4>
				{t}Профиль пользователя{/t}
			</div>
		</div>
	</a>
	</div>
	<a class="list-group-item" href="{url href=getModulePath($_cfg.core.auth_module) action="logout" redirect=$smarty.server.REQUEST_URI token=1}" title="{t}Выйти{/t}">{t}Выйти{/t}</a>
{else}
	<form role="form" method="post" action="{url href=getModulePath($_cfg.core.auth_module)}">
		<input type="hidden" name="_qf__auth_form" value="" />
		<input type="hidden" name="token" value="{$_user->token nocache}" />
		<input type="hidden" name="redirect" value="{if $smarty.get.redirect}{$smarty.get.redirect|escape nocache}{else}{$smarty.server.REQUEST_URI|escape nocache}{/if}"/>
		<div class="form-group">
			<input tabindex="100" type="text" name="login" class="form-control" value="{$smarty.post.login|default:$smarty.cookies.login|escape nocache}" placeholder="{t}Логин{/t}"/>
		</div>
		<div class="form-group">
			<input tabindex="101" type="password" class="form-control" name="pass" placeholder="{t}Пароль{/t}"/>
		</div>
		{if $_cfg.current.show_openid}
		<div class="form-group">
			<input tabindex="102" type="text" class="form-control" name="openid" placeholder="OpenID" />
		</div>
		{/if}
		<div class="checkbox">
		{if $_cfg.current.show_lost}<a tabindex="105" class="pull-right" title="{t}Восстановление пароля{/t}" href="{url href=$auth_path action="lost"}">{t}Забыли пароль?{/t}</a>{/if}
			<label>
				<input tabindex="103" type="checkbox" name="rememberme" value="1"/> {t}Запомнить меня{/t}
			</label>
		</div>
		{if $_cfg.current.show_register}<a tabindex="106" class="pull-right btn btn-default" title="{t}Регистрация нового пользователя{/t}" href="{url href=$auth_path action="register"}">{t}Регистрация{/t}</a>{/if}
		<button tabindex="104" type="submit" class="btn btn-primary">{t}Войти{/t}</button>
	</form>
{/if}