rev |
line source |
bsw@1045
|
1 slot.select ( 'instance_name', function ()
|
bsw@1045
|
2 slot.put ( encode.html ( config.instance_name ) )
|
bsw@1045
|
3 end)
|
bsw@51
|
4
|
bsw@813
|
5
|
bsw@1045
|
6 slot.select ( 'navigation_right', function ()
|
bsw@276
|
7
|
bsw@1045
|
8 if app.session:has_access ("anonymous") and not (app.session.needs_delegation_check) then
|
bsw@813
|
9
|
bsw@1045
|
10 ui.form {
|
bsw@1045
|
11 attr = { class = "inline search" },
|
bsw@1045
|
12 method = "get",
|
bsw@1045
|
13 module = "index", view = "search",
|
bsw@1045
|
14 content = function ()
|
bsw@1045
|
15
|
bsw@1045
|
16 ui.field.text {
|
bsw@1045
|
17 attr = { placeholder = "search" },
|
bsw@1045
|
18 name = "q"
|
bsw@813
|
19 }
|
bsw@1045
|
20
|
bsw@1045
|
21 end
|
bsw@1045
|
22 }
|
bsw@1045
|
23
|
bsw@1045
|
24 ui.link {
|
bsw@1045
|
25 attr = { class = "searchLink" },
|
bsw@1045
|
26 module = "index", view = "search", content = function ()
|
bsw@1045
|
27 ui.image { static = "icons/16/magnifier.png" }
|
bsw@1045
|
28 end
|
bsw@1045
|
29 }
|
bsw@813
|
30
|
bsw@370
|
31 end
|
bsw@1045
|
32
|
bsw@370
|
33 if app.session.member == nil then
|
bsw@1045
|
34
|
bsw@1045
|
35 slot.put ( " " )
|
bsw@1045
|
36
|
bsw@1045
|
37 ui.link {
|
bsw@1045
|
38 text = _"Login",
|
bsw@1045
|
39 module = 'index',
|
bsw@1045
|
40 view = 'login',
|
bsw@1045
|
41 params = {
|
bsw@1045
|
42 redirect_module = request.get_module(),
|
bsw@1045
|
43 redirect_view = request.get_view(),
|
bsw@1045
|
44 redirect_id = param.get_id()
|
bsw@1045
|
45 }
|
bsw@1045
|
46 }
|
bsw@1045
|
47
|
bsw@1045
|
48 slot.put ( " " )
|
bsw@1071
|
49 end
|
bsw@1071
|
50
|
bsw@1071
|
51 if app.session.member == nil and not config.registration_disabled then
|
bsw@1045
|
52
|
bsw@1045
|
53 ui.link {
|
bsw/jbe@19
|
54 text = _"Registration",
|
bsw/jbe@5
|
55 module = 'index',
|
bsw/jbe@19
|
56 view = 'register'
|
bsw/jbe@5
|
57 }
|
bsw@1045
|
58
|
bsw@586
|
59 end
|
bsw@1045
|
60
|
bsw@1045
|
61
|
bsw@1045
|
62 if app.session.member then
|
bsw@1045
|
63
|
bsw@1045
|
64 slot.put ( " " )
|
bsw@1045
|
65
|
bsw@1045
|
66 ui.tag { attr = { id = "member_menu" }, content = function()
|
bsw@1045
|
67 util.micro_avatar(app.session.member)
|
bsw@1045
|
68 end }
|
bsw@1045
|
69
|
bsw@1045
|
70 end -- if app.session.member
|
bsw@1045
|
71
|
bsw@586
|
72 end)
|
bsw/jbe@0
|
73
|
bsw@1045
|
74 -- show notifications about things the user should take care of
|
bsw@1045
|
75 if app.session.member then
|
bsw@1045
|
76 execute.view{
|
bsw@1045
|
77 module = "index", view = "_sidebar_notifications", params = {
|
bsw@1045
|
78 mode = "link"
|
bsw@1045
|
79 }
|
bsw@1045
|
80 }
|
bsw@1045
|
81 end
|
bsw@586
|
82
|
bsw@1045
|
83 slot.select ("footer", function ()
|
bsw@434
|
84 if app.session.member_id and app.session.member.admin then
|
bsw@1045
|
85 ui.link {
|
bsw@1045
|
86 text = _"System settings",
|
bsw@433
|
87 module = 'admin',
|
bsw@433
|
88 view = 'index'
|
bsw@433
|
89 }
|
bsw@433
|
90 slot.put(" · ")
|
bsw@433
|
91 end
|
bsw@433
|
92 ui.link{
|
bsw@433
|
93 text = _"About site",
|
bsw@433
|
94 module = 'index',
|
bsw@433
|
95 view = 'about'
|
bsw@433
|
96 }
|
bsw@942
|
97 if config.use_terms then
|
bsw@942
|
98 slot.put(" · ")
|
bsw@942
|
99 ui.link{
|
bsw@942
|
100 text = _"Use terms",
|
bsw@942
|
101 module = 'index',
|
bsw@942
|
102 view = 'usage_terms'
|
bsw@942
|
103 }
|
bsw@942
|
104 end
|
bsw@433
|
105 slot.put(" · ")
|
bsw@433
|
106 ui.link{
|
bsw@433
|
107 text = _"LiquidFeedback",
|
bsw@1121
|
108 external = "http://www.liquidfeedback.org/"
|
bsw@433
|
109 }
|
bsw@433
|
110 end)
|
bsw@433
|
111
|
bsw@1145
|
112 if not config.enable_debug_trace then
|
bsw@1145
|
113 trace.disable()
|
bsw@1145
|
114 else
|
bsw@1145
|
115 slot.put_into('trace_button', '<div id="trace_show" onclick="document.getElementById(\'trace_content\').style.display=\'block\';this.style.display=\'none\';">TRACE</div>')
|
bsw@1145
|
116 end
|
bsw@1145
|
117
|
bsw@1145
|
118
|
bsw/jbe@0
|
119 execute.inner()
|