liquid_feedback_frontend

view env/util/micro_avatar.lua @ 1800:b87997219042

Updated spanish translation
author bsw
date Thu Oct 21 15:22:29 2021 +0200 (2021-10-21)
parents 70121e414479
children
line source
1 function util.micro_avatar(member, member_name)
2 if type ( member ) == "number" then
3 member = {
4 id = member,
5 name = member_name
6 }
7 end
9 local function doit()
10 ui.image {
11 attr = {
12 title = member.name,
13 class = "mdl-chip__contact"
14 },
15 module = "member_image",
16 view = "show",
17 extension = "jpg",
18 id = member.id,
19 params = {
20 image_type = "avatar"
21 }
22 }
23 ui.tag { attr = { class = "mdl-chip__text" }, content = member.name }
24 end
26 ui.tag {
27 attr = { class = "microAvatar" },
28 content = function ()
29 if app.session:has_access("everything") then
30 ui.link {
31 attr = { class = "mdl-chip mdl-chip--contact" },
32 module = "member", view = "show", id = member.id,
33 content = doit
34 }
35 else
36 ui.tag{
37 attr = { class = "mdl-chip mdl-chip--contact" },
38 content = doit
39 }
40 end
41 end
42 }
43 end

Impressum / About Us