liquid_feedback_frontend

view app/main/_filter_view/30_navigation.lua @ 989:5a712ec1a7f1

Added support for login name recovery by email address
author bsw
date Sat Apr 20 18:51:28 2013 +0200 (2013-04-20)
parents 81bde33c2256
children 701a5cf6b067
line source
1 slot.select('navigation', function()
3 ui.link{
4 content = function()
5 ui.tag{ attr = { class = "logo_liquidfeedback" }, content = _"LiquidFeedback" }
6 slot.put(" · ")
7 ui.tag{ content = config.instance_name }
8 end,
9 module = 'index',
10 view = 'index'
11 }
13 if app.session:has_access("anonymous") and not (app.session.needs_delegation_check) then
15 ui.link{
16 content = _"Search",
17 module = 'index',
18 view = 'search'
19 }
21 if app.session.member == nil then
22 ui.link{
23 text = _"Login",
24 module = 'index',
25 view = 'login',
26 params = {
27 redirect_module = request.get_module(),
28 redirect_view = request.get_view(),
29 redirect_id = param.get_id()
30 }
31 }
32 end
34 end
36 if app.session.member == nil then
37 ui.link{
38 text = _"Registration",
39 module = 'index',
40 view = 'register'
41 }
42 end
43 end)
46 slot.select('navigation_right', function()
47 ui.tag{
48 tag = "ul",
49 attr = { id = "member_menu" },
50 content = function()
51 ui.tag{
52 tag = "li",
53 content = function()
54 ui.link{
55 module = "index",
56 view = "menu",
57 content = function()
58 if app.session.member_id then
59 execute.view{
60 module = "member_image",
61 view = "_show",
62 params = {
63 member = app.session.member,
64 image_type = "avatar",
65 show_dummy = true,
66 class = "micro_avatar",
67 }
68 }
69 ui.tag{ content = app.session.member.name }
70 else
71 ui.tag{ content = _"Select language" }
72 end
73 end
74 }
75 execute.view{ module = "index", view = "_menu" }
76 end
77 }
78 end
79 }
80 end)
82 slot.select("footer", function()
83 if app.session.member_id and app.session.member.admin then
84 ui.link{
85 text = _"Admin",
86 module = 'admin',
87 view = 'index'
88 }
89 slot.put(" · ")
90 end
91 ui.link{
92 text = _"About site",
93 module = 'index',
94 view = 'about'
95 }
96 if config.use_terms then
97 slot.put(" · ")
98 ui.link{
99 text = _"Use terms",
100 module = 'index',
101 view = 'usage_terms'
102 }
103 end
104 slot.put(" · ")
105 ui.tag{ content = _"This site is using" }
106 slot.put(" ")
107 ui.link{
108 text = _"LiquidFeedback",
109 external = "http://www.public-software-group.org/liquid_feedback"
110 }
111 end)
113 execute.inner()

Impressum / About Us