view view/layout/usermenu.tt @ 16:e69c970c3ddd default tip

sync
author sergey
date Tue, 20 May 2014 01:28:48 +0400
parents d997ff96acf1
children
line wrap: on
line source

[%
	IF user.isNobody;
		usermenu = [
			{ title = 'Login', href= app.location.user.login(ref = location) }
		];
	ELSE;
		usermenu = [
			{ title = user.name },
			{ title = 'Settings', href = app.location.user },
			{ title = 'Logout', href = app.location.user.logout }
		];
		IF session.Satisfy(adminRole);
			usermenu.push({title = 'Admin', href = app.location.admin });
		END;
	END;
	render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu');
%]