liquid_feedback_frontend
view app/main/member/_profile.lua @ 124:f740026b1518
add initiator support in delegation
if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
if a delegation is issued from the initiative view, the initiators
from that one are added to the delegation target list. this makes it easier to delegate to the author without the need to add him to the contact list.
author | Daniel Poelzleithner <poelzi@poelzi.org> |
---|---|
date | Mon Sep 20 20:32:04 2010 +0200 (2010-09-20) |
parents | 00d1004545f1 |
children | 0607056cff72 |
line source
1 local member = param.get("member", "table")
3 if not member then
4 local member_id = param.get("member_id", atom.integer)
5 if member_id then
6 member = Member:by_id(member_id)
7 end
8 end
11 ui.form{
12 attr = { class = "member vertical" },
13 record = member,
14 readonly = true,
15 content = function()
17 ui.container{
18 attr = { class = "right" },
19 content = function()
21 execute.view{
22 module = "member_image",
23 view = "_show",
24 params = {
25 member = member,
26 image_type = "photo"
27 }
28 }
30 ui.container{
31 attr = { class = "contact_data" },
32 content = function()
33 end
34 }
36 end
37 }
39 if member.admin then
40 ui.field.boolean{ label = _"Admin?", name = "admin" }
41 end
42 if member.locked then
43 ui.field.boolean{ label = _"Locked?", name = "locked" }
44 end
45 if member.ident_number then
46 ui.field.text{ label = _"Ident number", name = "ident_number" }
47 end
48 ui.field.text{ label = _"Name", name = "name" }
50 if member.realname and #member.realname > 0 then
51 ui.field.text{ label = _"Real name", name = "realname" }
52 end
53 if member.email and #member.email > 0 then
54 ui.field.text{ label = _"email", name = "email" }
55 end
56 if member.xmpp_address and #member.xmpp_address > 0 then
57 ui.field.text{ label = _"xmpp", name = "xmpp_address" }
58 end
59 if member.website and #member.website > 0 then
60 ui.field.text{ label = _"Website", name = "website" }
61 end
62 if member.phone and #member.phone > 0 then
63 ui.field.text{ label = _"Phone", name = "phone" }
64 end
65 if member.mobile_phone and #member.mobile_phone > 0 then
66 ui.field.text{ label = _"Mobile phone", name = "mobile_phone" }
67 end
68 if member.address and #member.address > 0 then
69 ui.container{
70 content = function()
71 ui.tag{
72 tag = "label",
73 attr = { class = "ui_field_label" },
74 content = _"Address"
75 }
76 ui.tag{
77 tag = "span",
78 content = function()
79 slot.put(encode.html_newlines(encode.html(member.address)))
80 end
81 }
82 end
83 }
84 end
85 if member.profession and #member.profession > 0 then
86 ui.field.text{ label = _"Profession", name = "profession" }
87 end
88 if member.birthday and #member.birthday > 0 then
89 ui.field.text{ label = _"Birthday", name = "birthday" }
90 end
91 if member.organizational_unit and #member.organizational_unit > 0 then
92 ui.field.text{ label = _"Organizational unit", name = "organizational_unit" }
93 end
94 if member.internal_posts and #member.internal_posts > 0 then
95 ui.field.text{ label = _"Internal posts", name = "internal_posts" }
96 end
97 if member.external_memberships and #member.external_memberships > 0 then
98 ui.field.text{ label = _"Memberships", name = "external_memberships", multiline = true }
99 end
100 if member.external_posts and #member.external_posts > 0 then
101 ui.field.text{ label = _"Posts", name = "external_posts", multiline = true }
102 end
103 slot.put('<br style="clear: right;" />')
105 end
106 }
107 if member.statement and #member.statement > 0 then
108 ui.container{
109 attr = { class = "member_statement wiki" },
110 content = function()
111 slot.put(format.wiki_text(member.statement))
112 end
113 }
114 end