bsw/jbe@19: local member = param.get("member", "table")
bsw/jbe@19: 
bsw@1045: local for_registration = param.get("for_registration", atom.boolean)
bsw@286: 
bsw/jbe@19: ui.form{
bsw@1045:   attr = { class = "form" },
bsw/jbe@19:   record = member,
bsw/jbe@19:   readonly = true,
bsw/jbe@19:   content = function()
bsw/jbe@19: 
bsw/jbe@1309:     if not for_registration and MemberImage:by_pk(member.id, "photo", true) then
bsw@1045:       ui.container { attr = { class = "member_photo" }, content = function()
bsw@1045:         execute.view{
bsw@1045:           module = "member_image",
bsw@1045:           view = "_show",
bsw@1045:           params = {
bsw@1045:             member = member,
bsw@1148:             image_type = "photo",
bsw@1179:             force_update = app.session.member_id == member.id
bsw@1045:           }
bsw/jbe@19:         }
bsw@1045:       end }
bsw@1045:     end
bsw@286:     
bsw@254:     if member.identification then
bsw@254:       ui.field.text{    label = _"Identification", name = "identification" }
bsw/jbe@19:     end
bsw@286:     if member.name then
bsw@286:       ui.field.text{ label = _"Screen name", name = "name" }
bsw@286:     end
bsw@1045:     if for_registration and member.login then
bsw@286:       ui.field.text{    label = _"Login name", name = "login" }
bsw@1045:     end
bsw@1045:     
bsw@1045:     if for_registration and member.notify_email then
bsw@286:       ui.field.text{    label = _"Notification email", name = "notify_email" }
bsw@286:     end
bsw/jbe@1309:     if member.profile then
bsw/jbe@1309:       local profile = member.profile.profile or {}
bsw/jbe@1309:       for i, field in ipairs(config.member_profile_fields) do
bsw/jbe@1309:         if profile[field.id] and #(profile[field.id]) > 0 then
bsw/jbe@1309:           ui.field.text{ label = field.name, name = field.id, value = profile[field.id] }
bsw/jbe@1309:         end
bsw/jbe@1309:       end
bsw/jbe@19:     end
bsw/jbe@1309: 
bsw@286:     if member.admin then
bsw@286:       ui.field.boolean{ label = _"Admin?",       name = "admin" }
bsw/jbe@19:     end
bsw@286:     if member.locked then
bsw@286:       ui.field.boolean{ label = _"Locked?",      name = "locked" }
bsw@286:     end
bsw@286:     if member.last_activity then
bsw@286:       ui.field.text{ label = _"Last activity (updated daily)", value = format.date(member.last_activity) or _"not yet" }
bsw@286:     end
bsw/jbe@1309:     if member.profile and member.profile.statement and #member.profile.statement > 0 then
bsw@701:       slot.put("
")
bsw@701:       slot.put("
")
bsw@205:       ui.container{
bsw@700:         attr = { class = " wiki" },
bsw@205:         content = function()
bsw/jbe@1309:           slot.put(member.profile:get_content("html"))
bsw@205:         end
bsw@205:       }
bsw@205:     end
bsw/jbe@19:   end
bsw/jbe@19: }
bsw@455: