liquid_feedback_frontend

view app/main/_filter_view/30_navigation.lua @ 682:8956ad4474b2

Optical improvements
author bsw
date Tue Jun 26 17:48:49 2012 +0200 (2012-06-26)
parents 26d6d5cb4c7c
children e86bfe65e1b1
line source
1 slot.put_into("app_name", config.app_title)
3 slot.select('navigation', function()
5 ui.link{
6 content = function()
7 ui.tag{ attr = { class = "logo_liquid" }, content = "Liquid" }
8 ui.tag{ attr = { class = "logo_feedback" }, content = "Feedback" }
9 slot.put(" · ")
10 ui.tag{ content = config.instance_name }
11 end,
12 module = 'index',
13 view = 'index'
14 }
15 ui.link{
16 content = _"Search",
17 module = 'index',
18 view = 'search'
19 }
23 if config.public_access and app.session.member == nil then
24 ui.link{
25 text = _"Login",
26 module = 'index',
27 view = 'login',
28 params = {
29 redirect_module = request.get_module(),
30 redirect_view = request.get_view(),
31 redirect_id = param.get_id()
32 }
33 }
34 end
36 if app.session.member == nil then
37 ui.link{
38 text = _"Registration",
39 module = 'index',
40 view = 'register'
41 }
42 ui.link{
43 text = _"Reset password",
44 module = 'index',
45 view = 'reset_password'
46 }
47 end
48 end)
51 slot.select('navigation_right', function()
52 ui.tag{
53 tag = "ul",
54 attr = { id = "member_menu" },
55 content = function()
56 ui.tag{
57 tag = "li",
58 content = function()
59 ui.link{
60 module = "index",
61 view = "menu",
62 content = function()
63 if app.session.member_id then
64 execute.view{
65 module = "member_image",
66 view = "_show",
67 params = {
68 member = app.session.member,
69 image_type = "avatar",
70 show_dummy = true,
71 class = "micro_avatar",
72 }
73 }
74 ui.tag{ content = app.session.member.name }
75 else
76 ui.tag{ content = _"Select language" }
77 end
78 end
79 }
80 execute.view{ module = "index", view = "_menu" }
81 end
82 }
83 end
84 }
85 end)
87 slot.select("footer", function()
88 if app.session.member_id and app.session.member.admin then
89 ui.link{
90 text = _"Admin",
91 module = 'admin',
92 view = 'index'
93 }
94 slot.put(" · ")
95 end
96 ui.link{
97 text = _"About site",
98 module = 'index',
99 view = 'about'
100 }
101 slot.put(" · ")
102 ui.link{
103 text = _"Use terms",
104 module = 'index',
105 view = 'usage_terms'
106 }
107 slot.put(" · ")
108 ui.tag{ content = _"This site is using" }
109 slot.put(" ")
110 ui.link{
111 text = _"LiquidFeedback",
112 external = "http://www.public-software-group.org/liquid_feedback"
113 }
114 end)
117 if config.app_logo then
118 slot.select("logo", function()
119 ui.image{ static = config.app_logo }
120 end)
121 end
123 execute.inner()

Impressum / About Us