liquid_feedback_frontend
diff app/main/member/_show_thumb.lua.orig @ 4:80c215dbf076
Version alpha5
Many optical changes and improved usability
Support for different wiki-formatting-engines
Help system
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 | |
| children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/app/main/member/_show_thumb.lua.orig Thu Dec 10 12:00:00 2009 +0100 1.3 @@ -0,0 +1,86 @@ 1.4 +local member = param.get("member", "table") 1.5 + 1.6 +local issue = param.get("issue", "table") 1.7 +local initiative = param.get("initiative", "table") 1.8 +local trustee = param.get("trustee", "table") 1.9 + 1.10 +local name 1.11 +if member.name_highlighted then 1.12 + name = encode.highlight(member.name_highlighted) 1.13 +else 1.14 + name = encode.html(member.name) 1.15 +end 1.16 + 1.17 +ui.container{ 1.18 + attr = { class = "member_thumb" }, 1.19 + content = function() 1.20 + ui.container{ 1.21 + attr = { class = "flags" }, 1.22 + content = function() 1.23 + if (issue or initiative) and member.weight > 1 then 1.24 + local module 1.25 + if issue then 1.26 + module = "interest" 1.27 + elseif initiative then 1.28 + module = "supporter" 1.29 + end 1.30 + ui.link{ 1.31 + attr = { title = _"Number of incoming delegations, follow link to see more details" }, 1.32 + content = _("+ #{weight}", { weight = member.weight - 1 }), 1.33 + module = module, 1.34 + view = "show_incoming", 1.35 + params = { 1.36 + member_id = member.id, 1.37 + initiative_id = initiative and initiative.id or nil, 1.38 + issue_id = issue and issue.id or nil 1.39 + } 1.40 + } 1.41 + end 1.42 + -- TODO performance 1.43 + local contact = Contact:by_pk(app.session.member.id, member.id) 1.44 + if contact then 1.45 + ui.image{ 1.46 + attr = { 1.47 + alt = _"You have saved this member as contact", 1.48 + title = _"You have saved this member as contact" 1.49 + }, 1.50 + static = "icons/16/bullet_disk.png" 1.51 + } 1.52 + end 1.53 + end 1.54 + } 1.55 + 1.56 + ui.link{ 1.57 + attr = { title = _"Show member" }, 1.58 + module = "member", 1.59 + view = "show", 1.60 + id = member.id, 1.61 + content = function() 1.62 + execute.view{ 1.63 + module = "member_image", 1.64 + view = "_show", 1.65 + params = { 1.66 + member = member, 1.67 + image_type = "avatar", 1.68 + show_dummy = true 1.69 + } 1.70 + } 1.71 + end 1.72 + } 1.73 + 1.74 + ui.link{ 1.75 + attr = { title = _"Show member" }, 1.76 + module = "member", 1.77 + view = "show", 1.78 + id = member.id, 1.79 + content = function() 1.80 + ui.container{ 1.81 + attr = { class = "member_name" }, 1.82 + content = function() 1.83 + slot.put(name) 1.84 + end 1.85 + } 1.86 + end 1.87 + } 1.88 + end 1.89 +}