annotate view/layout/usermenu.tt @ 14:d997ff96acf1

sync
author sergey
date Mon, 19 May 2014 18:34:16 +0400
parents
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 %]