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

sync
author sergey
date Tue, 20 May 2014 01:28:48 +0400
parents d997ff96acf1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
14
sergey
parents:
diff changeset
1 [%
sergey
parents:
diff changeset
2 IF user.isNobody;
sergey
parents:
diff changeset
3 usermenu = [
sergey
parents:
diff changeset
4 { title = 'Login', href= app.location.user.login(ref = location) }
sergey
parents:
diff changeset
5 ];
sergey
parents:
diff changeset
6 ELSE;
sergey
parents:
diff changeset
7 usermenu = [
sergey
parents:
diff changeset
8 { title = user.name },
sergey
parents:
diff changeset
9 { title = 'Settings', href = app.location.user },
sergey
parents:
diff changeset
10 { title = 'Logout', href = app.location.user.logout }
sergey
parents:
diff changeset
11 ];
sergey
parents:
diff changeset
12 IF session.Satisfy(adminRole);
sergey
parents:
diff changeset
13 usermenu.push({title = 'Admin', href = app.location.admin });
sergey
parents:
diff changeset
14 END;
sergey
parents:
diff changeset
15 END;
sergey
parents:
diff changeset
16 render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu');
sergey
parents:
diff changeset
17 %]