liquid_feedback_frontend

view app/main/member/_show_thumb.lua @ 4:80c215dbf076

Version alpha5

Many optical changes and improved usability

Support for different wiki-formatting-engines

Help system
author bsw/jbe
date Thu Dec 10 12:00:00 2009 +0100 (2009-12-10)
parents 768faea1096d
children 8d91bccab0bf
line source
1 local member = param.get("member", "table")
3 local issue = param.get("issue", "table")
4 local initiative = param.get("initiative", "table")
5 local trustee = param.get("trustee", "table")
7 local name
8 if member.name_highlighted then
9 name = encode.highlight(member.name_highlighted)
10 else
11 name = encode.html(member.name)
12 end
14 ui.container{
15 attr = { class = "member_thumb" },
16 content = function()
17 ui.container{
18 attr = { class = "flags" },
19 content = function()
20 if (issue or initiative) and member.weight > 1 then
21 local module
22 if issue then
23 module = "interest"
24 elseif initiative then
25 module = "supporter"
26 end
27 ui.link{
28 attr = { title = _"Number of incoming delegations, follow link to see more details" },
29 content = _("+ #{weight}", { weight = member.weight - 1 }),
30 module = module,
31 view = "show_incoming",
32 params = {
33 member_id = member.id,
34 initiative_id = initiative and initiative.id or nil,
35 issue_id = issue and issue.id or nil
36 }
37 }
38 end
39 if member.admin then
40 ui.image{
41 attr = {
42 alt = _"Member is administrator",
43 title = _"Member is administrator"
44 },
45 static = "icons/16/cog.png"
46 }
47 end
48 -- TODO performance
49 local contact = Contact:by_pk(app.session.member.id, member.id)
50 if contact then
51 ui.image{
52 attr = {
53 alt = _"You have saved this member as contact",
54 title = _"You have saved this member as contact"
55 },
56 static = "icons/16/bullet_disk.png"
57 }
58 end
59 end
60 }
62 ui.link{
63 attr = { title = _"Show member" },
64 module = "member",
65 view = "show",
66 id = member.id,
67 content = function()
68 execute.view{
69 module = "member_image",
70 view = "_show",
71 params = {
72 member = member,
73 image_type = "avatar",
74 show_dummy = true
75 }
76 }
77 ui.container{
78 attr = { class = "member_name" },
79 content = function()
80 slot.put(name)
81 end
82 }
83 end
84 }
85 end
86 }

Impressum / About Us