diff view/layout/default/index.tt @ 12:d9551c7e7101

improved dox library
author sergey
date Fri, 16 May 2014 16:47:50 +0400
parents 573272ec604b
children d997ff96acf1
line wrap: on
line diff
--- a/view/layout/default/index.tt	Thu May 15 18:24:02 2014 +0400
+++ b/view/layout/default/index.tt	Fri May 16 16:47:50 2014 +0400
@@ -10,14 +10,18 @@
 	</div>
 </div>
 <div id="top-menu">
-	<ul class="menu-bar float-right">
-		[% IF user.isNobody %]
-			<li><a href="$app.location.user.login?ref=$location">Login</a></li>
-		[% ELSE %]
-		<!-- no space
-		--><li class="menu-item">$user.name</li><!-- no space
-		--><li class=""><a href="$app.location.user">Settings</a><!--
-		--><li class=""><a href="$app.location.user.logout">Logout</a></li>
-		[% END %]
-	</ul>
+	[%
+		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 }
+			];
+		END;
+		render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu');
+	%]
 </div>
\ No newline at end of file