Mercurial > pub > site.implab
annotate view/layout/usermenu.tt @ 16:e69c970c3ddd default tip
sync
| author | sergey |
|---|---|
| date | Tue, 20 May 2014 01:28:48 +0400 |
| parents | d997ff96acf1 |
| children |
| rev | line source |
|---|---|
| 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 %] |
