14
|
1 [%
|
|
2 IF user.isNobody;
|
|
3 usermenu = [
|
|
4 { title = 'Login', href= app.location.user.login(ref = location) }
|
|
5 ];
|
|
6 ELSE;
|
|
7 usermenu = [
|
|
8 { title = user.name },
|
|
9 { title = 'Settings', href = app.location.user },
|
|
10 { title = 'Logout', href = app.location.user.logout }
|
|
11 ];
|
|
12 IF session.Satisfy(adminRole);
|
|
13 usermenu.push({title = 'Admin', href = app.location.admin });
|
|
14 END;
|
|
15 END;
|
|
16 render('menu', items = usermenu, class = 'menu-bar float-right', id = 'user-menu');
|
|
17 %] |