liquid_feedback_frontend

view app/main/_filter_view/30_navigation.lua @ 1145:904f6807f7fa

Added support for upcoming moonbridge bases WebMCP
author bsw
date Sat Mar 21 15:26:39 2015 +0100 (2015-03-21)
parents 087cb35847ee
children 1390a21eb084
line source
1 slot.select ( 'instance_name', function ()
2 slot.put ( encode.html ( config.instance_name ) )
3 end)
6 slot.select ( 'navigation_right', function ()
8 if app.session:has_access ("anonymous") and not (app.session.needs_delegation_check) then
10 ui.form {
11 attr = { class = "inline search" },
12 method = "get",
13 module = "index", view = "search",
14 content = function ()
16 ui.field.text {
17 attr = { placeholder = "search" },
18 name = "q"
19 }
21 end
22 }
24 ui.link {
25 attr = { class = "searchLink" },
26 module = "index", view = "search", content = function ()
27 ui.image { static = "icons/16/magnifier.png" }
28 end
29 }
31 end
33 if app.session.member == nil then
35 slot.put ( " " )
37 ui.link {
38 text = _"Login",
39 module = 'index',
40 view = 'login',
41 params = {
42 redirect_module = request.get_module(),
43 redirect_view = request.get_view(),
44 redirect_id = param.get_id()
45 }
46 }
48 slot.put ( " " )
49 end
51 if app.session.member == nil and not config.registration_disabled then
53 ui.link {
54 text = _"Registration",
55 module = 'index',
56 view = 'register'
57 }
59 end
62 if app.session.member then
64 slot.put ( " " )
66 ui.tag { attr = { id = "member_menu" }, content = function()
67 util.micro_avatar(app.session.member)
68 end }
70 end -- if app.session.member
72 end)
74 -- show notifications about things the user should take care of
75 if app.session.member then
76 execute.view{
77 module = "index", view = "_sidebar_notifications", params = {
78 mode = "link"
79 }
80 }
81 end
83 slot.select ("footer", function ()
84 if app.session.member_id and app.session.member.admin then
85 ui.link {
86 text = _"System settings",
87 module = 'admin',
88 view = 'index'
89 }
90 slot.put(" · ")
91 end
92 ui.link{
93 text = _"About site",
94 module = 'index',
95 view = 'about'
96 }
97 if config.use_terms then
98 slot.put(" · ")
99 ui.link{
100 text = _"Use terms",
101 module = 'index',
102 view = 'usage_terms'
103 }
104 end
105 slot.put(" · ")
106 ui.link{
107 text = _"LiquidFeedback",
108 external = "http://www.liquidfeedback.org/"
109 }
110 end)
112 if not config.enable_debug_trace then
113 trace.disable()
114 else
115 slot.put_into('trace_button', '<div id="trace_show" onclick="document.getElementById(\'trace_content\').style.display=\'block\';this.style.display=\'none\';">TRACE</div>')
116 end
119 execute.inner()

Impressum / About Us